public class SuperUserRoleMapper extends Object implements RoleMapper
RoleMapper
that always maps the user to the role SUPERUSER.Constructor and Description |
---|
SuperUserRoleMapper(AuthorizerConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRunAs(Set<String> mappedRoles,
String runAsRole)
Gets whether the given set of mapped roles provides a caller with the privilege to run as the given
"
runAsRole ". |
Set<String> |
mapRoles(Caller caller,
Environment callEnvironment,
Action action,
TargetAttribute attribute)
Determine the roles available for the caller for a management operation affecting an individual attribute.
|
Set<String> |
mapRoles(Caller caller,
Environment callEnvironment,
Action action,
TargetResource resource)
Determine the roles available for the caller for a management operation affecting an entire resource.
|
Set<String> |
mapRoles(Caller caller,
Environment callEnvironment,
JmxAction action,
JmxTarget target)
Determine the roles available for the caller for a JMX invocation unrelated to the management facade MBeans.
|
Set<String> |
mapRoles(Caller caller,
Environment callEnvironment,
Set<String> operationHeaderRoles)
Determine the roles available for the caller without reference to a particular action or target.
|
public SuperUserRoleMapper(AuthorizerConfiguration configuration)
public Set<String> mapRoles(Caller caller, Environment callEnvironment, Action action, TargetAttribute attribute)
RoleMapper
mapRoles
in interface RoleMapper
caller
- the caller. Cannot be null
callEnvironment
- the call environment. Cannot be null
action
- the action being authorized. Cannot be null
attribute
- the target of the action. Cannot be null
null
, but may be an empty setpublic Set<String> mapRoles(Caller caller, Environment callEnvironment, Action action, TargetResource resource)
RoleMapper
mapRoles
in interface RoleMapper
caller
- the caller. Cannot be null
callEnvironment
- the call environment. Cannot be null
action
- the action being authorized. Cannot be null
resource
- the target of the action. Cannot be null
null
, but may be an empty setpublic Set<String> mapRoles(Caller caller, Environment callEnvironment, JmxAction action, JmxTarget target)
RoleMapper
mapRoles
in interface RoleMapper
caller
- the caller. Cannot be null
callEnvironment
- the call environment. Cannot be null
action
- the action being authorized. Cannot be null
target
- the target of the action. Cannot be null
null
, but may be an empty setpublic Set<String> mapRoles(Caller caller, Environment callEnvironment, Set<String> operationHeaderRoles)
RoleMapper
mapRoles
in interface RoleMapper
caller
- the caller. Cannot be null
callEnvironment
- the call environment. Cannot be null
operationHeaderRoles
- any roles specified as headers in the operation. May be null
null
, but may be an empty setpublic boolean canRunAs(Set<String> mappedRoles, String runAsRole)
RoleMapper
runAsRole
".canRunAs
in interface RoleMapper
mappedRoles
- a set of roles obtained from a call to one of this mapper's mapRoles
methodsrunAsRole
- the role the caller wishes to run astrue
if running as runAsRole
is allowedCopyright © 2023 JBoss by Red Hat. All rights reserved.