-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat(nifi): Add NiFi OPA Authorizer #1058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,28 @@ rm -rf /stackable/nifi-${PRODUCT}/docs | |
chmod -R g=u /stackable | ||
EOF | ||
|
||
FROM stackable/image/java-devel AS opa-authorizer-builder | ||
|
||
ARG STACKABLE_USER_UID | ||
ARG PRODUCT | ||
|
||
USER ${STACKABLE_USER_UID} | ||
WORKDIR /stackable | ||
|
||
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/opa-authorizer/nifi-framework-api-version.patch /stackable/nifi-framework-api-version.patch | ||
|
||
# TODO: Set to tag after new release of nifi-opa-plugin | ||
RUN git clone --depth 1 https://github.com/DavidGitter/nifi-opa-plugin.git && \ | ||
cd nifi-opa-plugin && \ | ||
git reset --hard cdf8c36 && \ | ||
git apply /stackable/nifi-framework-api-version.patch && \ | ||
Comment on lines
+93
to
+97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably want profiles upstream for that. |
||
cd authorizer && \ | ||
mvn \ | ||
--batch-mode \ | ||
--no-transfer-progress \ | ||
install \ | ||
-DskipTests | ||
|
||
FROM stackable/image/java-base AS final | ||
|
||
ARG PRODUCT | ||
|
@@ -97,6 +119,8 @@ LABEL name="Apache NiFi" \ | |
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/ | ||
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar | ||
|
||
COPY --chown=${STACKABLE_USER_UID}:0 --from=opa-authorizer-builder /stackable/nifi-opa-plugin/authorizer/target/opa-authorizer.nar /stackable/nifi-${PRODUCT}/extensions/opa-authorizer.nar | ||
|
||
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin | ||
COPY --chown=${STACKABLE_USER_UID}:0 nifi/licenses /licenses | ||
COPY --chown=${STACKABLE_USER_UID}:0 nifi/python /stackable/python | ||
|
@@ -127,7 +151,7 @@ ln -s /stackable/nifi-${PRODUCT} /stackable/nifi | |
chown --no-dereference ${STACKABLE_USER_UID}:0 /stackable/nifi | ||
chmod --recursive g=u /stackable/python | ||
chmod --recursive g=u /stackable/bin | ||
chmod g=u /stackable/nifi-${PRODUCT} | ||
chmod --recursive g=u /stackable/nifi-${PRODUCT} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This recursive chmod will bloat the image. If you only want the
|
||
EOF | ||
|
||
# ---------------------------------------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/authorizer/pom.xml b/authorizer/pom.xml | ||
index da074d7..55e76c3 100644 | ||
--- a/authorizer/pom.xml | ||
+++ b/authorizer/pom.xml | ||
@@ -19,7 +19,7 @@ | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
- <nifi.version>2.3.0</nifi.version> | ||
+ <nifi.version>1.28.1</nifi.version> | ||
</properties> | ||
|
||
<dependencies> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRODUCT is not used in this builder.