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

Cipher token can't retrieve key store reference - IllegalStateException

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 7.1.0.DR19
    • Fix Version/s: 7.1.0.ER1
    • Component/s: Clustering
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      Hide
      keytool -genkeypair -alias alias -keypass password -storepass password -storetype jks -keystore key3.keystore -keyalg RSA
      
      batch
      /subsystem=elytron/key-store=token-store:add(type=jks,path=/tmp/key3.keystore,credential-reference={clear-text=password}, required=true)
      /subsystem=jgroups/stack=udp/protocol=AUTH:add(add-index=8)
      /subsystem=jgroups/stack=udp/protocol=AUTH/token=cipher:add(algorithm=RSA, key-alias=alias, key-store=token-store, key-credential-reference={clear-text=password}, shared-secret-reference={clear-text=password})
      run-batch
      reload
      
      Show
      keytool -genkeypair -alias alias -keypass password -storepass password -storetype jks -keystore key3.keystore -keyalg RSA batch /subsystem=elytron/key-store=token-store:add(type=jks,path=/tmp/key3.keystore,credential-reference={clear-text=password}, required=true) /subsystem=jgroups/stack=udp/protocol=AUTH:add(add-index=8) /subsystem=jgroups/stack=udp/protocol=AUTH/token=cipher:add(algorithm=RSA, key-alias=alias, key-store=token-store, key-credential-reference={clear-text=password}, shared-secret-reference={clear-text=password}) run-batch reload

      Description

      Configuring the new cipher token with the above commands results in:

      07:42:38,759 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service org.wildfly.clustering.jgroups.channel-factory.udp.AUTH: org.jboss.msc.service.StartException in service org.wildfly.clustering.jgroups.channel-factory.udp.AUTH: Failed to start service
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1978)
      	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: java.lang.IllegalStateException
      	at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47)
      	at org.wildfly.clustering.service.InjectedValueDependency.getValue(InjectedValueDependency.java:51)
      	at org.jboss.as.clustering.jgroups.subsystem.CipherAuthTokenBuilder.apply(CipherAuthTokenBuilder.java:75)
      	at org.jboss.as.clustering.jgroups.subsystem.CipherAuthTokenBuilder.apply(CipherAuthTokenBuilder.java:52)
      	at java.util.function.Function.lambda$andThen$1(Function.java:88)
      	at org.wildfly.clustering.service.FunctionalValueService.getValue(FunctionalValueService.java:62)
      	at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1158)
      	at org.jboss.msc.service.ServiceRegistrationImpl.getValue(ServiceRegistrationImpl.java:199)
      	at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1672)
      	at org.jboss.msc.service.ServiceControllerImpl.access$2000(ServiceControllerImpl.java:51)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:2001)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1950)
      	... 3 more
      

      Which looks like bad timing when attempting to retrieve the key store reference, according to Value<T>#getValue().

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pferraro Paul Ferraro
                  Reporter:
                  rjanik Richard Janik
                  Tester:
                  Richard Janik
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: