Package akka.javasdk.annotations
Annotation Interface Acl
Defines ACL configuration for a resource.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @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
Optional ElementsModifier 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.int
The status code to respond with when access is denied.
-
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
int denyCodeThe status code to respond with when access is denied.By default, this will be '403 Forbidden' for HTTP endpoints and 'PERMISSION DENIED (7)' for gRPC endpoints. If set at class-level, it will automatically be inherited by all methods in the class that are not annotated with their own @Acl definition. For HTTP, common used values are between 400 and 599, see exhaustive list at https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes For gRPC, the status codes values can be consulted at https://grpc.github.io/grpc/core/md_doc_statuscodes.html
- Default:
-1
-