Dear all,
I'm trying to use <security-domain> in my datasource-ds.xml to hide the plain text userid/password.
I tried the following:
My simple mysql-ds.xml:
<local-tx-datasource>
<jndi-name>MYSQL</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/jboss_db</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
</local-tx-datasource>
<security-domain>myRealm</security-domain>
Then in my login-config.xml, I try to use the original ConfiguredIdentityLoginModule class first:
<application-policy name = "myRealm">
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">root</module-option>
<module-option name = "userName">jboss_userid</module-option>
<module-option name = "password">jboss_password</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
</login-module>
</application-policy>
But when try to create a connection by my JSP, it throws the following mySQL error:
Access denied for user: 'nobody@localhost' (Using password: NO)
Could anyone tell me what's going wrong ?
Many thanks!
The topic should be:
How to use security-domain?