[JCA/JBoss] - Re: LoginModule with oracle datasource
by vickyk
Try this
<application-policy name="EncryptDBPassword">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
| flag = "required">
| <module-option name="usersProperties">props1/users.properties</module-option>
| <module-option name="rolesProperties">props1/roles.properties</module-option>
| </login-module>
| <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
| <module-option name="username">scott</module-option>
| <module-option name="password">-170dd0fbd8c13748</module-option>
| <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDSJAAS</module-option>
| </login-module>
| </authentication>
| </application-policy>
You have to use the multiple login modules for authentication .
You would be having the web tier which would be using the DataSource , the subject would be populated using that secured web tier .
If you don't have secured web tier then the Login module would not populate the security credentials and thus you would get the exception what you are seeing .....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095881#4095881
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095881
18Â years, 9Â months
[JCA/JBoss] - LoginModule with oracle datasource
by ubersloth
Hi, everyone.
I am new to JBoss, and am using version 4.2.1GA.
I attempt to configure an oracle data source to use a LoginModule, but I keep getting the following error when I try to get a connection to it:
Invalid authentication attempt, principal=null
ava.lang.SecurityException: Invalid authentication attempt, principal=null org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:589) org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:395) org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842) org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
Has anyone ever encountered this error, or to put it another way, has anyone been able to configure an oracle data source to use a Login Module?
My login-config.xml:
| <application-policy name="MyDomain">
| <authentication>
| <login-module code = "org-jboss.resource.security.SecureIdentityLoginModule" flag = "required">
| <module-option name="username">hr</module-option>
| <module-option name="password">5dfc52b51bd35553df8592078de921bc</module-option>
| <module-option name="managedConnectionFactoryName">jboss.jca:name=java:jdbc/hr_connDS,service=LocalTxCM</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
My oracle-ds.xml:
| <datasources>
| <local-tx-datasource>
| <jndi-name>jdbc/hr_connDS</jndi-name>
| <connection-url>jdbc:oracle:thin:@192.168.41.69:1521:ORCL</connection-url>
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <security-domain>MyDomain</security-domain>
| <min-pool-size>20</min-pool-size>
| <max-pool-size>100</max-pool-size>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </local-tx-datasource>
|
| </datasources>
Any comments would be greatly, greatly appreciated.
Elad.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095879#4095879
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095879
18Â years, 9Â months