Bug 1299102
Summary: | [GSS](6.4.z) NPE when calling write-attribute on the keystore-password in SecurityRealmAddHandler.java:643 | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Brad Maxwell <bmaxwell> |
Component: | Security | Assignee: | Radovan Netuka <rnetuka> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Josef Cacek <jcacek> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.4.5 | CC: | anmiller, bbaranow, bdawidow, darran.lofthouse, ihradek, jtruhlar, ppalaga, pskopek, rnetuka |
Target Milestone: | CR1 | ||
Target Release: | EAP 6.4.12 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://github.com/jbossas/jboss-eap/pull/2746 | ||
Whiteboard: | eap6412-proposed | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-01-17 13:10:39 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1375585 |
Description
Brad Maxwell
2016-01-15 23:38:56 UTC
Looking at the code, there is definitely something wrong. Just see SecurityRealmChildWriteAttributeHandler#recreateParentService. This method calls SecurityRealmAddHandler.INSTANCE.installServices with newControllers hardcoded as null. Let's see (simplified) call stack 1. SecurityRealmChildWriteAttributeHandler#recreateParentService 2. SecurityRealmAddHandler#installServices 3. SecurityRealmAddHandler#addSSLServices In [1], the value is passed as hardcoded null. It is not overwritten anywhere inside [2], so the variable remains set to null and is passed to [3]. Here, the code tries to call a method on this variable, thus a NullPointerException. I've tried both fixes (as baranowb) suggested above. Unfortunatelly, the application hangs for 5 minutes after which the result is "failed" anyway. By running setup.sh When setting up incorrect password and performing reload (last commands of setup.sh), if you then try to change the keystore password again, it triggers restartServices=true and then removeServices inside RestartParentWriteAttributeHandler#applyUpdateToRuntime This subsequently calls awaitContainerStability is called with timeout 300000 (= 5 mins) in OperationContextImpl#ensureWriteLockForRuntime. But at this point, the container has incorrect keystore password set in standalone.xml, thus is not stable and the operation fails after the timeout. Nor the remove nor writing the new password is performed. The change above fixes the NullPointerException. The third setting of keystore password still fails (now after 5 min timeout), but this is caused by the fact that the container has invalid configuration (wrong keystore password) and every CLI operation first waits for container validity. Since it's not valid, the operation fails with restart-required message. After container restart, the keystore password can be changed without problems. Verified with EAP 6.4.12.CP.CR1; Note: Regarding the timeout, changing the password is still working as @Radovan explained in comment 11. Retroactively bulk-closing issues from released EAP 6.4 cummulative patches. |