Package org.apache.nifi.authorization
Interface ManagedAuthorizer
- All Superinterfaces:
Authorizer
- All Known Implementing Classes:
AbstractPolicyBasedAuthorizer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkInheritability
(String proposedFingerprint) When the fingerprints are not equal, this method will check if the proposed fingerprint is inheritable.void
forciblyInheritFingerprint
(String fingerprint) Parses the fingerprint and determines whether or not the fingerprint can be inherited in the same manner asinheritFingerprint(String)
.Returns the AccessPolicy provider for this managed Authorizer.Returns a fingerprint representing the authorizations managed by this authorizer.void
inheritFingerprint
(String fingerprint) Parses the fingerprint and adds any users, groups, and policies to the current Authorizer.Methods inherited from interface org.apache.nifi.authorization.Authorizer
authorize, initialize, onConfigured, preDestruction
-
Method Details
-
getFingerprint
Returns a fingerprint representing the authorizations managed by this authorizer. The fingerprint will be used for comparison to determine if two managed authorizers represent a compatible set of users, groups, and/or policies. Must be non null- Returns:
- the fingerprint for this Authorizer
- Throws:
AuthorizationAccessException
- if there was an unexpected error performing the operation
-
inheritFingerprint
Parses the fingerprint and adds any users, groups, and policies to the current Authorizer.- Parameters:
fingerprint
- the fingerprint that was obtained from calling getFingerprint() on another Authorizer.- Throws:
AuthorizationAccessException
- if there was an unexpected error performing the operation
-
forciblyInheritFingerprint
Parses the fingerprint and determines whether or not the fingerprint can be inherited in the same manner asinheritFingerprint(String)
. If so, will inherit as such. Otherwise, a backup of the existing policy provider will be made, if possible, and the policies will be replaced with those in the given fingerprint.- Parameters:
fingerprint
- the fingerprint to replace the existing policies with- Throws:
AuthorizationAccessException
- if unable to perform the operation
-
checkInheritability
void checkInheritability(String proposedFingerprint) throws AuthorizationAccessException, UninheritableAuthorizationsException When the fingerprints are not equal, this method will check if the proposed fingerprint is inheritable. If the fingerprint is an exact match, this method will not be invoked as there is nothing to inherit.- Parameters:
proposedFingerprint
- the proposed fingerprint- Throws:
AuthorizationAccessException
- if there was an unexpected error performing the operationUninheritableAuthorizationsException
- if the proposed fingerprint was uninheritable
-
getAccessPolicyProvider
AccessPolicyProvider getAccessPolicyProvider()Returns the AccessPolicy provider for this managed Authorizer. Must be non null- Returns:
- the AccessPolicy provider
-