[jboss-jira] [JBoss JIRA] (WFCORE-2484) CS tool, log exception on error

Darran Lofthouse (JIRA) issues at jboss.org
Tue Mar 7 13:16:47 EST 2017


     [ https://issues.jboss.org/browse/WFCORE-2484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Darran Lofthouse moved WFLY-8199 to WFCORE-2484:
------------------------------------------------

        Project: WildFly Core  (was: WildFly)
            Key: WFCORE-2484  (was: WFLY-8199)
    Component/s: Security
                     (was: Security)


> CS tool, log exception on error
> -------------------------------
>
>                 Key: WFCORE-2484
>                 URL: https://issues.jboss.org/browse/WFCORE-2484
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Security
>            Reporter: Martin Choma
>            Assignee: Darran Lofthouse
>            Priority: Critical
>              Labels: credential-store, wildfly-elytron-tool
>
> When I try to create CS with invalid options I get just {{ELY09526: Unable to initialize credential store}}. For example:
> * I tried JKS, but JKS is unable to store secret keys
> {code}
> [mchoma at localhost bin]$ java -jar wildfly-elytron-tool.jar credential-store --add myalias --secret supersecretpassword --location="test.store" --uri "cr-store://test?modifiable=true;create=true;keyStoreType=JKS" --password mycspassword --salt 12345678 --iteration 230 --summary
> ELY09526: Unable to initialize credential store[mchoma at localhost bin]$ 
> {code}
> * I tried BKS, but have not BC among providers
> {code}
> java -jar wildfly-elytron-tool.jar credential-store --add myalias --secret supersecretpassword --location="/tmp/test.store" --uri "cr-store://test?modifiable=true;create=true;keyStoreType=BKS" --password mycspassword --salt 12345678 --iteration 230 --summary
> ELY09526: Unable to initialize credential store
> {code}
> It would be useful if underlying exception is logged as well. For example subsystem throws this exception and it is obvious what is wrong. 
> {code}
> Caused by: org.wildfly.security.credential.store.CredentialStoreException: ELY09526: Unable to initialize credential store
> 	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.getKeyStoreInstance(KeyStoreCredentialStore.java:834)
> 	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.load(KeyStoreCredentialStore.java:758)
> 	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.initialize(KeyStoreCredentialStore.java:163)
> 	at org.wildfly.security.credential.store.CredentialStore.initialize(CredentialStore.java:119)
> 	at org.wildfly.extension.elytron.CredentialStoreService.start(CredentialStoreService.java:117)
> 	... 5 more
> Caused by: java.security.KeyStoreException: BKS not found
> 	at java.security.KeyStore.getInstance(KeyStore.java:851)
> 	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.getKeyStoreInstance(KeyStoreCredentialStore.java:832)
> 	... 9 more
> Caused by: java.security.NoSuchAlgorithmException: BKS KeyStore not available
> 	at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
> 	at java.security.Security.getImpl(Security.java:695)
> 	at java.security.KeyStore.getInstance(KeyStore.java:848)
> 	... 10 more
> {code}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list