Class DelegatingConfigurableAuthorizer
java.lang.Object
org.jboss.as.controller.access.management.DelegatingConfigurableAuthorizer
- All Implemented Interfaces:
Authorizer,JmxAuthorizer
A
Authorizer that delegates to another. Used for initial boot to allow
an instance of this class to be provided to the ModelController but then have the
functional implementation swapped out when boot proceeds to the point where the user-configured
authorizer is available.- Author:
- Brian Stansberry (c) 2013 Red Hat Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.as.controller.access.Authorizer
Authorizer.AuthorizerDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorize(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, Action action, TargetAttribute target) Authorize a management operation affecting an individual attribute.authorize(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, Action action, TargetResource target) Authorize a management operation affecting an entire resource.authorizeJmxOperation(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, JmxAction action, JmxTarget target) Authorize a JMX operation.getCallerRoles(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, Set<String> runAsRoles) Gets the set of roles the caller can run as taking into account any requested 'run as' roles.Gets a description of the characteristics of this authorizerbooleanGets whether JMX calls to non-facade mbeans (i.e. those that result in invocations toAuthorizer.authorizeJmxOperation(org.jboss.as.controller.access.Caller, org.jboss.as.controller.access.Environment, org.jboss.as.controller.access.JmxAction, org.jboss.as.controller.access.JmxTarget)) should be treated as 'sensitive'.voidsetDelegate(Authorizer delegate) voidsetNonFacadeMBeansSensitive(boolean sensitive) Sets whether JMX calls to non-facade mbeans (i.e. those that result in invocations toAuthorizer.authorizeJmxOperation(org.jboss.as.controller.access.Caller, org.jboss.as.controller.access.Environment, org.jboss.as.controller.access.JmxAction, org.jboss.as.controller.access.JmxTarget)) should be treated as 'sensitive'.voidshutdown()
-
Constructor Details
-
DelegatingConfigurableAuthorizer
public DelegatingConfigurableAuthorizer()
-
-
Method Details
-
getWritableAuthorizerConfiguration
-
setDelegate
-
getCallerRoles
public Set<String> getCallerRoles(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, Set<String> runAsRoles) Description copied from interface:AuthorizerGets the set of roles the caller can run as taking into account any requested 'run as' roles.- Specified by:
getCallerRolesin interfaceAuthorizer- Parameters:
identity- the caller identity. Cannot benullcallEnvironment- the call environment. Cannot benullrunAsRoles- any requested 'run as' roles. May benull- Returns:
- The set of roles assigned to the caller; an empty set will be returned if no roles are assigned or
nullwill be returned if the access control provider does not support role mapping.
-
getDescription
Description copied from interface:AuthorizerGets a description of the characteristics of this authorizer- Specified by:
getDescriptionin interfaceAuthorizer- Returns:
- the description. Cannot be
null
-
authorize
public AuthorizationResult authorize(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, Action action, TargetAttribute target) Description copied from interface:AuthorizerAuthorize a management operation affecting an individual attribute.- Specified by:
authorizein interfaceAuthorizer- Parameters:
identity- the caller identity. Cannot benullcallEnvironment- the call environment. Cannot benullaction- the action being authorized. Cannot benulltarget- the target of the action. Cannot benull- Returns:
- the authorization result. Will not be
null
-
authorize
public AuthorizationResult authorize(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, Action action, TargetResource target) Description copied from interface:AuthorizerAuthorize a management operation affecting an entire resource.- Specified by:
authorizein interfaceAuthorizer- Parameters:
identity- the identity. Cannot benullcallEnvironment- the call environment. Cannot benullaction- the action being authorized. Cannot benulltarget- the target of the action. Cannot benull- Returns:
- the authorization result. Will not be
null
-
authorizeJmxOperation
public AuthorizationResult authorizeJmxOperation(org.wildfly.security.auth.server.SecurityIdentity identity, Environment callEnvironment, JmxAction action, JmxTarget target) Description copied from interface:AuthorizerAuthorize a JMX operation. This operation should NOT be called for the management facade MBeans- Specified by:
authorizeJmxOperationin interfaceAuthorizer- Parameters:
identity- the caller identity. Cannot benullcallEnvironment- the call environment. Cannot benullaction- the action being authorized. Cannot benulltarget- the target of the action. Cannot benull- Returns:
- the authorization result. Will not be
null
-
setNonFacadeMBeansSensitive
public void setNonFacadeMBeansSensitive(boolean sensitive) Description copied from interface:JmxAuthorizerSets whether JMX calls to non-facade mbeans (i.e. those that result in invocations toAuthorizer.authorizeJmxOperation(org.jboss.as.controller.access.Caller, org.jboss.as.controller.access.Environment, org.jboss.as.controller.access.JmxAction, org.jboss.as.controller.access.JmxTarget)) should be treated as 'sensitive'.- Specified by:
setNonFacadeMBeansSensitivein interfaceJmxAuthorizer- Parameters:
sensitive-trueif non-facade mbean calls are sensitive;falseotherwise
-
shutdown
public void shutdown() -
isNonFacadeMBeansSensitive
public boolean isNonFacadeMBeansSensitive()Description copied from interface:JmxAuthorizerGets whether JMX calls to non-facade mbeans (i.e. those that result in invocations toAuthorizer.authorizeJmxOperation(org.jboss.as.controller.access.Caller, org.jboss.as.controller.access.Environment, org.jboss.as.controller.access.JmxAction, org.jboss.as.controller.access.JmxTarget)) should be treated as 'sensitive'.- Specified by:
isNonFacadeMBeansSensitivein interfaceJmxAuthorizer- Returns:
trueif non-facade mbean calls are sensitive;falseotherwise
-