public class MemoryDacHandler extends DiscretionaryAccessController
| Constructor and Description |
|---|
MemoryDacHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addGroupsToResource(String resourceType,
String resourceName,
String action,
List<String> groups)
Allow given groups to access the given resource.
|
void |
addResource(String resourceType,
String resourceName,
String owner)
Create auth resource.
|
boolean |
changeResourceOwner(String resourceType,
String resourceName,
String owner)
Create auth resource.
|
boolean |
deleteResource(String resourceType,
String resourceName)
Delete auth resource.
|
AuthResource |
getAuthResource(String resourceType,
String resourceName)
Get auth resource.
|
void |
initialize(io.ballerina.messaging.broker.common.StartupContext startupContext,
UserStore userStore,
Map<String,String> properties)
Initialize authorization controller based on given auth configuration, user store.
|
boolean |
removeGroupFromResource(String resourceType,
String resourceName,
String action,
String group)
Revoke access from the given group.
|
authorizepublic void initialize(io.ballerina.messaging.broker.common.StartupContext startupContext,
UserStore userStore,
Map<String,String> properties)
DiscretionaryAccessControllerinitialize in class DiscretionaryAccessControllerstartupContext - the startup context provides registered services in brokeruserStore - user storeproperties - propertiespublic void addResource(String resourceType, String resourceName, String owner) throws AuthServerException
DiscretionaryAccessControlleraddResource in class DiscretionaryAccessControllerresourceType - resource typeresourceName - resource nameowner - resource ownerAuthServerException - throws if an server error occurredpublic boolean deleteResource(String resourceType, String resourceName) throws AuthServerException
DiscretionaryAccessControllerdeleteResource in class DiscretionaryAccessControllerresourceType - resource typeresourceName - resource nameAuthServerException - throws if an server error occurredpublic boolean addGroupsToResource(String resourceType, String resourceName, String action, List<String> groups) throws AuthServerException
DiscretionaryAccessControlleraddGroupsToResource in class DiscretionaryAccessControllerresourceType - resource typeresourceName - resource nameaction - actiongroups - list of groupAuthServerException - throws if server error occurredpublic boolean removeGroupFromResource(String resourceType, String resourceName, String action, String group) throws AuthServerException, AuthNotFoundException
DiscretionaryAccessControllerremoveGroupFromResource in class DiscretionaryAccessControllerresourceType - resource typeresourceName - resource nameaction - actiongroup - groupAuthServerException - throws if an server error occurredAuthNotFoundException - throws if the resource is not foundpublic boolean changeResourceOwner(String resourceType, String resourceName, String owner) throws AuthServerException
DiscretionaryAccessControllerchangeResourceOwner in class DiscretionaryAccessControllerresourceType - resource typeresourceName - resource nameowner - newOwnerAuthServerException - throws if an server error occurredpublic AuthResource getAuthResource(String resourceType, String resourceName) throws AuthServerException
DiscretionaryAccessControllergetAuthResource in class DiscretionaryAccessControllerresourceType - resource typeresourceName - resource nameAuthServerException - throws if an server error occurredCopyright © 2018 WSO2. All rights reserved.