-
-
Notifications
You must be signed in to change notification settings - Fork 7
Patch NiFi to allow disabling the host header check #694
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
Conversation
…than it solves in a Kubernetes environment.
…low disabling it with a config setting.
Haven't looked at the details but please rename the patch files to contain the target version as well (see e.g. HBase and others). |
Is it okay to have a range of versions in there? The same patch applies across a lot of NiFi versions, that file wasn't touched a lot it seems. |
nifi/stackable/patches/1.21.0/002-NIFI-no-host-header-check-1.21.0.patch
Outdated
Show resolved
Hide resolved
…t the moment. Since 1.21.x will be removed soon, we will probably never build it from source and the presence of patchfiles here would just confuse everybody. Added a README to say why it is not being used but present.
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.
Thanks!
Do I understand correctly that this is in preparation for adding the necessary support in the operator so there is nothing to document here? |
Exactly 👍 |
Description
NiFi has the configuration option 'nifi.web.proxy.host' which controls allowed
values for the host header field in any incoming request for the web ui.
This frequently causes issues when trying to expose the NiFi UI via for example
an ingress, loadbalancer or any similar type of mechanism.
NiFi does not allow to disable this behavior, so at the moment the nifi operator
simply hardcodes all even remotely possible values into this field.
But in order to allow putting for example in ingress in front of NiFi this means
using config overrides to change the value of this option, copy all the values
the operator put in there and add the extra value you need.
This is less than ideal, the proper solution would probably be
stackabletech/nifi-operator#604
But until that is merged this is a simple workaround that allows overriding the list of allowed
hostnames by just setting it to "*" and this will effectively bypass the hostname check entirely if set.
This allows us to keep the default behavior in place for those users where it works and not remove
security features, but also enables users to disable this check if they know what they are doing.
Definition of Done Checklist
TIP: Running integration tests with a new product image
The image can be built and uploaded to the kind cluster with the following commands:
See the output of
bake
to retrieve the image tag for<image-tagged-with-the-major-version>
.