Package io.aeron.security
Class SimpleAuthorisationService
java.lang.Object
io.aeron.security.SimpleAuthorisationService
- All Implemented Interfaces:
AuthorisationService
Authorisation service that supports setting general and per-principal rules as well as scoping to protocol, action,
and type. Uses a fluent API to add authorisation rules.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder to create the authorisation service. -
Field Summary
Fields inherited from interface io.aeron.security.AuthorisationService
ALLOW_ALL, ALLOW_ALL_NAME, DENY_ALL, DENY_ALL_NAME -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAuthorised(int protocolId, int actionId, Object type, byte[] encodedPrincipal) Checks if the client with authenticated credentials is allowed to perform an action indicated by the givenactionId.
-
Method Details
-
isAuthorised
Checks if the client with authenticated credentials is allowed to perform an action indicated by the givenactionId.- Specified by:
isAuthorisedin interfaceAuthorisationService- Parameters:
protocolId- of the protocol to which the action belongs, e.g. a SBE schema id.actionId- of the command being checked, e.g. a SBE message template id.type- optional type for the action being checked, may benull. For example for an admin request in the cluster it will containAdminRequestTypevalue which denotes the exact kind of the request.encodedPrincipal- that has been authenticated.- Returns:
trueif the client is authorised to execute the action orfalseotherwise.
-