0 Replies Latest reply on Oct 8, 2011 8:47 AM by iabughosh

    mask datasource password

    iabughosh Master

      Dears,

      I'm trying to mask Datasource password in AS 6 final but it is not working, I saw the security guide and this discussion

      my configuration files are like this :

       

      login-config.xml :

      <application-policy name="EncryptMySQLDbPassword">

             <authentication>

                 <login-module code="org.jboss.resource.security.SecureIdentityLoginModule"

                                                          flag="required">

                     <module-option name="username">user</module-option>

                     <module-option name="password">encryptedpassword</module-option>

                     <module-option name="managedConnectionFactoryName">jboss.jca:name=DocxDS,service=LocalTxCM</module-option>

                 </login-module>

             </authentication>

         </application-policy>

       

      and i have this line in my *-ds.xml file :

      <security-domain>EncryptMySQLDbPassword</security-domain>

       

      this is the exception i get when i test the connection :

      2011-10-08 15:16:22,983 WARN  [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] (ResourceContainer.invoker.nonDaemon-3) Failed to create connection for jdbc:mysql://192.168.1.100:3306/db: Access denied for user ''@'%' to database 'db'

      2011-10-08 15:16:22,983 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (ResourceContainer.invoker.nonDaemon-3) Throwable while attempting to get a new connection: null: org.jboss.resource.JBossResourceException: Could not create connection using any of the URLs: [jdbc:mysql://192.168.1.100:3306/docx]

                at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getHALocalManagedConnection(LocalManagedConnectionFactory.java:311) [:6.0.0.Final]

                at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:211) [:6.0.0.Final]

                at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:648) [:6.0.0.Final]

                at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:272) [:6.0.0.Final]

                at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:690) [:6.0.0.Final]

                at org.jboss.resource.connectionmanager.JBossManagedConnectionPool.internalTestConnection(JBossManagedConnectionPool.java:347) [:6.0.0.Final]

                at org.jboss.resource.connectionmanager.JBossManagedConnectionPool.testConnection(JBossManagedConnectionPool.java:402) [:6.0.0.Final]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_23]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_23]

                at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_23]

                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]

                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]

                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]

                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]

                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]

                at org.jboss.system.microcontainer.ServiceControllerContext.invoke(ServiceControllerContext.java:194) [:2.2.0.GA]

                at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:61) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:58) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.execute(BasicKernelBus.java:71) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus.invoke(LifecycleAwareKernelBus.java:57) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:85) [:0.2.2]

                at org.jboss.profileservice.plugins.management.util.AbstractManagedComponentRuntimeDispatcher.invoke(AbstractManagedComponentRuntimeDispatcher.java:135) [:0.2.2]

                at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:93) [:0.2.2]

                at sun.reflect.GeneratedMethodAccessor575.invoke(Unknown Source) [:1.6.0_23]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_23]

                at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_23]

                at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) [:1.0.1.GA]

                at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:99) [:6.0.0.Final]

                at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898) [:6.0.0.Final]

                at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106) [:6.0.0.Final]

                at org.jboss.remoting.Client.invoke(Client.java:1961) [:6.0.0.Final]

                at org.jboss.remoting.Client.invoke(Client.java:804) [:6.0.0.Final]

                at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60) [:1.0.1.GA]

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74) [:1.0.1.GA]

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65) [:1.0.1]

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

                at org.jboss.aop.generatedproxies.AOPProxy$0.invoke(AOPProxy$0.java)

                at org.jboss.profileservice.management.client.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:63) [:6.0.0.Final]

                at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:216)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_23]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_23]

                at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_23]

                at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)

                at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [:1.6.0_23]

                at java.util.concurrent.FutureTask.run(Unknown Source) [:1.6.0_23]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_23]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_23]

                at java.lang.Thread.run(Unknown Source) [:1.6.0_23]