Interface DbAclWriter
- All Known Implementing Classes:
DbAclWriteClient
,EtcdDbAclGuiHelper
,EtcdDbAclProvider
,MysqlDbAclGuiHelper
,MysqlDbAclProvider
,PermissionFilterProviderEtcdImpl
,PermissionFilterProviderMysqlImpl
,UnauthenticatedPermissionFilterProviderEtcdImpl
,UnauthenticatedPermissionFilterProviderMysqlImpl
-
Method Summary
Modifier and TypeMethodDescriptionint
Adds an ACL entry.int
Adds a Column ACL entry.void
addGroupStrategy
(String group, String strategy) For AccountFilterGenerator() there are two levels of mappings.int
addInputTableEditor
(String group, String ns, String table, boolean canEdit) Adds an entry to the ACL database for editing an input table.void
addMembership
(String user, List<String> groups) Adds a user to a list of groupsint
addOrUpdateSystemUserAcl
(String user, String systemUser) Inserts or Updates an entry to the ACL database for run-as mappingint
addPublicKeyForUser
(String user, PublicKey publicKey, String comment) Adds a public key for the user into the ACL database.void
addStrategyAccount
(String strategy, String account) For AccountFilterGenerator() there are two levels of mappings.void
Adds a user to the Iris system.void
changePassword
(String user, String passwordHash) Changes the password for a user.void
deleteAcls
(String group, String ns, String table) Deletes an ACL entry for a group and table.void
Deletes all data in the ACL store.void
deleteColumnAcls
(String group, String ns, String table, String columns) Deletes a Column ACL entry for a group, table, and column set.void
deleteGroup
(String group) Deletes a group.void
deleteGroupStrategy
(String group, String strategy) For AccountFilterGenerator() there are two levels of mappings.void
deleteInputTableEditor
(String group, String ns, String table) Deletes an entry to the ACL database for editing an input table.boolean
deletePublicKeyForUser
(String user, PublicKey publicKey) Delete the public key from the ACL database, if it exists.void
deleteStrategyAccount
(String strategy, String account) For AccountFilterGenerator() there are two levels of mappings.void
deleteSystemUserAcl
(String user) Removes an entry from the ACL database for run-as mappingvoid
deleteUser
(String user) The user is deleted.void
removeMembership
(String user, List<String> groups) Removes a user from a list of groups.int
Changes an already existent ACL entry.int
Changes an already existent Column ACL entry.int
updateInputTableEditor
(String group, String ns, String table, boolean canEdit) Updates an entry to the ACL database for editing an input table.
-
Method Details
-
addMembership
Adds a user to a list of groupsIf the user could not be added to all the groups, a RuntimeException is thrown.
- Parameters:
user
- the user to add to the groupsgroups
- a list of groups to add the user to- Throws:
AclStoreException
- if the underlying operation could not be completed
-
removeMembership
Removes a user from a list of groups.It is possible that the user may be removed from some groups and not others. If the user could not be removed from all the specified groups (e.g., because they are not a member of those groups), a runtime exception is thrown.
- Parameters:
user
- the user to remove from groupsgroups
- a list of groups to remove the user from- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteGroup
Deletes a group.The group is removed from all user to group mappings, all group to strategy mappings. All table ACLs and input table editors that reference the group are deleted.
- Parameters:
group
- the group to delete.- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteUser
The user is deleted.Deletes the user's group, followed by deleting any other user to group associations for the user.
If managed authentication is enabled, also deletes the user's password.
- Parameters:
user
- the user to delete- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addGroupStrategy
For AccountFilterGenerator() there are two levels of mappings. Group to strategy and strategy to account.This will add a group to the intermediate "strategy".
- Parameters:
group
- the group to map to a strategystrategy
- the strategy that the group is added to- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteGroupStrategy
For AccountFilterGenerator() there are two levels of mappings. Group to strategy and strategy to account.This will remove a group from the intermediate "strategy".
- Parameters:
group
- the group to remove a mapping to a strategystrategy
- the strategy that the group is removed from- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addStrategyAccount
For AccountFilterGenerator() there are two levels of mappings. Group to strategy and strategy to account.This will add an account to the intermediate "strategy".
- Parameters:
strategy
- the strategy that the account is added toaccount
- the account to add to a strategy- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteStrategyAccount
For AccountFilterGenerator() there are two levels of mappings. Group to strategy and strategy to account.This will remove an account from the intermediate "strategy".
- Parameters:
strategy
- the strategy that the account is added toaccount
- the account to add to a strategy- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addAcl
Adds an ACL entry.No ACL entry may currently exist for the group and table in question.
- Parameters:
group
- the group to add the entry forns
- the namespace to add the entry for ("*" for all namespaces)table
- the tablename to add the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")acl
- the ACL to add, see Acl Documentation.- Returns:
- the number of rows within the ACL database that were modified.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
updateAcl
Changes an already existent ACL entry.An ACL entry must currently exist for the group and table in question.
- Parameters:
group
- the group to update the entry forns
- the namespace to update the entry for ("*" for all namespaces)table
- the tablename to update the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")acl
- the new ACL, see Acl Documentation.- Returns:
- the number of rows within the ACL database that were modified.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteAcls
Deletes an ACL entry for a group and table.- Parameters:
group
- the group to remove the entry forns
- the namespace to remove the entry for ("*" for all namespaces)table
- the tablename to remove the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addColumnAcl
int addColumnAcl(String group, String ns, String table, String columns, String acl) throws AclStoreException Adds a Column ACL entry.No ACL entry may currently exist for the group and table in question.
- Parameters:
group
- the group to add the entry forns
- the namespace to add the entry for ("*" for all namespaces)table
- the tablename to add the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")columns
- the columns the ACL applies toacl
- the ACL to add, see Acl Documentation.- Returns:
- the number of rows within the ACL database that were modified.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
updateColumnAcl
int updateColumnAcl(String group, String ns, String table, String columns, String acl) throws AclStoreException Changes an already existent Column ACL entry.An ACL entry must currently exist for the group, table, and column set in question.
- Parameters:
group
- the group to update the entry forns
- the namespace to update the entry for ("*" for all namespaces)table
- the tablename to update the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")columns
- the columns the ACL applies toacl
- the new ACL, see Acl Documentation.- Returns:
- the number of rows within the ACL database that were modified.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteColumnAcls
void deleteColumnAcls(String group, String ns, String table, String columns) throws AclStoreException Deletes a Column ACL entry for a group, table, and column set.- Parameters:
group
- the group to remove the entry forns
- the namespace to add the entry for ("*" for all namespaces)table
- the tablename to add the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")columns
- the applicable columns set- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addInputTableEditor
int addInputTableEditor(String group, String ns, String table, boolean canEdit) throws AclStoreException Adds an entry to the ACL database for editing an input table.- Parameters:
group
- the group to add the entry forns
- the namespace to add the entry for ("*" for all namespaces)table
- the tablename to add the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")canEdit
- whether the table is editable for this group- Returns:
- the number of rows within the ACL database that were modified.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
updateInputTableEditor
int updateInputTableEditor(String group, String ns, String table, boolean canEdit) throws AclStoreException Updates an entry to the ACL database for editing an input table.- Parameters:
group
- the group to update the entry forns
- the namespace to update the entry for ("*" for all namespaces)table
- the tablename to update the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")canEdit
- whether the table is editable for this group- Returns:
- the number of rows within the ACL database that were modified.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteInputTableEditor
Deletes an entry to the ACL database for editing an input table.- Parameters:
group
- the group to delete the entry forns
- the namespace to delete the entry for ("*" for all namespaces)table
- the tablename to delete the entry for ("*" for all tables within a namespace, if ns is "*" table must also be "*")- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addOrUpdateSystemUserAcl
Inserts or Updates an entry to the ACL database for run-as mapping- Parameters:
user
- the user whose system-user mapping is to be updatedsystemUser
- the system-user which will be used for launching workers- Returns:
- the number of rows within the ACL database that were modified
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteSystemUserAcl
Removes an entry from the ACL database for run-as mapping- Parameters:
user
- the user whose system-user mapping is to be deleted- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addUser
Adds a user to the Iris system.- Parameters:
user
- the user to add.passwordHash
- the APR1 hash of the user's password. Ignored if the system is not configured to manage user authentication.- Throws:
AclStoreException
- if the underlying operation could not be completed
-
changePassword
Changes the password for a user.- Parameters:
user
- the user to change a password for.passwordHash
- the APR1 hash of the user's password.- Throws:
AclStoreException
- if the underlying operation could not be completed
-
addPublicKeyForUser
Adds a public key for the user into the ACL database.- Parameters:
user
- The identifier for the user.publicKey
- The user's public key.comment
- An optional comment.- Returns:
- The number of rows within the ACL database that were modified.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deletePublicKeyForUser
Delete the public key from the ACL database, if it exists.- Parameters:
user
- The user whose public key is to be deleted.publicKey
- The public key to remove.- Returns:
- True if the key was deleted.
- Throws:
AclStoreException
- if the underlying operation could not be completed
-
deleteAllAclData
Deletes all data in the ACL store. Use judiciously.- Throws:
AclStoreException
- if the underlying operation could not be completed
-