Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7868

Embedded server, elytron filesystem-realm creation requires reload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 11.0.0.Alpha1
    • Security
    • None
    • Hide
      • Run embedded server with elytron configuration
        [mchoma@localhost bin]$ ./jboss-cli.sh
        [disconnected /] embed-server --std-out=echo -c=standalone-elytron.xml
        
      • Add filesystem-realm and try to add user into it
        [standalone@embedded /] /subsystem=elytron/filesystem-realm=exampleFsRealm:add(path=fs-realm-users,relative-to=jboss.server.config.dir)
        {"outcome" => "success"}
        [standalone@embedded /] /subsystem=elytron/filesystem-realm=exampleFsRealm/identity=jduke@JBOSS.ORG:add()
        14:19:38,600 ERROR [org.jboss.as.controller.management-operation] (AeshProcess: 5) WFLYCTL0013: Operation ("add") failed - address: ([
            ("subsystem" => "elytron"),
            ("filesystem-realm" => "exampleFsRealm"),
            ("identity" => "jduke@JBOSS.ORG")
        ]): org.jboss.msc.service.ServiceNotFoundException: Service service org.wildfly.security.modifiable-security-realm.exampleFsRealm not found
        	at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:669)
        	at org.jboss.as.controller.OperationContextImpl$OperationContextServiceRegistry.getRequiredService(OperationContextImpl.java:2363)
        	at org.wildfly.extension.elytron.ElytronExtension.getRequiredService(ElytronExtension.java:115)
        	at org.wildfly.extension.elytron.IdentityResourceDefinition.getModifiableSecurityRealm(IdentityResourceDefinition.java:613)
        	at org.wildfly.extension.elytron.IdentityResourceDefinition.access$200(IdentityResourceDefinition.java:94)
        	at org.wildfly.extension.elytron.IdentityResourceDefinition$IdentityAddHandler.lambda$execute$0(IdentityResourceDefinition.java:131)
        	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:921)
        	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:664)
        	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:383)
        	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1390)
        	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:419)
        	at org.jboss.as.controller.ModelControllerImpl.lambda$execute$0(ModelControllerImpl.java:224)
        	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:193)
        	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:224)
        	at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:716)
        	at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:706)
        	at org.jboss.as.controller.client.helpers.DelegatingModelControllerClient.execute(DelegatingModelControllerClient.java:68)
        	at org.jboss.as.cli.embedded.ThreadContextsModelControllerClient.execute(ThreadContextsModelControllerClient.java:69)
        	at org.jboss.as.cli.impl.CommandExecutor.execute(CommandExecutor.java:652)
        	at org.jboss.as.cli.impl.CommandContextImpl.lambda$execute$1(CommandContextImpl.java:862)
        	at org.jboss.as.cli.impl.CommandContextImpl.execute(CommandContextImpl.java:882)
        	at org.jboss.as.cli.impl.CommandContextImpl.execute(CommandContextImpl.java:861)
        	at org.jboss.as.cli.handlers.OperationRequestHandler.handle(OperationRequestHandler.java:90)
        	at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:806)
        	at org.jboss.as.cli.impl.CommandContextImpl.handleSafe(CommandContextImpl.java:907)
        	at org.jboss.as.cli.impl.CommandContextImpl$2.execute(CommandContextImpl.java:442)
        	at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53)
        	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:745)
        
        {
            "outcome" => "failed",
            "failure-description" => "WFLYCTL0158: Operation handler failed: org.jboss.msc.service.ServiceNotFoundException: Service service org.wildfly.security.modifiable-security-realm.exampleFsRealm not found",
            "rolled-back" => true
        }
        
        
      Show
      Run embedded server with elytron configuration [mchoma@localhost bin]$ ./jboss-cli.sh [disconnected /] embed-server --std-out=echo -c=standalone-elytron.xml Add filesystem-realm and try to add user into it [standalone@embedded /] /subsystem=elytron/filesystem-realm=exampleFsRealm:add(path=fs-realm-users,relative-to=jboss.server.config.dir) { "outcome" => "success" } [standalone@embedded /] /subsystem=elytron/filesystem-realm=exampleFsRealm/identity=jduke@JBOSS.ORG:add() 14:19:38,600 ERROR [org.jboss.as.controller.management-operation] (AeshProcess: 5) WFLYCTL0013: Operation ( "add" ) failed - address: ([ ( "subsystem" => "elytron" ), ( "filesystem-realm" => "exampleFsRealm" ), ( "identity" => "jduke@JBOSS.ORG" ) ]): org.jboss.msc.service.ServiceNotFoundException: Service service org.wildfly.security.modifiable-security-realm.exampleFsRealm not found at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:669) at org.jboss.as.controller.OperationContextImpl$OperationContextServiceRegistry.getRequiredService(OperationContextImpl.java:2363) at org.wildfly.extension.elytron.ElytronExtension.getRequiredService(ElytronExtension.java:115) at org.wildfly.extension.elytron.IdentityResourceDefinition.getModifiableSecurityRealm(IdentityResourceDefinition.java:613) at org.wildfly.extension.elytron.IdentityResourceDefinition.access$200(IdentityResourceDefinition.java:94) at org.wildfly.extension.elytron.IdentityResourceDefinition$IdentityAddHandler.lambda$execute$0(IdentityResourceDefinition.java:131) at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:921) at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:664) at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:383) at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1390) at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:419) at org.jboss.as.controller.ModelControllerImpl.lambda$execute$0(ModelControllerImpl.java:224) at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:193) at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:224) at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:716) at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:706) at org.jboss.as.controller.client.helpers.DelegatingModelControllerClient.execute(DelegatingModelControllerClient.java:68) at org.jboss.as.cli.embedded.ThreadContextsModelControllerClient.execute(ThreadContextsModelControllerClient.java:69) at org.jboss.as.cli.impl.CommandExecutor.execute(CommandExecutor.java:652) at org.jboss.as.cli.impl.CommandContextImpl.lambda$execute$1(CommandContextImpl.java:862) at org.jboss.as.cli.impl.CommandContextImpl.execute(CommandContextImpl.java:882) at org.jboss.as.cli.impl.CommandContextImpl.execute(CommandContextImpl.java:861) at org.jboss.as.cli.handlers.OperationRequestHandler.handle(OperationRequestHandler.java:90) at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:806) at org.jboss.as.cli.impl.CommandContextImpl.handleSafe(CommandContextImpl.java:907) at org.jboss.as.cli.impl.CommandContextImpl$2.execute(CommandContextImpl.java:442) at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53) 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:745) { "outcome" => "failed" , "failure-description" => "WFLYCTL0158: Operation handler failed: org.jboss.msc.service.ServiceNotFoundException: Service service org.wildfly.security.modifiable-security-realm.exampleFsRealm not found" , "rolled-back" => true }

      In embedded server, when elytron filesystem realm is created command response is not marked with reload-required. However subsequent attempt to use this filesystem realm fails.
      When reload is called between this 2 commands it is OK.
      When trying on standalone server it is OK.

              kwills@redhat.com Ken Wills
              mchoma@redhat.com Martin Choma
              Martin Choma Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: