Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi admin question - redirect http to https

avatar
Contributor

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

avatar

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

avatar

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.