Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5952

not possible to add ProviderLoader

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 16.0.1.Final, 19.0.0.Beta12
    • Security
    • None
    • Hide
      1. add module that contains implementation of java.security.Provider
        module add --name=test.provider --resources=/tmp/wildfly-27.0.0.Alpha2-SNAPSHOT/modules/system/layers/base/org/wildfly/security/elytron-base/main/wildfly-elytron-base-1.19.0.Final.jar
        
      2. try to add provider-loader
        /subsystem=elytron/provider-loader=test:add(class-names=["org.wildfly.security.WildFlyElytronProvider"],configuration={key=value},module=test.provider)
        
      Show
      add module that contains implementation of java.security.Provider module add --name=test.provider --resources=/tmp/wildfly-27.0.0.Alpha2-SNAPSHOT/modules/system/layers/base/org/wildfly/security/elytron-base/main/wildfly-elytron-base-1.19.0.Final.jar try to add provider-loader /subsystem=elytron/provider-loader=test:add( class- names=[ "org.wildfly.security.WildFlyElytronProvider" ],configuration={key=value},module=test.provider)

    Description

      [standalone@embedded /] /subsystem=elytron/provider-loader=test:add(class-names=["org.wildfly.security.WildFlyElytronProvider"],configuration={key=value},module=test.provider)
      {
          "outcome" => "failed",
          "failure-description" => {"WFLYCTL0080: Failed services" => {"org.wildfly.security.providers.test" => "java.lang.reflect.InvocationTargetException
          Caused by: java.lang.reflect.InvocationTargetException
          Caused by: java.lang.UnsupportedOperationException: configure is not supported"}},
          "rolled-back" => true
      }
      

      Stacktrace:

      13:08:58,692 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service org.wildfly.security.providers.test: org.jboss.msc.service.StartException in service org.wildfly.security.providers.test: java.lang.reflect.InvocationTargetException
              at org.wildfly.extension.elytron@19.0.0.Beta12//org.wildfly.extension.elytron.ProviderDefinitions$1$1.loadProviders(ProviderDefinitions.java:300)
              at org.wildfly.extension.elytron@19.0.0.Beta12//org.wildfly.extension.elytron.ProviderDefinitions$1$1$1.get(ProviderDefinitions.java:191)
              at org.wildfly.extension.elytron@19.0.0.Beta12//org.wildfly.extension.elytron.ProviderDefinitions$1$1$1.get(ProviderDefinitions.java:176)
              at org.wildfly.extension.elytron@19.0.0.Beta12//org.wildfly.extension.elytron.ElytronDoohickey.get(ElytronDoohickey.java:114)
              at org.wildfly.extension.elytron@19.0.0.Beta12//org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:61)
              at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
              at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
              at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
              at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
              at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: java.lang.reflect.InvocationTargetException
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.wildfly.extension.elytron@19.0.0.Beta12//org.wildfly.extension.elytron.ProviderDefinitions$1$1.loadProviders(ProviderDefinitions.java:249)
              ... 12 more
      Caused by: java.lang.UnsupportedOperationException: configure is not supported
              at java.base/java.security.Provider.configure(Provider.java:297)
              ... 17 more
      
      13:08:58,695 ERROR [org.jboss.as.controller.management-operation] (pool-3-thread-1) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "elytron"),
          ("provider-loader" => "test")
      ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.providers.test" => "java.lang.reflect.InvocationTargetException
          Caused by: java.lang.reflect.InvocationTargetException
          Caused by: java.lang.UnsupportedOperationException: configure is not supported"}}
      13:08:58,695 ERROR [org.jboss.as.controller.management-operation] (pool-3-thread-1) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "elytron"),
          ("provider-loader" => "test")
      ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.providers.test" => "java.lang.reflect.InvocationTargetException
          Caused by: java.lang.reflect.InvocationTargetException
          Caused by: java.lang.UnsupportedOperationException: configure is not supported"}}
      

      Reproducible likely with any WildFly version and JDK >= 11. It works fine with JDK8 (+ WildFly 24).

      Provider.configure method used in ProviderDefinitions.java#L246 seems to be unsupported.

      Attachments

        Issue Links

          Activity

            People

              fjuma1@redhat.com Farah Juma
              msimka@redhat.com Martin Simka
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: