-
1. Re: Wildfly 8.2: EJBs in WARs now inherit the WAR security domain
jaikiran Nov 22, 2014 12:32 AM (in response to pgarner)1 of 1 people found this helpfulHere's the feature request which explains the issue [WFLY-3102] EJB in WAR should inherit WAR's security domain - JBoss Issue Tracker which was present in previous versions.
-
2. Re: Re: Wildfly 8.2: EJBs in WARs now inherit the WAR security domain
pgarner Nov 22, 2014 10:49 AM (in response to jaikiran)Oh ok. I took a look at the WFLY-3102 description, which says, "If you define an EJB within WEB-INF/classes it does not inherit the security domain from the WAR file and defaults to 'other'. Counter-intuitive, IMO. Not sure if it is easily fixable though."
Just to make sure I understand correctly... The EJB security domain is set by the
<
s:security-domain
>
element in jboss-ejb3.xml. In the following example the security domain would be "mySecurityDomain."<?xml version="1.1" encoding="UTF-8"?>
<jboss:ejb-jar
xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:security:1.1"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
version="3.1"
impl-version="2.0"><assembly-descriptor>
<s:security>
<ejb-name>*</ejb-name>
<s:security-domain>mySecurityDomain</s:security-domain>
</s:security>
</assembly-descriptor>
</jboss:ejb-jar>
And, from what I now gather, prior to WFLY-3102 the EJB security domain would default to "other" in the absence of <s:security-domain> entry in jboss-ejb3.xml even though jboss-web.xml's <security-domain> was set to a certain value (in the example below, "mySecurityDomain"). But after WFLY-3102 the EJB security domain defaults to the <security-domain> value in jboss-web.xml. Is this correct? If so, now we can remove the <s:security-domain> entry in jboss-ejb3.xml if it's value is identical to the <security-domain> value in jboss-web.xml? Is this also correct?
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web><security-domain>mySecurityDomain</security-domain>
<use-jboss-authorization>true</use-jboss-authorization>
</jboss-web>
-
3. Re: Wildfly 8.2: EJBs in WARs now inherit the WAR security domain
jaikiran Nov 23, 2014 10:36 PM (in response to pgarner)Patrick Garner wrote:
And, from what I now gather, prior to WFLY-3102 the EJB security domain would default to "other" in the absence of <s:security-domain> entry in jboss-ejb3.xml even though jboss-web.xml's <security-domain> was set to a certain value (in the example below, "mySecurityDomain"). But after WFLY-3102 the EJB security domain defaults to the <security-domain> value in jboss-web.xml. Is this correct?
Yes, that's correct.
Patrick Garner wrote:
If so, now we can remove the <s:security-domain> entry in jboss-ejb3.xml if it's value is identical to the <security-domain> value in jboss-web.xml? Is this also correct?
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web><security-domain>mySecurityDomain</security-domain>
<use-jboss-authorization>true</use-jboss-authorization>
</jboss-web>
Yes, that's correct too.