public class DefaultPermissionFactory extends Object implements PermissionFactory, AuthorizerConfiguration.ScopedRoleListener
PermissionFactory
implementation that supports
the WildFly default role-based access control permission scheme.Constructor and Description |
---|
DefaultPermissionFactory(RoleMapper roleMapper,
AuthorizerConfiguration authorizerConfiguration)
Creates a new
DefaultPermissionFactory |
Modifier and Type | Method and Description |
---|---|
PermissionCollection |
getRequiredPermissions(Action action,
TargetAttribute target) |
PermissionCollection |
getRequiredPermissions(Action action,
TargetResource target) |
PermissionCollection |
getRequiredPermissions(JmxAction action,
JmxTarget target) |
PermissionCollection |
getUserPermissions(Caller caller,
Environment callEnvironment,
Action action,
TargetAttribute target) |
PermissionCollection |
getUserPermissions(Caller caller,
Environment callEnvironment,
Action action,
TargetResource target) |
PermissionCollection |
getUserPermissions(Caller caller,
Environment callEnvironment,
JmxAction action,
JmxTarget target) |
void |
scopedRoleAdded(AuthorizerConfiguration.ScopedRole added)
Notification that a scoped role is being added.
|
void |
scopedRoleRemoved(AuthorizerConfiguration.ScopedRole removed)
Notification that a scoped role has been removed.
|
public DefaultPermissionFactory(RoleMapper roleMapper, AuthorizerConfiguration authorizerConfiguration)
DefaultPermissionFactory
roleMapper
- the role mapper. Cannot be null
authorizerConfiguration
- the configuration for the Authorizer
that
is using this factory. Cannot be null
public PermissionCollection getUserPermissions(Caller caller, Environment callEnvironment, Action action, TargetAttribute target)
getUserPermissions
in interface PermissionFactory
public PermissionCollection getUserPermissions(Caller caller, Environment callEnvironment, Action action, TargetResource target)
getUserPermissions
in interface PermissionFactory
public PermissionCollection getUserPermissions(Caller caller, Environment callEnvironment, JmxAction action, JmxTarget target)
getUserPermissions
in interface PermissionFactory
public PermissionCollection getRequiredPermissions(Action action, TargetAttribute target)
getRequiredPermissions
in interface PermissionFactory
public PermissionCollection getRequiredPermissions(Action action, TargetResource target)
getRequiredPermissions
in interface PermissionFactory
public PermissionCollection getRequiredPermissions(JmxAction action, JmxTarget target)
getRequiredPermissions
in interface PermissionFactory
public void scopedRoleAdded(AuthorizerConfiguration.ScopedRole added)
AuthorizerConfiguration.ScopedRoleListener
AuthorizerConfiguration
.scopedRoleAdded
in interface AuthorizerConfiguration.ScopedRoleListener
added
- the scoped rolepublic void scopedRoleRemoved(AuthorizerConfiguration.ScopedRole removed)
AuthorizerConfiguration.ScopedRoleListener
AuthorizerConfiguration
.scopedRoleRemoved
in interface AuthorizerConfiguration.ScopedRoleListener
removed
- the scoped roleCopyright © 2023 JBoss by Red Hat. All rights reserved.