Package akka.javasdk.annotations
Annotation Interface Acl
Defines ACL configuration for a resource.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static @interface
A principal matcher that can be used in an ACL.static enum
This enum contains principal matchers that don't have any configuration, such as a name, associated with them, for ease of reference in annotations. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionPrincipals that are allowed to access this resource.After matching an allow rule, an incoming request that has at least one principal that matches a deny rule will be denied.The status code to respond with when access is denied.boolean
Iftrue
, indicates that thedenyCode
should be inherited from the parent.
-
Element Details
-
allow
Acl.Matcher[] allowPrincipals that are allowed to access this resource. An incoming request must have at least one principal associated with it in this list to be allowed.- Default:
{}
-
deny
Acl.Matcher[] denyAfter matching an allow rule, an incoming request that has at least one principal that matches a deny rule will be denied.- Default:
{}
-
denyCode
Acl.DenyStatusCode denyCodeThe status code to respond with when access is denied.By default, this will be 'Forbidden', but alternatives might include 'Authentication required' or 'Not Found'.
- Default:
FORBIDDEN
-
inheritDenyCode
boolean inheritDenyCodeIftrue
, indicates that thedenyCode
should be inherited from the parent. If set totrue
in the top most parent - like theMain
class - then it will be equivalent to setdenyCode
to 'FORBIDDEN'- Default:
false
-