Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file.
`check-permissions-ownership.sh` provided in stackable-base image ([#1025]).
- zookeeper: check for correct permissions and ownerships in /stackable folder via
`check-permissions-ownership.sh` provided in stackable-base image ([#1043]).
- nifi: Add OPA authorizer plugin with workaround ([#1058]).

### Changed

Expand Down Expand Up @@ -75,6 +76,7 @@ All notable changes to this project will be documented in this file.
[#1054]: https://github.com/stackabletech/docker-images/pull/1054
[#1055]: https://github.com/stackabletech/docker-images/pull/1055
[#1056]: https://github.com/stackabletech/docker-images/pull/1056
[#1058]: https://github.com/stackabletech/docker-images/pull/1058

## [25.3.0] - 2025-03-21

Expand Down
23 changes: 23 additions & 0 deletions nifi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,27 @@ 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

# TODO: Set to tag after new release of nifi-opa-plugin
RUN git clone --depth 1 --branch feat/reworked-opa-response https://github.com/DavidGitter/nifi-opa-plugin.git && \
cd nifi-opa-plugin/authorizer && \
mvn \
--batch-mode \
--no-transfer-progress \
install \
-DskipTests \
-Pnifi-${PRODUCT}

# Set correct permissions
RUN chmod g=u /stackable/nifi-opa-plugin/authorizer/target/opa-authorizer.nar

FROM stackable/image/java-base AS final

ARG PRODUCT
Expand All @@ -97,6 +118,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
Expand Down