public class PermissionsValidationProcessor extends Object implements org.jboss.as.server.deployment.DeploymentUnitProcessor
DeploymentUnitProcessor
that validates the security permissions that have been granted
to the deployments. The permissions granted via subsystem (minimum-set
) combined with those granted via deployment
descriptors (permissions.xml
and jboss-permissions.xml
) must be implied by the maximum-set
.
Permissions that are internally granted by the container are ignored as those are always granted irrespective of the
maximum-set
configuration.
This processor must be installed into Phase.POST_MODULE
because it needs the
deployment module's ClassLoader
to load the permissions from the descriptors and that is only available after
the module has been created.Constructor and Description |
---|
PermissionsValidationProcessor(List<org.jboss.modules.security.PermissionFactory> maxPermissions)
Creates an instance of this
DeploymentUnitProcessor . |
Modifier and Type | Method and Description |
---|---|
void |
deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) |
void |
undeploy(org.jboss.as.server.deployment.DeploymentUnit context) |
public PermissionsValidationProcessor(List<org.jboss.modules.security.PermissionFactory> maxPermissions)
DeploymentUnitProcessor
.maxPermissions
- a List
containing the maximum set of configurable permissions a deployment can have.
In other words, all permissions in the minimum set plus the permissions parsed in
META-INF/permissions.xml (or jboss-permissions.xml) must be implied by the maximum set.public void deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) throws org.jboss.as.server.deployment.DeploymentUnitProcessingException
deploy
in interface org.jboss.as.server.deployment.DeploymentUnitProcessor
org.jboss.as.server.deployment.DeploymentUnitProcessingException
public void undeploy(org.jboss.as.server.deployment.DeploymentUnit context)
undeploy
in interface org.jboss.as.server.deployment.DeploymentUnitProcessor
Copyright © 2018 JBoss by Red Hat. All rights reserved.