Package io.helidon.security.abac.role
Class RoleValidator.RoleConfig
java.lang.Object
io.helidon.security.abac.role.RoleValidator.RoleConfig
- All Implemented Interfaces:
AbacValidatorConfig
- Enclosing class:
RoleValidator
Attribute configuration class for Role validator.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
A new builder for this class instances.static RoleValidator.RoleConfig
Will read roles allowed from configuration.static RoleValidator.RoleConfig
Create roles config from an array of allowed roles.static RoleValidator.RoleConfig
create
(Collection<String> rolesAllowed) Create roles config from a collection of allowed roles.boolean
denyAll()
Returns true if access should be denied to all.boolean
Returns true if access should be permitted to all.Set of roles required for a service.Set of roles required for a user.
-
Method Details
-
builder
A new builder for this class instances.- Returns:
- builder
-
create
Create roles config from a collection of allowed roles.- Parameters:
rolesAllowed
- roles allowed- Returns:
- instance configured with the userRolesAllowed
-
create
Create roles config from an array of allowed roles.- Parameters:
rolesAllowed
- roles allowed- Returns:
- instance configured with the userRolesAllowed
-
create
Will read roles allowed from configuration. Format (yaml):roles-allowed: user: ["role1","role2"] service: ["role3]
- Parameters:
config
- configuration located on key "roles-allowed"- Returns:
- roles config for the configuration
-
serviceRolesAllowed
Set of roles required for a service.- Returns:
- set of roles
-
userRolesAllowed
Set of roles required for a user.- Returns:
- set of roles
-
permitAll
public boolean permitAll()Returns true if access should be permitted to all.- Returns:
- permitted access to all
-
denyAll
public boolean denyAll()Returns true if access should be denied to all.- Returns:
- denied access to all
-