[JBoss JIRA] (WFLY-6485) add JPA dependency in subdeployments to avoid NPE
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-6485?page=com.atlassian.jira.plugin.... ]
Scott Marlow closed WFLY-6485.
------------------------------
Resolution: Done
> add JPA dependency in subdeployments to avoid NPE
> --------------------------------------------------
>
> Key: WFLY-6485
> URL: https://issues.jboss.org/browse/WFLY-6485
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, JPA / Hibernate
> Affects Versions: 10.0.0.Final
> Reporter: Scott Marlow
> Assignee: Scott Marlow
> Priority: Blocker
> Fix For: 10.1.0.Final
>
>
> WeldDeploymentProcessor only processes top level deployments (jpa dependencies for subdeployments are skipped). This means that subdeployments that CDI inject a persistence unit/context, will not add a dependency on the JPA PersistenceUnitService. As a result, the PersistenceUnitService is referenced before it is started (which leads to PersistenceUnitService.entityManagerFactory being null).
> We should avoid the following NPE by ensuring that dependencies on the JPA persistence unit are added for all sub-deployments.
> {quote}
> Caused by: java.lang.NullPointerException
> at org.jboss.as.jpa.container.TransactionScopedEntityManager.createEntityManager(TransactionScopedEntityManager.java:186)
> at org.jboss.as.jpa.container.TransactionScopedEntityManager.getEntityManager(TransactionScopedEntityManager.java:91)
> at org.jboss.as.jpa.container.AbstractEntityManager.find(AbstractEntityManager.java:212)
> {quote}
> Potential fix is at [https://github.com/scottmarlow/wildfly/tree/jpaNPE]
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6467) Some tests from "org.jboss.as.test.integration.security.loginmodules.*" fail with security manager
by Ivo Studensky (JIRA)
[ https://issues.jboss.org/browse/WFLY-6467?page=com.atlassian.jira.plugin.... ]
Ivo Studensky reassigned WFLY-6467:
-----------------------------------
Assignee: Ivo Studensky (was: Jan Tymel)
> Some tests from "org.jboss.as.test.integration.security.loginmodules.*" fail with security manager
> --------------------------------------------------------------------------------------------------
>
> Key: WFLY-6467
> URL: https://issues.jboss.org/browse/WFLY-6467
> Project: WildFly
> Issue Type: Bug
> Components: Test Suite
> Reporter: Jan Tymel
> Assignee: Ivo Studensky
>
> *org.jboss.as.test.integration.security.loginmodules.CustomLoginModuleTestCase#testSuccessfulAuth*
> *org.jboss.as.test.integration.security.loginmodules.CustomLoginModuleTestCase#testUnsuccessfulAuth*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.security.loginmodules.CustomLoginModuleTestCase -Dsecurity.manager}}
> Fail with:
> {code}
> java.lang.AssertionError: expected:<302> but was:<200>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:834)
> at org.junit.Assert.assertEquals(Assert.java:645)
> at org.junit.Assert.assertEquals(Assert.java:631)
> at org.jboss.as.test.integration.security.loginmodules.CustomLoginModuleTestCase.makeCall(CustomLoginModuleTestCase.java:202)
> at org.jboss.as.test.integration.security.loginmodules.CustomLoginModuleTestCase.testSuccessfulAuth(CustomLoginModuleTestCase.java:153)
> {code}
> *org.jboss.as.test.integration.security.loginmodules.RunAsLoginModuleTestCase#testCleartextPassword1*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.security.loginmodules.RunAsLoginModuleTestCase#testCleartextPassword1 -Dsecurity.manager}}
> Fails with:
> {code}
> java.lang.AssertionError: An unexpected response: <html><head><title>Error</title></head><body>Unauthorized</body></html>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.jboss.as.test.integration.security.loginmodules.RunAsLoginModuleTestCase.testCleartextPassword1(RunAsLoginModuleTestCase.java:172)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6468) Some tests from "org.jboss.as.test.integration.security.vault.*" fail with security manager
by Ivo Studensky (JIRA)
[ https://issues.jboss.org/browse/WFLY-6468?page=com.atlassian.jira.plugin.... ]
Ivo Studensky reassigned WFLY-6468:
-----------------------------------
Assignee: Ivo Studensky (was: Jan Tymel)
> Some tests from "org.jboss.as.test.integration.security.vault.*" fail with security manager
> -------------------------------------------------------------------------------------------
>
> Key: WFLY-6468
> URL: https://issues.jboss.org/browse/WFLY-6468
> Project: WildFly
> Issue Type: Bug
> Components: Test Suite
> Reporter: Jan Tymel
> Assignee: Ivo Studensky
>
> *org.jboss.as.test.integration.security.vault.ExternalPasswordCommandsTestCase#testCmdPassword*
> *org.jboss.as.test.integration.security.vault.ExternalPasswordCommandsTestCase#testExtPassword*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.security.vault.ExternalPasswordCommandsTestCase -Dsecurity.manager}}
> Fail with:
> {code}
> [io.undertow.request] (default task-1) UT005023: Exception handling request to /vault//check: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "org.jboss.security.vault.SecurityVaultFactory.get")" in code source "(vfs:/content/vault.war/WEB-INF/classes <no signer certificates>)" of "null")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
> at org.jboss.security.vault.SecurityVaultFactory.get(SecurityVaultFactory.java:58)
> at org.jboss.security.vault.SecurityVaultFactory.get(SecurityVaultFactory.java:44)
> at org.jboss.security.vault.SecurityVaultUtil.getValue(SecurityVaultUtil.java:92)
> at org.jboss.as.test.integration.security.vault.CheckVaultedPassServlet.doGet(CheckVaultedPassServlet.java:59)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1$1.run(ServletInitialHandler.java:181)
> at java.security.AccessController.doPrivileged(Native Method)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:178)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:792)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> *org.jboss.as.test.integration.security.vault.VaultDatasourceTestCase#testAccessThroughVaultDatasource*
> *org.jboss.as.test.integration.security.vault.VaultDatasourceTestCase#testRejectWrongPasswordThroughVaultDatasource*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.security.vault.VaultDatasourceTestCase -Dsecurity.manager}}
> Fail with:
> {code}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "getProtectionDomain")" in code source "(vfs:/content/test.war/WEB-INF/classes <no signer certificates>)" of "null")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
> at java.lang.Class.getProtectionDomain(Class.java:2299)
> at org.jboss.as.test.integration.security.vault.VaultDatasourceTestCase.<clinit>(VaultDatasourceTestCase.java:204)
> ... 62 more
> {code}
> *org.jboss.as.test.integration.security.vault.VaultSystemPropertiesTestCase#testVaultedSystemProperty*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.security.vault.VaultSystemPropertiesTestCase#testVaultedSystemProperty -Dsecurity.manager}}
> Fails with:
> {code}
> SEVERE [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-3-thread-1) Failed: org.jboss.as.test.integration.security.vault.VaultSystemPropertiesTestCase.testVaultedSystemProperty: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.util.PropertyPermission" "vault.testing.property" "read")" in code source "(vfs:/content/vault.war/WEB-INF/classes <no signer certificates>)" of "null")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPropertyAccess(WildFlySecurityManager.java:496)
> at java.lang.System.getProperty(System.java:717)
> at org.jboss.as.test.integration.security.vault.VaultSystemPropertiesTestCase.testVaultedSystemProperty(VaultSystemPropertiesTestCase.java:62)
> (...)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFCORE-1466) Wildfly SSL Setup Fails on HSM-Backed Keystore
by Darran Lofthouse (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1466?page=com.atlassian.jira.plugi... ]
Darran Lofthouse commented on WFCORE-1466:
------------------------------------------
Keep an eye out as we start integrating WildFly Elytron - to solve the alias selection problem we have a new KeyStore implementation coming that can wrap an underlying KeyStore and filter which aliases are exposed - this way we entirely eliminate the need to be copying entries from one store to another.
> Wildfly SSL Setup Fails on HSM-Backed Keystore
> ----------------------------------------------
>
> Key: WFCORE-1466
> URL: https://issues.jboss.org/browse/WFCORE-1466
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management, Security
> Environment: Any host environment with an HSM for key management
> Reporter: Gregory Ramsperger
> Assignee: Darran Lofthouse
> Fix For: 3.0.0.Alpha1
>
>
> Using a keystore type that does not allow or returns empty from getEncoded() on private keys causes a KeyStoreException at startup. This is common in HSM-backed key operations.
> Storing SSL keys and certs in an HSM is a common method of securing keys and offloading SSL overhead.
> FileKeyStore.java copies a KeyStore.Entry value into a JKS KeyStore but JKS and PKCS12 KeyStore implementations maintain a copy of the encoded PKCS#8 data for private keys. When applying a KeyStore.Entry from a source that does not return the data for security reasons, the import fails.
> While it's still not guaranteed to work with all KeyStore providers, switching {{KeyStore.getInstance("JKS")}} to {{KeyStore.getInstance(provider)}} fixes the issue for SafeNet "Luna" and SunPKCS11 "PKCS11" KeyStore implementations while not breaking the "PKCS12" and "JKS" cases.
> See [https://github.com/wildfly/wildfly-core/blob/master/domain-management/src...]
> Log output:
> {noformat}
> 2016-04-04 18:53:51,100 i-4b6f79d1 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.server.controller.management.security_realm.test.key-manager: org.jboss.msc.service.StartException in service jboss.server.controller.management.security_realm.test.key-manager: JBAS015229: Unable to start service
> at org.jboss.as.domain.management.security.FileKeystore.load(FileKeystore.java:148)
> at org.jboss.as.domain.management.security.FileKeyManagerService.start(FileKeyManagerService.java:119)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
> Caused by: java.security.KeyStoreException: Cannot get key bytes, not PKCS#8 encoded
> at sun.security.provider.KeyProtector.protect(KeyProtector.java:174) [rt.jar:1.8.0_60]
> at sun.security.provider.JavaKeyStore.engineSetKeyEntry(JavaKeyStore.java:267) [rt.jar:1.8.0_60]
> at sun.security.provider.JavaKeyStore$JKS.engineSetKeyEntry(JavaKeyStore.java:56) [rt.jar:1.8.0_60]
> at java.security.KeyStoreSpi.engineSetEntry(KeyStoreSpi.java:537) [rt.jar:1.8.0_60]
> at sun.security.provider.KeyStoreDelegator.engineSetEntry(KeyStoreDelegator.java:179) [rt.jar:1.8.0_60]
> at sun.security.provider.JavaKeyStore$DualFormatJKS.engineSetEntry(JavaKeyStore.java:70) [rt.jar:1.8.0_60]
> at java.security.KeyStore.setEntry(KeyStore.java:1557) [rt.jar:1.8.0_60]
> at org.jboss.as.domain.management.security.FileKeystore.load(FileKeystore.java:136)
> ... 6 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFCORE-1467) Servers are suspended two times using timeout parameter in domain mode
by Kabir Khan (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1467?page=com.atlassian.jira.plugi... ]
Kabir Khan commented on WFCORE-1467:
------------------------------------
I have updated the PR https://github.com/wildfly/wildfly-core/pull/1490 following Brian's suggestions on https://github.com/wildfly/wildfly-core/pull/1489
> Servers are suspended two times using timeout parameter in domain mode
> ----------------------------------------------------------------------
>
> Key: WFCORE-1467
> URL: https://issues.jboss.org/browse/WFCORE-1467
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Yeray Santana Borges
> Assignee: Yeray Santana Borges
>
> In a domain mode :suspend-servers command with a timeout parameter different than 0 executes two suspend operations for each server in the domain. It first executes a suspend with 0ms and later a suspend with the timeout specified.
> How to reproduce it:
> {code}
> [domain@localhost:9990 /] :suspend-servers(timeout=10)
> {code}
> Server log traces show:
> {code}
> [Server:server-one] 20:14:40,126 INFO [org.jboss.as.server] (ServerService Thread Pool -- 8) WFLYSRV0211: Suspending server with 0ms timeout.
> [Server:server-one] 20:14:40,135 INFO [org.jboss.as.server] (ServerService Thread Pool -- 8) WFLYSRV0211: Suspending server with 10000000ms timeout.
> {code}
> Expected traces are:
> {code}
> [Server:server-one] 20:14:40,135 INFO [org.jboss.as.server] (ServerService Thread Pool -- 8) WFLYSRV0211: Suspending server with 10000000ms timeout.
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month