@@ -80,6 +80,28 @@ rm -rf /stackable/nifi-${PRODUCT}/docs
8080chmod -R g=u /stackable
8181EOF
8282
83+ FROM stackable/image/java-devel AS opa-authorizer-builder
84+
85+ ARG STACKABLE_USER_UID
86+ ARG PRODUCT
87+
88+ USER ${STACKABLE_USER_UID}
89+ WORKDIR /stackable
90+
91+ COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/opa-authorizer/nifi-framework-api-version.patch /stackable/nifi-framework-api-version.patch
92+
93+ # TODO: Set to tag after new release of nifi-opa-plugin
94+ RUN git clone --depth 1 https://github.com/DavidGitter/nifi-opa-plugin.git && \
95+ cd nifi-opa-plugin && \
96+ git reset --hard cdf8c36 && \
97+ git apply /stackable/nifi-framework-api-version.patch && \
98+ cd authorizer && \
99+ mvn \
100+ --batch-mode \
101+ --no-transfer-progress \
102+ install \
103+ -DskipTests
104+
83105FROM stackable/image/java-base AS final
84106
85107ARG PRODUCT
@@ -97,6 +119,8 @@ LABEL name="Apache NiFi" \
97119COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/
98120COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar
99121
122+ 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
123+
100124COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin
101125COPY --chown=${STACKABLE_USER_UID}:0 nifi/licenses /licenses
102126COPY --chown=${STACKABLE_USER_UID}:0 nifi/python /stackable/python
@@ -127,7 +151,7 @@ ln -s /stackable/nifi-${PRODUCT} /stackable/nifi
127151chown --no-dereference ${STACKABLE_USER_UID}:0 /stackable/nifi
128152chmod --recursive g=u /stackable/python
129153chmod --recursive g=u /stackable/bin
130- chmod g=u /stackable/nifi-${PRODUCT}
154+ chmod --recursive g=u /stackable/nifi-${PRODUCT}
131155EOF
132156
133157# ----------------------------------------
0 commit comments