<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Encrypting Datasource Password
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/schlumpf">Knut Klünker</a> in <i>Datasource Configuration</i> - <a href="http://community.jboss.org/message/549647#549647">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi all,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I encrypted the datasource password with the SecureIdentityLoginModule in a JBoss 5.1.GA. Everything works fine but it doesn't work with one datasource. I checked everything in the configuration and also the generated password. But it was ok.</p><p>The datasource are all Oracle 10g datasources.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In the log there is the following error:</p><p>2010-06-24 15:46:54,577 xxxxxxxx INFO  [VerboseError is false<br/>2010-06-24 15:46:55,755 xxxxx ERROR [org.jboss.resource.security.AbstractPasswordCrede<br/>ntialLoginModule] xxxxxx: The ConnectionManager mbean: <strong>jboss.jca:name=xxxxxx,service=XATxCM specified in a ConfiguredIdentityLoginModule could not be found. ConnectionFactory will be unusable!</strong><br/>javax.management.InstanceNotFoundException: <strong>jboss.jca:name=xxxxx,service=XATxCM </strong>is not registered.<br/>        at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)<br/>        at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:559)<br/>        at org.jboss.resource.security.AbstractPasswordCredentialLoginModule.getMcf(AbstractPasswordCredentialLoginModule.java<br/>:118)<br/>        at org.jboss.resource.security.AbstractPasswordCredentialLoginModule.initialize(AbstractPasswordCredentialLoginModule.<br/>java:88)<br/>        at org.jboss.resource.security.SecureIdentityLoginModule.initialize(SecureIdentityLoginModule.java:80)<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>        at java.lang.reflect.Method.invoke(Method.java:585)<br/>        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)<br/>        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)<br/>        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)<br/>        at java.security.AccessController.doPrivileged(Native Method)<br/>        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)<br/>        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)<br/>        at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(JaasSecurityManagerBase.java:552)<br/>        at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(JaasSecurityManagerBase.java:486)<br/>        at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasSecurityManagerBase.java:365)<br/>        at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:160)<br/>        at org.jboss.security.integration.JBossSecuritySubjectFactory.createSubject(JBossSecuritySubjectFactory.java:90)<br/>        at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:687)<br/>        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:495)<br/>        at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectio<br/>nManager2.java:941)<br/>        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The datasource was bound:</p><p>2010-06-24 15:44:22,391 main INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] --: Bound Connection<br/>Manager 'jboss.jca:service=DataSourceBinding,name=xxxx' to JNDI name 'java:xxxx'</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>And the in jmx-console under jca you can find the datasource under the name.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In the login-config.xml is the following policy entry:</p><p>...</p><p><application-policy name="NAMExxxx"><br/>        <authentication><br/>            <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required"><br/>                <module-option name="username">xxxx</module-option><br/>                <module-option name="password">xxxxxx</module-option><br/>                <module-option name="managedConnectionFactoryName">jboss.jca:name=xxxx,service=XATxCM</module-option><br/>            </login-module><br/>        </authentication><br/>    </application-policy></p><p>....</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Username and password are correct.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I changed the password for testing, so that is was wrong, but the ERROR messages are the same.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Can somebody help me?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Best regards</p><p>Knut</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/549647#549647">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>