Bug 1169862 - Vague ERROR message "invalid null input" appears when wrong alias given for the keystore configured in security realm.
Summary: Vague ERROR message "invalid null input" appears when wrong alias given for t...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Security
Version: 6.3.2
Hardware: All
OS: All
unspecified
low
Target Milestone: CR2
: EAP 6.4.1
Assignee: Tomas Hofman
QA Contact: Josef Cacek
URL:
Whiteboard:
Depends On:
Blocks: eap641-payload
TreeView+ depends on / blocked
 
Reported: 2014-12-02 15:04 UTC by Paramvir jindal
Modified: 2018-12-09 19:17 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
: 1221885 (view as bug list)
Environment:
Last Closed: 2017-01-17 09:59:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1221892 0 unspecified CLOSED (6.4.z) Specific ERROR message when keystore doesnt exist on filesystem 2021-02-22 00:41:40 UTC

Internal Links: 1221892

Description Paramvir jindal 2014-12-02 15:04:25 UTC
Description of problem:

When the security realm is configured to use SSL certificate and the alias given doesn't exist in the keystore provided then it should throw some wrong alias or alias not found exception instead of "invalid null input" exception.


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


How reproducible: Everytime


Steps to Reproduce:
1. Configure your ManagementRealm to use SSL certificate.
2. Provide correct name, path, password but wrong alias for the keystore
3. Start the EAP

Actual results:

20:13:24,809 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.server.controller.management.security_realm.ManagementRealm.key-manager: org.jboss.msc.service.StartException in service jboss.server.controller.management.security_realm.ManagementRealm.key-manager: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.NullPointerException: invalid null input
	at java.security.KeyStore.setEntry(KeyStore.java:1292) [rt.jar:1.6.0_45]
	at org.jboss.as.domain.management.security.JKSKeystore.load(JKSKeystore.java:118)
	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]
	... 3 more


Expected results:

Should throw some useful full exception.


Additional info:

Comment 1 Tomas Hofman 2015-03-19 11:48:47 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2363

Comment 2 Tomas Hofman 2015-04-24 08:06:19 UTC
Added another commit with a test case.

Comment 3 Rostislav Svoboda 2015-04-24 09:31:13 UTC
qa_acking, thank you for the test

Comment 5 mchoma 2015-05-15 06:57:39 UTC
Verified in 6.4.1.CP.CR2

Comment 6 Petr Penicka 2017-01-17 09:59:32 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

Comment 7 Petr Penicka 2017-01-17 10:00:25 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.


Note You need to log in before you can comment on or make changes to this bug.