Why does stacking multiple custom login modules within the same security-domain fail on JBoss EAP 6 and 7?

Solution In Progress - Updated -

Issue

Why does stacking multiple custom login modules within the same security-domain fail on JBoss EAP 6 and 7?

Stacking Multiple Custom LoginModules. Both modules are defined as modules and are placed in the modules section of JBoss installation. Using the custom login modules seperatly works just fine. Both can be found and loaded. But when stacking them together the loading of the modules fails.

We want to use two customize login modules in same application. If the authentication for the first one is failed we need switch to the second module. How can we configure these two module in standalone-full.xml and how can get JBoss configured/loaded modules in application ?

I have two login modules (an authentication module and an authorization module) in different JBoss modules, but it seems like JBoss tries to find both login modules in the second JBoss module

Example:

<security-domain name="ima-security-domain" cache-type="default">
  <authentication>
    <login-module code="a.AuthenticationModule" flag="required" module="a:1">
      <module-option name="password-stacking" value="useFirstPass"></module>
    </login-module>
    <login-module code="b.AuthorizationModule" flag="required" module="b:1">
      <module-option name="password-stacking" value="useFirstPass"></module>
    </login-module>
  </authentication>
</security-domain>

In this case I expect a.AuthenticationModule to be loaded and initialized from JBoss module "a:1" and b.AuthorizationModule to be loaded and initialized from JBoss module "b:1".

If I add "a.AuthenticationModule.class" to the JBoss module "b:1" it will initialize both login modules, but it loads a.AuthenticationModule from JBoss module "b:1" not from "a:1" as I would expected.

It seems like the last JBoss module specification are use for both login modules.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content