public interface AuthorityProvider
Modifier and Type | Method and Description |
---|---|
void |
addUser(String dn,
String group)
Add the specified user.
|
DownloadAuthorization |
authorizeDownload(List<String> dnChain,
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 dn) |
Set<Authority> |
getAuthorities(String dn)
Get the authorities for the specified user.
|
String |
getGroupForUser(String dn)
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 dn)
Revokes the specified user.
|
void |
setAuthorities(String dn,
Set<Authority> authorities)
Sets the specified authorities for the specified user.
|
void |
setUsersGroup(Set<String> dn,
String group)
Adds the specified users to the specified group.
|
void |
ungroup(String group)
Ungroups the specified group.
|
void |
ungroupUser(String dn)
Ungroups the specified user.
|
boolean doesDnExist(String dn) throws AuthorityAccessException
dn
- of the userAuthorityAccessException
Set<Authority> getAuthorities(String dn) throws UnknownIdentityException, AuthorityAccessException
dn
- of the user to lookupUnknownIdentityException
- if identity is not knownAuthorityAccessException
- if unable to access authoritiesvoid setAuthorities(String dn, Set<Authority> authorities) throws UnknownIdentityException, AuthorityAccessException
dn
- the specified userauthorities
- 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 dn) throws UnknownIdentityException, AuthorityAccessException
dn
- the dn of the userUnknownIdentityException
- if the user is not knownAuthorityAccessException
- if unable to access the authoritiesvoid addUser(String dn, String group) throws IdentityAlreadyExistsException, AuthorityAccessException
dn
- of the usergroup
- OptionalUnknownIdentityException
- if the user is not knownAuthorityAccessException
- if unable to access the authoritiesIdentityAlreadyExistsException
String getGroupForUser(String dn) throws UnknownIdentityException, AuthorityAccessException
dn
- the userUnknownIdentityException
- 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> dn, String group) throws UnknownIdentityException, AuthorityAccessException
dn
- the set of users to add to the groupgroup
- to add users toUnknownIdentityException
- if the user is not knownAuthorityAccessException
- if unable to access the authoritiesvoid ungroupUser(String dn) throws UnknownIdentityException, AuthorityAccessException
dn
- of the userUnknownIdentityException
- 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> dnChain, Map<String,String> attributes) throws UnknownIdentityException, AuthorityAccessException
dnChain
- of the userattributes
- 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 initializeProviderCreationException
void 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 © 2015 Apache NiFi Project. All rights reserved.