public interface AuthorityProvider
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(String identity,
String group)
Add the specified user.
|
DownloadAuthorization |
authorizeDownload(List<String> proxyChain,
Map<String,String> attributes)
Determines whether the user in the specified dnChain should be able to
download the content for the flowfile with the specified attributes.
|
boolean |
doesDnExist(String identity) |
Set<Authority> |
getAuthorities(String identity)
Get the authorities for the specified user.
|
String |
getGroupForUser(String identity)
Gets the group for the specified user.
|
Set<String> |
getUsers(Authority authority)
Gets the users for the specified authority.
|
void |
initialize(AuthorityProviderInitializationContext initializationContext)
Called immediately after instance creation for implementers to perform
additional setup
|
void |
onConfigured(AuthorityProviderConfigurationContext configurationContext)
Called to configure the AuthorityProvider.
|
void |
preDestruction()
Called immediately before instance destruction for implementers to
release resources.
|
void |
revokeGroup(String group)
Revokes all users for a specified group.
|
void |
revokeUser(String identity)
Revokes the specified user.
|
void |
setAuthorities(String identity,
Set<Authority> authorities)
Sets the specified authorities for the specified user.
|
void |
setUsersGroup(Set<String> identity,
String group)
Adds the specified users to the specified group.
|
void |
ungroup(String group)
Ungroups the specified group.
|
void |
ungroupUser(String identity)
Ungroups the specified user.
|
boolean doesDnExist(String identity) throws AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.AuthorityAccessExceptionSet<Authority> getAuthorities(String identity) throws UnknownIdentityException, AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.UnknownIdentityException - if identity is not knownAuthorityAccessException - if unable to access authoritiesvoid setAuthorities(String identity, Set<Authority> authorities) throws UnknownIdentityException, AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.authorities - the new authorities for the userUnknownIdentityException - if identity is not knownAuthorityAccessException - if unable to access authoritiesSet<String> getUsers(Authority authority) throws AuthorityAccessException
authority - for which to determine membership ofAuthorityAccessException - if unable to access authoritiesvoid revokeUser(String identity) throws UnknownIdentityException, AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.UnknownIdentityException - if the user is not knownAuthorityAccessException - if unable to access the authoritiesvoid addUser(String identity, String group) throws IdentityAlreadyExistsException, AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.group - OptionalUnknownIdentityException - if the user is not knownAuthorityAccessException - if unable to access the authoritiesIdentityAlreadyExistsExceptionString getGroupForUser(String identity) throws UnknownIdentityException, AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.UnknownIdentityException - if the user is not knownAuthorityAccessException - if unable to access the authoritiesvoid revokeGroup(String group) throws UnknownIdentityException, AuthorityAccessException
group - to revoke the users ofUnknownIdentityException - if the user is not knownAuthorityAccessException - if unable to access the authoritiesvoid setUsersGroup(Set<String> identity, String group) throws UnknownIdentityException, AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.group - to add users toUnknownIdentityException - if the user is not knownAuthorityAccessException - if unable to access the authoritiesvoid ungroupUser(String identity) throws UnknownIdentityException, AuthorityAccessException
identity - of the user. The identity may be a dn, an email, a username, or any string that identities the user.UnknownIdentityException - if the user is not knownAuthorityAccessException - if unable to access the authoritiesvoid ungroup(String group) throws AuthorityAccessException
group - to ungroupAuthorityAccessException - if unable to access the authoritiesDownloadAuthorization authorizeDownload(List<String> proxyChain, Map<String,String> attributes) throws UnknownIdentityException, AuthorityAccessException
proxyChain - proxy chain of user identities that for the download requestattributes - of the flowfile being requestedUnknownIdentityException - if the user is not knownAuthorityAccessException - if unable to access the authoritiesvoid initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException
initializationContext - in which to initializeProviderCreationExceptionvoid onConfigured(AuthorityProviderConfigurationContext configurationContext) throws ProviderCreationException
configurationContext - at the time of configurationProviderCreationException - for any issues configuring the providervoid preDestruction()
throws ProviderDestructionException
ProviderDestructionException - If pre-destruction fails.Copyright © 2016 Apache NiFi Project. All rights reserved.