Community Articles
Find and share helpful community-sourced technical articles
Labels (2)

The HDF 3.1 release supports single-sign on to NiFi using KnoxSSO. This article will assume you've already completed setting up KnoxSSO, as discussed in part I and part II of this series.

We'll further assume that NiFi has been configured for baseline security, as documented in this HCC article.

Once the websso topology has been defined in your Knox configuration, the steps to make NiFi a participating application in KnoxSSO are straightforward.

A couple of notes: 1) make sure is blank, since you'll be using the KnoxSSO topology's authentication method--i.e., a JWT-based Federation Provider--to gain access to the NiFi UI, and 2) make sure the value for knoxsso.token.ttl is reasonable, the default is 30000 ms, or 30 s. A larger value like 36000000--or 10 hours--likely makes sense for production environments.

Once the websso topology has been defined for KnoxSSO, as discussed in part I and part II of this series, we'll need to grab the Knox server's public key in order to configure NiFi as a participating application. You can use this snippet, where ${knoxserver} is the host running the Knox Gateway

openssl s_client -connect ${knoxserver}:8443</dev/null| openssl x509 -out /tmp/knox.pem

You can then copy the knox.pem file that gets created in /tmp to the NiFi host(s) that require this public key to verify the validity of the token signed by Knox. We'll copy knox.pem to /usr/hdf/current/nifi/conf on the NiFi host(s), for this example.

We are now ready to configure NiFi, there are only three properties that are required:


Please note that we should replace the value with the KnoxSSO URL specific to our environment.