nifi.properties
The following key parameters for Kerberos are added to nifi.properties
:
Kerberos client authentication.
If you want NiFi to use Kerberos for user authentication:
nifi.kerberos.service.principal=nifi/_HOST@YOUR_REALM
nifi.kerberos.service.keytab.location=/path/to/nifi.keytab
nifi.kerberos.service.principal
is the Kerberos principal to be used by NiFi. Typically this is nifi/hostname@REALM
._HOST
is replaced by the name of the host on which NiFi is running.nifi.kerberos.service.keytab.location
is the path to the keytab file that contains the credentials for the principal.
Kerberos for LDAP/Active Directory Authentication
If you are using Kerberos in conjunction with LDAP or Active Directory for authentication:
nifi.kerberos.spnego.principal=nifi/_HOST@YOUR_REALM
nifi.kerberos.spnego.keytab.location=/path/to/spnego.keytab
nifi.kerberos.spnego.principal
- SPNEGO principal used for authentication via Kerberos.nifi.kerberos.spnego.keytab.location
- path to the keytab file for SPNEGO.If NiFi nodes in your cluster must also authenticate with each other using Kerberos:
nifi.cluster.node.kerberos.principal=nifi/_HOST@YOUR_REALM
nifi.cluster.node.kerberos.keytab.location=/path/to/cluster.keytab
nifi.cluster.nuster.node.kerberos.principal
- the principal used by the cluster nodes to authenticate with each other.nifi.cluster.node.node.kerberos.keytab.location
- the path to the keytab file for the cluster nodes.krb5.conf
You must make sure that the krb5.conf
file (usually found in /etc/krb5.conf
) is configured correctly and contains all the necessary parameters for your Kerberos realm.
JVM Options
Add JVM options to point to krb5.conf
if required:
java.arg.kerberos=-Djava.security.krb5.conf=/etc/krb5.conf
This parameter can be added to the NiFi startup scripts (nifi-env.sh
).
Verify that Keytab files are available and contain the correct credentials.
Verify that all nodes in the NiFi cluster can obtain Kerberos tickets using the kinit
command.
Verify that NiFi is successfully using Kerberos for authentication by running it and checking the logs for Kerberos-related errors.
In a nutshell, these settings are needed if you need to consider