Tapas Bose [
https://community.jboss.org/people/tapas.235711131719] created the discussion
"Programmatically access JBoss Security realm"
To view the discussion, visit:
https://community.jboss.org/message/784884#784884
--------------------------------------------------------------
I have defined a realm in standalone.xml which is:
{code}
<security-domain name="adbRealm" cache-type="default">
<authentication>
<login-module code="org.jboss.security.auth.spi.LdapLoginModule"
flag="required">
<module-option name="java.naming.factory.initial"
value="com.sun.jndi.ldap.LdapCtxFactory"/>
<module-option name="java.naming.provider.url"
value="ldap://XXX.XXX.XXX.XXX:XXXX/"/>
<module-option name="java.naming.security.authentication"
value="simple"/>
<module-option name="principalDNPrefix"
value="uid="/>
<module-option name="principalDNSuffix"
value=",ou=people,dc=x,dc=y,dc=co,dc=in"/>
<module-option name="rolesCtxDN"
value="ou=roles,dc=x,dc=y,dc=co,dc=in"/>
<module-option name="uidAttributeID"
value="uniqueMember"/>
<module-option name="matchOnUserDN" value="true"/>
<module-option name="roleAttributeID" value="cn"/>
<module-option name="roleAttributeIsDN"
value="false"/>
</login-module>
</authentication>
</security-domain>
{code}
Now I want to read the realm and want to get the URL and dn from the backend by accessing
the instance of org.jboss.security.auth.spi.LdapLoginModule corresponds to security-domain
adbRealm or any other way. So that I can have these two properties.
Is it possible? Any pointer would be very helpful.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/784884#784884]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]