[
https://issues.jboss.org/browse/WFLY-10342?page=com.atlassian.jira.plugin...
]
Jan Kalina updated WFLY-10342:
------------------------------
Description:
When trying to deploy deployment containing following two EJBs, secured and unsecured,
deploying fails with "Multiple security domains not supported" exception:
{code}
21:16:30,089 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed
to start service
jboss.deployment.unit."ejb-deployment-1.0-SNAPSHOT.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."ejb-deployment-1.0-SNAPSHOT.war".POST_MODULE:
WFLYSRV0153: Failed to process phase POST_MODULE of deployment
"ejb-deployment-1.0-SNAPSHOT.war"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:150)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
at
org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0490:
Multiple security domains not supported
at
org.jboss.as.ejb3.deployment.processors.EJBDefaultSecurityDomainProcessor.deploy(EJBDefaultSecurityDomainProcessor.java:99)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
{code}
This behavior was in JBEAP-9289 considered correct for situation when one EJB references
one security domain and the second references second security domain.
It seems unsecured EJB is considered to be using default security domain.
*Workaround:* Need to set unsecured bean secured by adding:
{code}
@PermitAll
@SecurityDomain("other2") // the same as for secured ejb
{code}
was:
When following two EJBs, secured and unsecured, are deployed:
{code}
@Stateless
public class EjbUnsecured { ... }
{code}
{code}
@Stateless
@RolesAllowed("admin")
@SecurityDomain("other2")
public class EjbSecured { ... }
{code}
deploying fails with "Multiple security domains not supported":
{code}
21:16:30,089 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed
to start service
jboss.deployment.unit."ejb-deployment-1.0-SNAPSHOT.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."ejb-deployment-1.0-SNAPSHOT.war".POST_MODULE:
WFLYSRV0153: Failed to process phase POST_MODULE of deployment
"ejb-deployment-1.0-SNAPSHOT.war"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:150)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
at
org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0490:
Multiple security domains not supported
at
org.jboss.as.ejb3.deployment.processors.EJBDefaultSecurityDomainProcessor.deploy(EJBDefaultSecurityDomainProcessor.java:99)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
{code}
This behavior was in JBEAP-9289 considered correct for situation when one EJB references
one security domain and the second references second security domain.
It seems unsecured EJB is considered to be in default security domain.
*Workaround:* Need to set unsecured bean secured by adding:
{code}
@PermitAll
@SecurityDomain("other2") // the same as for secured ejb
{code}
Unsecured EJB causes "Multiple security domains" exception
----------------------------------------------------------
Key: WFLY-10342
URL:
https://issues.jboss.org/browse/WFLY-10342
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 12.0.0.Final
Reporter: Jan Kalina
Assignee: Jan Kalina
Priority: Critical
When trying to deploy deployment containing following two EJBs, secured and unsecured,
deploying fails with "Multiple security domains not supported" exception:
{code}
21:16:30,089 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001:
Failed to start service
jboss.deployment.unit."ejb-deployment-1.0-SNAPSHOT.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."ejb-deployment-1.0-SNAPSHOT.war".POST_MODULE:
WFLYSRV0153: Failed to process phase POST_MODULE of deployment
"ejb-deployment-1.0-SNAPSHOT.war"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:150)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
at
org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0490:
Multiple security domains not supported
at
org.jboss.as.ejb3.deployment.processors.EJBDefaultSecurityDomainProcessor.deploy(EJBDefaultSecurityDomainProcessor.java:99)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
{code}
This behavior was in JBEAP-9289 considered correct for situation when one EJB references
one security domain and the second references second security domain.
It seems unsecured EJB is considered to be using default security domain.
*Workaround:* Need to set unsecured bean secured by adding:
{code}
@PermitAll
@SecurityDomain("other2") // the same as for secured ejb
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)