Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-8238

There is NoSuchProviderException when we want to create our custom credential store.

XMLWordPrintable

      There is NoSuchProviderException when we want to create our custom credential store.

      This is a requirement for RFE https://issues.jboss.org/browse/EAP7-533 -> I raised priority to BLOCKER

      How to reproduce

      1. Create module
        Set your own path to customcredstoreprovider.jar downloaded from attachment
        module add --name=org.jboss.customcredstore --resources=/tmp/customcredstoreprovider.jar --dependencies=org.wildfly.security.elytron,org.wildfly.extension.elytron --slot=main
        
      2. Create provider loader
        /subsystem=elytron/provider-loader=cust001:add(class-names=[org.jboss.as.test.integration.security.credential.store.CustomElytronProvider],module=org.jboss.customcredstore)
        
        
      3. Create credential store
        /subsystem=elytron/credential-store=cs0123456:add(uri="cr-store://test/customcredCS123.jceks?create.storage=true", providers=cust001, provider-name=CustomWildFlyElytron, credential-reference={clear-text=pass123})
        

        Custom provider loader code:

        package org.jboss.as.test.integration.security.credential.store.custom;
        import ....
        public class CustomElytronProvider extends Provider {
            private static final long serialVersionUID = 1267016094996625988L;
            public CustomElytronProvider() {
                super("CustomWildFlyElytron", 1.0D, "Custom WildFly Elytron Provider");
                putCustomCredentialStoreProviderImplementations();
            }
        
            private void putCustomCredentialStoreProviderImplementations() {
                final List<String> emptyList = Collections.emptyList();
                final Map<String, String> emptyMap = Collections.emptyMap();
                putService(new Service(this, CredentialStore.CREDENTIAL_STORE_TYPE, CustomCredentialStore.CUSTOM_KEY_STORE_PASSWORD_STORE, CustomCredentialStore.class.getName(), emptyList, emptyMap));
            }
        }
        

      And the result is:

      {
          "outcome" => "failed",
          "failure-description" => {
              "WFLYCTL0080: Failed services" => {"org.wildfly.security.credential-store.cs0123456" => "org.jboss.msc.service.StartException in service org.wildfly.security.credential-store.cs0123456: WFLYELY00004: Unable to start the service.
          Caused by: java.security.NoSuchProviderException: org.jboss.as.test.integration.security.credential.store.CustomElytronProvider"},
              "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.credential-store.cs0123456"],
              "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
          },
          "rolled-back" => true
      }
      

              pskopek@redhat.com Peter Skopek
              hsvabek_jira Hynek Švábek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: