Bug 1221892

Summary: (6.4.z) Specific ERROR message when keystore doesnt exist on filesystem
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: mchoma
Component: SecurityAssignee: Tomas Hofman <thofman>
Status: CLOSED CURRENTRELEASE QA Contact: mchoma
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4.1CC: anmiller, bdawidow, bmaxwell, cdewolf, darran.lofthouse, fgavrilo, ihradek, pskopek, thofman
Target Milestone: CR1   
Target Release: EAP 6.4.17   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-06 13:31:55 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: 1450092    

Description mchoma 2015-05-15 07:32:27 UTC
Description of problem:

When the security realm is configured to use SSL certificate and the given keystore doesn't exist on filesystem it throws "alias not found in keystore". What is actually true, but it would be more user-friendly if exception will be more specific like "keystore not found".

Version-Release number of selected component (if applicable):


How reproducible: Everytime


Steps to Reproduce:
1. Configure your ManagementRealm to use SSL certificate.
2. Provide path to keystore which doesnt exist on filesystem
3. Start the EAP

Actual results:

17:31:00,570 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.server.controller.management.security_realm.ManagementRealmHTTPS.key-manager: org.jboss.msc.service.StartException in service jboss.server.controller.management.security_realm.ManagementRealmHTTPS.key-manager: JBAS021012: Key store entry not found for alias: appserver
	at org.jboss.as.domain.management.security.JKSKeystore.load(JKSKeystore.java:119)
	at org.jboss.as.domain.management.security.JKSKeyManagerService.start(JKSKeyManagerService.java:100)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]


Expected results:

Should throw "keystore not found" exception.

Comment 1 Tomas Hofman 2015-05-18 09:03:13 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2428/files

No upstream.

Test case was also updated to cover this modification.

Comment 3 Mike McCune 2016-03-28 23:39:55 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 Ivo Hradek 2017-08-07 05:42:18 UTC
Verified for EAP-6.4.17-CP.CR3;

Comment 5 Petr Penicka 2017-09-06 13:31:55 UTC
Released on 2017-09-05 as part of the EAP 6.4.17 release.