I'm using Jenkins build 1241. When I declare datasources in standalone.xml with <user-name> and <password>, there is no problem.
However, when I declare a security domain (java:/swe1DS is the datasource's jndi name):
<security-domain name="verschluesseltesDbPassword" cache-type="default">
<authentication>
<login-module code="SecureIdentity" flag="required">
<module-option name="username" value="swe2"/>
<module-option name="password" value="..."/>
<module-option name="managedConnectionFactoryName" value="jboss.jca:name=swe2DS,service=LocalTxCM"/>
</login-module>
</authentication>
</security-domain>
and changed the <security> section inside the datasource definition to
<security-domain>verschluesseltesDbPassword</security-domain>
then I get this stacktrace, when JBoss 7 is launched:
17:11:33,816 ERROR [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-1) Exception during createSubject()Unauthenticated caller:null: java.lang.SecurityException: Unauthenticated caller:null
at org.jboss.security.plugins.JBossSecuritySubjectFactory.createSubject(JBossSecuritySubjectFactory.java:83)
at org.jboss.jca.deployers.common.AbstractDsDeployer$1.run(AbstractDsDeployer.java:979)
at org.jboss.jca.deployers.common.AbstractDsDeployer$1.run(AbstractDsDeployer.java:959)
at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]
at org.jboss.jca.deployers.common.AbstractDsDeployer.createSubject(AbstractDsDeployer.java:958)
at org.jboss.jca.deployers.common.AbstractDsDeployer.deployDataSource(AbstractDsDeployer.java:507)
at org.jboss.jca.deployers.common.AbstractDsDeployer.createObjectsAndInjectValue(AbstractDsDeployer.java:246)
at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer.deploy(AbstractDataSourceService.java:241)
at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.start(AbstractDataSourceService.java:105)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]