Jboss EAP Migration - Legacy Security to Elytron Security

292 Views Asked by At

Can you please the purpose of the below default security domains and how it can be migrated to Elytron Security.


<subsystem xmlns="urn:jboss:domain:security:1.2">
    <security-domains>
        <security-domain name="other" cache-type="default">
            <authentication>
                <login-module code="Remoting" flag="optional">
                    <module-option name="password-stacking" value="useFirstPass"/>
                </login-module>
                <login-module code="RealmDirect" flag="required">
                    <module-option name="password-stacking" value="useFirstPass"/>
                </login-module>
            </authentication>
        </security-domain>
        <security-domain name="jboss-web-policy" cache-type="default">
            <authorization>
                <policy-module code="Delegating" flag="required"/>
            </authorization>
        </security-domain>
        <security-domain name="jboss-ejb-policy" cache-type="default">
            <authorization>
                <policy-module code="Delegating" flag="required"/>
            </authorization>
        </security-domain>
    </security-domains> </subsystem>

I used the Elytron cli tool to migrate from legacy to Elytron and these seems to be removed.

1

There are 1 best solutions below

0
ilyasg On

Hi There is no way to convert this configuration to elytron directly, but I can help you for this part :

<security-domain name="other" cache-type="default">
                    <authentication>
                        <login-module code="Remoting" flag="optional">
                            <module-option name="password-stacking" value="useFirstPass"/>
                        </login-module>
                        <login-module code="RealmDirect" flag="required">
                            <module-option name="password-stacking" value="useFirstPass"/>
                        </login-module>
                    </authentication>
</security-domain>

You need to add under undertow so your configuration should look like so :

<subsystem xmlns="urn:jboss:domain:undertow:12.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">
            <buffer-cache name="default"/>
            <server name="default-server">
                [...]
            <application-security-domains>
                <application-security-domain name="other" security-domain="YoursecurityDomain"/>
            </application-security-domains>
 </subsystem>