]
Jan Kalina moved JBEAP-12243 to WFCORE-3079:
--------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-3079 (was: JBEAP-12243)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Security
(was: Security)
Affects Version/s: 3.0.0.Beta28
(was: 7.1.0.ER2)
Unable to use PKCS11 keystore from provider defined specified in
Elytron provider-loader resource
-------------------------------------------------------------------------------------------------
Key: WFCORE-3079
URL:
https://issues.jboss.org/browse/WFCORE-3079
Project: WildFly Core
Issue Type: Bug
Components: Security
Affects Versions: 3.0.0.Beta28
Reporter: Jan Kalina
Assignee: Jan Kalina
Priority: Blocker
I'm not able to use PKCS11 keystore type if the security provider is defined in
Elytron's provider-loader resource.
{code}
/subsystem=elytron/provider-loader=opensc:add(class-names=["sun.security.pkcs11.SunPKCS11"],
configuration={name=OpenSC, library=/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so,
slotListIndex=1})
{"outcome" => "success"}
/subsystem=elytron/key-store=pkcs11ks:add(credential-reference={clear-text=123456},
type=PKCS11, providers=opensc)
{
"outcome" => "failed",
"failure-description" => {"WFLYCTL0080: Failed services" =>
{"org.wildfly.security.key-store.pkcs11ks" => "WFLYELY00004: Unable to
start the service.
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYELY00012:
No suitable provider found for type 'PKCS11'"}},
"rolled-back" => true
}
{code}
The server log contains:
{noformat}
10:54:17,503 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001:
Failed to start service org.wildfly.security.key-store.pkcs11ks:
org.jboss.msc.service.StartException in service org.wildfly.security.key-store.pkcs11ks:
WFLYELY00004: Unable to start the service.
at org.wildfly.extension.elytron.KeyStoreService.start(KeyStoreService.java:146)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYELY00012: No
suitable provider found for type 'PKCS11'
at
org.wildfly.extension.elytron.KeyStoreService.resolveProvider(KeyStoreService.java:154)
at org.wildfly.extension.elytron.KeyStoreService.start(KeyStoreService.java:109)
... 5 more
10:54:17,508 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 3) WFLYCTL0013: Operation ("add") failed - address:
([
("subsystem" => "elytron"),
("key-store" => "pkcs11ks")
]) - failure description: {"WFLYCTL0080: Failed services" =>
{"org.wildfly.security.key-store.pkcs11ks" => "WFLYELY00004: Unable to
start the service.
Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYELY00012:
No suitable provider found for type 'PKCS11'"}}
{noformat}