]
Lukas Vydra reassigned WFCORE-5271:
-----------------------------------
Assignee: Lukas Vydra
NullPointerException creating new KeyStore without type
-------------------------------------------------------
Key: WFCORE-5271
URL:
https://issues.redhat.com/browse/WFCORE-5271
Project: WildFly Core
Issue Type: Bug
Components: Security
Reporter: Darran Lofthouse
Assignee: Lukas Vydra
Priority: Major
The "type" attribute when adding a new KeyStore has been made optional, this is
so that is the KeyStore already exists we can dynamically discover the type.
If however the KeyStore does not exist this leads to a NullPointerException as it is
never created:
{code:java}
/subsystem=elytron/key-store=test:add(relative-to=jboss.server.config.dir,
path=test1.keystore, credential-reference={clear-text="${ENC:AAA}"})
{
"outcome" => "failed",
"failure-description" => {"WFLYCTL0080: Failed services" =>
{"org.wildfly.security.key-store.test" => "WF
LYELY00004: Unable to start the service.
Caused by: java.lang.NullPointerException"}},
"rolled-back" => true
} {code}
If it doesn't exist we should likely create it using the default from
KeyStore.getDetaultType()
{code:java}
Caused by: java.lang.NullPointerExceptionCaused by: java.lang.NullPointerException at
org.wildfly.extension.elytron@15.0.0.Beta1-SNAPSHOT//org.wildfly.extension.elytron.KeyStoreService.start(KeyStoreService.java:180)
... 8 more {code}