Consider two MS Active Directory domains with configured crossRef to each other. EAP using AdvancedLdapLoginModule for MS AD with referrals and rolesCtxDN is set to the referral DN where user account are stored; also EAP is configured for searching roles based on users entries (mapping users to roles).
If referral users (from EAP point of view - hostname is configured for original LDAP and user is obtained as referral user - from second of domains) authenticate then they have not assigned roles from AD attribute from 'roleAttributeID' option.
I have two MS AD domains - DC=jboss,DC=test (Domain A) and DC=jboss,DC=test2 (Domain B) with crossRef.
Part of ldif for Domain A:
Part of ldif for Domain B
EAP AdvancedLdapLoginModule is configured:
Then when jduke try to authenticate to application roles TheDuke and Admin should be assigned to him.