Support Questions

Find answers, ask questions, and share your expertise

NiFi admin question - redirect http to https

I have setup LDAP authentication and https for nifi. I am trying to figure out if someone tries a http url, how to redirect that request to the https url instead of getting a page isn't working error. I know it can be done with web servers and load balancing software but I am looking for an answer whether it is possible through nifi and if so how to do it.

for example http://nifi.company.com:port/nifi to be routed to https://nifi.company.com:port/nifi

1 ACCEPTED SOLUTION

As NiFi uses Jetty internally for its web server capabilities, you could try using a HeaderPatternRule as described here to enable HSTS, which forces only HTTPS connections. Browsers respond to the provided Strict-Transport-Security header and know to attempt an HTTPS connection.

This isn't directly supported by NiFi though, so you would have to modify code in the application. There is an existing Apache Jira (NIFI-2437) for this to be enabled through a NiFi configuration setting.

View solution in original post

1 REPLY 1

As NiFi uses Jetty internally for its web server capabilities, you could try using a HeaderPatternRule as described here to enable HSTS, which forces only HTTPS connections. Browsers respond to the provided Strict-Transport-Security header and know to attempt an HTTPS connection.

This isn't directly supported by NiFi though, so you would have to modify code in the application. There is an existing Apache Jira (NIFI-2437) for this to be enabled through a NiFi configuration setting.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.