Apache NiFi Registry Administration
Also available as:
PDF

Authorizers.xml Setup

The authorizers.xml file is used to define and configure available authorizers. The default authorizer is the StandardManagedAuthorizer. The managed authorizer is comprised of a UserGroupProvider and a AccessPolicyProvider. The users, group, and access policies will be loaded and optionally configured through these providers. The managed authorizer will make all access decisions based on these provided users, groups, and access policies.

During startup there is a check to ensure that there are no two users/groups with the same identity/name. This check is executed regardless of the configured implementation. This is necessary because this is how users/groups are identified and authorized during access decisions.

The default UserGroupProvider is the FileUserGroupProvider, however, you can develop additional UserGroupProviders as extensions. The FileUserGroupProvider has the following properties:

  • Users File - The file where the FileUserGroupProvider stores users and groups. By default, users.xml in the conf directory is chosen.

  • Initial User Identity - The identity of a user or system to seed an empty Users File. Multiple Initial User Identity properties can be specified, but the name of each property must be unique, for example: "Initial User Identity A", "Initial User Identity B", "Initial User Identity C" or "Initial User Identity 1", "Initial User Identity 2", "Initial User Identity 3"

Initial User Identities are only created if the specified Users File is missing or empty during NiFi Registry startup. Changes to the configured Initial Users Identities will not take effect if the Users File is populated.

Another option for the UserGroupProvider is the LdapUserGroupProvider. By default, this option is commented out but can be configured in lieu of the FileUserGroupProvider. This will sync users and groups from a directory server and will present them in NiFi Registry UI in read only form. The LdapUserGroupProvider has the following properties:

  • Authentication Strategy - How the connection to the LDAP server is authenticated. Possible values are ANONYMOUS, SIMPLE, LDAPS, or START_TLS

  • Manager DN - The DN of the manager that is used to bind to the LDAP server to search for users.

  • Manager Password - The password of the manager that is used to bind to the LDAP server to search for users.

  • TLS - Keystore - Path to the Keystore that is used when connecting to LDAP using LDAPS or START_TLS.

  • TLS - Keystore Password - Password for the Keystore that is used when connecting to LDAP using LDAPS or START_TLS.

  • TLS - Keystore Type - Type of the Keystore that is used when connecting to LDAP using LDAPS or START_TLS (i.e. JKS or PKCS12).

  • TLS - Truststore - Path to the Truststore that is used when connecting to LDAP using LDAPS or START_TLS.

  • TLS - Truststore Password - Password for the Truststore that is used when connecting to LDAP using LDAPS or START_TLS.

  • TLS - Truststore Type - Type of the Truststore that is used when connecting to LDAP using LDAPS or START_TLS (i.e. JKS or PKCS12).

  • TLS - Client Auth - Client authentication policy when connecting to LDAP using LDAPS or START_TLS. Possible values are REQUIRED, WANT, NONE.

  • TLS - Protocol - Protocol to use when connecting to LDAP using LDAPS or START_TLS. (i.e. TLS, TLSv1.1, TLSv1.2, etc).

  • TLS - Shutdown Gracefully - Specifies whether the TLS should be shut down gracefully before the target context is closed. Defaults to false.

  • Referral Strategy - Strategy for handling referrals. Possible values are FOLLOW, IGNORE, THROW.

  • Connect Timeout - Duration of connect timeout. (i.e. 10 secs).

  • Read Timeout - Duration of read timeout. (i.e. 10 secs).

  • Url - Space-separated list of URLs of the LDAP servers (i.e. ldap://<hostname>:<port>).

  • Page Size - Sets the page size when retrieving users and groups. If not specified, no paging is performed.

  • Sync Interval - Duration of time between syncing users and groups. (i.e. 30 mins).

  • User Search Base - Base DN for searching for users (i.e. ou=users,o=nifi). Required to search users.

  • User Object Class - Object class for identifying users (i.e. person). Required if searching users.

  • User Search Scope - Search scope for searching users (ONE_LEVEL, OBJECT, or SUBTREE). Required if searching users.

  • User Search Filter - Filter for searching for users against the User Search Base (i.e. (memberof=cn=team1,ou=groups,o=nifi) ). Optional.

  • User Identity Attribute - Attribute to use to extract user identity (i.e. cn). Optional. If not set, the entire DN is used.

  • User Group Name Attribute - Attribute to use to define group membership (i.e. memberof). Optional. If not set group membership will not be calculated through the users. Will rely on group membership being defined through Group Member Attribute if set.

  • Group Search Base - Base DN for searching for groups (i.e. ou=groups,o=nifi). Required to search groups.

  • Group Object Class - Object class for identifying groups (i.e. groupOfNames). Required if searching groups.

  • Group Search Scope - Search scope for searching groups (ONE_LEVEL, OBJECT, or SUBTREE). Required if searching groups.

  • Group Search Filter - Filter for searching for groups against the Group Search Base. Optional.

  • Group Name Attribute - Attribute to use to extract group name (i.e. cn). Optional. If not set, the entire DN is used.

  • Group Member Attribute - Group Member Attribute - Attribute to use to define group membership (i.e. member). Optional. If not set group membership will not be calculated through the groups. Will rely on group member being defined through User Group Name Attribute if set.

Another option for the UserGroupProvider are composite implementations. This means that multiple sources/implementations can be configured and composed. For instance, an admin can configure users/groups to be loaded from a file and a directory server. There are two composite implementations, one that supports multiple UserGroupProviders and one that supports multiple UserGroupProviders and a single configurable UserGroupProvider.

The CompositeUserGroupProvider will provide support for retrieving users and groups from multiple sources. The CompositeUserGroupProvider has the following properties:

  • User Group Provider - The identifier of user group providers to load from. The name of each property must be unique, for example: "User Group Provider A", "User Group Provider B", "User Group Provider C" or "User Group Provider 1", "User Group Provider 2", "User Group Provider 3"

The CompositeConfigurableUserGroupProvider will provide support for retrieving users and groups from multiple sources. Additionally, a single configurable user group provider is required. Users from the configurable user group provider are configurable, however users loaded from one of the User Group Provider [unique key] will not be. The CompositeConfigurableUserGroupProvider has the following properties:

  • Configurable User Group Provider - A configurable user group provider.

  • User Group Provider - The identifier of user group providers to load from. The name of each property must be unique, for example: "User Group Provider A", "User Group Provider B", "User Group Provider C" or "User Group Provider 1", "User Group Provider 2", "User Group Provider 3"

After you have configured a UserGroupProvider, you must configure an AccessPolicyProvider that will control Access Policies for the identities in the UserGroupProvider. The default AccessPolicyProvider is the FileAccessPolicyProvider, however, you can develop additional AccessPolicyProvider as extensions. The FileAccessPolicyProvider has the following properties:

  • User Group Provider - The identifier for an User Group Provider defined above that will be used to access users and groups for use in the managed access policies.

  • Authorizations File - The file where the FileAccessPolicyProvider will store policies. By default, authorizations.xml in the conf directory is chosen.

  • Initial Admin Identity - The identity of an initial admin user that will be granted access to the UI and given the ability to create additional users, groups, and policies. For example, a certificate DN, LDAP identity, or Kerberos principal.

  • NiFi Identity - The identity of a NiFi instance/node that will be accessing this registry. Each NiFi Identity will be granted permission to proxy user requests, as well as read any bucket to perform synchronization status checks.

The identities configured in the Initial Admin Identity and NiFi Identity properties must be available in the configured User Group Provider. Initial Admin Identity and NiFi Identity properties are only read by NiFi Registry when the Authorizations File is missing or empty on startup in order to seed the initial Authorizations File. Changes to the configured Initial Admin Identity and NiFi Identities will not take effect if the Authorizations File is populated.

The default Authorizer is the StandardManagedAuthorizer, however, you can develop additional Authorizers as extensions. The StandardManagedAuthorizer has the following properties:

  • Access Policy Provider - The identifier for an Access Policy Provider defined above.