Class DbAuthorizationState
java.lang.Object
io.camunda.zeebe.engine.state.authorization.DbAuthorizationState
- All Implemented Interfaces:
AuthorizationState,MutableAuthorizationState
public class DbAuthorizationState
extends Object
implements AuthorizationState, MutableAuthorizationState
-
Constructor Summary
ConstructorsConstructorDescriptionDbAuthorizationState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateOrAddPermission(long ownerKey, AuthorizationResourceType resourceType, PermissionType permissionType, List<String> resourceIds) Checks if a Permission exists for the provided ownerKey, resourceType and permissionType.getOwnerType(long ownerKey) getResourceIdentifiers(Long ownerKey, AuthorizationResourceType resourceType, PermissionType permissionType) voidinsertOwnerTypeByKey(long ownerKey, AuthorizationOwnerType ownerType) Stores the owner type for a new owner in the state.
-
Constructor Details
-
DbAuthorizationState
public DbAuthorizationState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext)
-
-
Method Details
-
createOrAddPermission
public void createOrAddPermission(long ownerKey, AuthorizationResourceType resourceType, PermissionType permissionType, List<String> resourceIds) Description copied from interface:MutableAuthorizationStateChecks if a Permission exists for the provided ownerKey, resourceType and permissionType. If it does, adds the resourceIds to this entry. If it does not, creates a new Permission with the provided resourceIds.- Specified by:
createOrAddPermissionin interfaceMutableAuthorizationState- Parameters:
ownerKey- the key of the owner of the permissions. This could be a userKey, a roleKey or a groupKeyresourceType- the type of resource the permissions are for (Eg. Process definition, Job)permissionType- The type of permission being granted (Eg. READ, WRITE)resourceIds- A list of resourceIds the permissions are granted for (Eg. bpmnProcessId:foo, *)
-
insertOwnerTypeByKey
Description copied from interface:MutableAuthorizationStateStores the owner type for a new owner in the state.- Specified by:
insertOwnerTypeByKeyin interfaceMutableAuthorizationState- Parameters:
ownerKey- the key of the ownerownerType- the type of the owner
-
getResourceIdentifiers
public ResourceIdentifiers getResourceIdentifiers(Long ownerKey, AuthorizationResourceType resourceType, PermissionType permissionType) - Specified by:
getResourceIdentifiersin interfaceAuthorizationState
-
getOwnerType
- Specified by:
getOwnerTypein interfaceAuthorizationState
-