Skip to content

fix(nifi): Conditionally disable Host Port Validation in NiFi 2.4.0 #1125

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

Merged
merged 2 commits into from
May 23, 2025

Conversation

labrenbe
Copy link
Member

@labrenbe labrenbe commented May 22, 2025

Description

Starting in NiFi 2.4.0 the host header validation has been replaced by host port validation: apache/nifi#9680

This adds a patch that replaces 0002-Allow-bypassing-check-for-host-header.patch which was used to turn host header validation off if the list of allowed hosts contained only *.

Definition of Done Checklist

Note

Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant.

Please make sure all these things are done and tick the boxes

  • Changes are OpenShift compatible
  • All added packages (via microdnf or otherwise) have a comment on why they are added
  • Things not downloaded from Red Hat repositories should be mirrored in the Stackable repository and downloaded from there
  • All packages should have (if available) signatures/hashes verified
  • Add an entry to the CHANGELOG.md file
  • Integration tests ran successfully
TIP: Running integration tests with a new product image

The image can be built and uploaded to the kind cluster with the following commands:

bake --product <product> --image-version <stackable-image-version>
kind load docker-image <image-tagged-with-the-major-version> --name=<name-of-your-test-cluster>

See the output of bake to retrieve the image tag for <image-tagged-with-the-major-version>.

Release Notes

NiFi: Update patch that allows bypassing the host header validation starting with NiFi 2.4.0

@labrenbe labrenbe marked this pull request as ready for review May 22, 2025 13:22
@labrenbe labrenbe self-assigned this May 22, 2025
@NickLarsenNZ
Copy link
Member

@labrenbe
Copy link
Member Author

During local testing I was able to access the NiFi UI without the HTTP 421 error.

@labrenbe labrenbe moved this to Development: Waiting for Review in Stackable Engineering May 23, 2025
@maltesander maltesander self-requested a review May 23, 2025 10:58
@maltesander maltesander moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering May 23, 2025
Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@labrenbe labrenbe added this pull request to the merge queue May 23, 2025
Merged via the queue into main with commit 969166a May 23, 2025
14 checks passed
@labrenbe labrenbe deleted the fix/disable-host-port-validation branch May 23, 2025 12:07
@lfrancke lfrancke moved this from Development: In Review to Development: Done in Stackable Engineering May 26, 2025
@lfrancke lfrancke moved this from Development: Done to Acceptance: In Progress in Stackable Engineering May 26, 2025
@lfrancke
Copy link
Member

Is this something we should mention in the release notes?

@labrenbe
Copy link
Member Author

labrenbe commented Jun 4, 2025

Is this something we should mention in the release notes?

Yes, this is relevant to security so it should be mentioned. I've added a release note snippet to the PR description.

@lfrancke lfrancke added release-note Denotes a PR that will be considered when it comes time to generate release notes. release/25.7.0 labels Jun 4, 2025
@lfrancke lfrancke moved this from Acceptance: In Progress to Done in Stackable Engineering Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/25.7.0 release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
Development

Successfully merging this pull request may close these issues.

4 participants