How to make a dummy security-domain?

Latest response

We are using the JBoss generic resource adapter to connect to JMS queues on Tibco EMS server. We don't use any authentication to connect to Tibo EMS, that is we connect without username and password. However, the configuration of the resource adapter requires a recovery element (for XA recovery) that specifies some kind of authentication, see [1].
Someone mentioned that we might be able to define a custom security domain that always authenticates or returns empty username and passwords. (Specifying empty username or password directly in the recover element is not allowed)

Does anyone know how to make such a dummy security-domain?

[1] https://access.redhat.com/site/solutions/361463

Responses

Are you actually getting any errors or just WARNINGS to tell you that no recovery element has been is configured? If it's just a WARN you may be better off ignoring it than "hacking" a fake security domain.

It is a warning, but the result is that XA recovery is disabled.

This snippet in standalone.xml did the trick:

    <subsystem xmlns="urn:jboss:domain:security:1.2">
        <security-domains>
            <security-domain name="no-authentication" cache-type="default">
                <authentication>
                    <login-module code="ConfiguredIdentity" flag="required">
                        <module-option name="username" value=""/>
                        <module-option name="password" value=""/>
                        <module-option name="principal" value=""/>
                    </login-module>
                </authentication>
            </security-domain>
        </security-domains>
    </subsystem>