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

Elytron properties-realm enforces REALM_NAME comment even if plain-text attribute is true

XMLWordPrintable

    • Hide
      touch /tmp/users.properties
      jboss-eap-7.1/bin/jboss-cli.sh -c "/subsystem=elytron/properties-realm=test:add(users-properties={path=/tmp/users.properties, plain-text=true})"
      {
          "outcome" => "failed",
          "failure-description" => {
              "WFLYCTL0080: Failed services" => {"org.wildfly.security.security-realm.test" => "org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.test: WFLYELY00025: Referenced property file is invalid: ELY01006: No realm name found in users property file - file must contain \"#$REALM_NAME=RealmName$\" line"},
              "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.security-realm.test"]
          },
          "rolled-back" => true
      }
      

      Server log contains then:

      07:00:27,993 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service org.wildfly.security.security-realm.test: org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.test: WFLYELY00025: Referenced property file is invalid: ELY01006: No realm name found in users property file - file must contain "#$REALM_NAME=RealmName$" line
      	at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:194)
      	at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:172)
      	at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
      	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:745)
      
      07:00:27,998 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "elytron"),
          ("properties-realm" => "test")
      ]) - failure description: {
          "WFLYCTL0080: Failed services" => {"org.wildfly.security.security-realm.test" => "org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.test: WFLYELY00025: Referenced property file is invalid: ELY01006: No realm name found in users property file - file must contain \"#$REALM_NAME=RealmName$\" line"},
          "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.security-realm.test"]
      }
      07:00:28,009 INFO  [org.jboss.as.controller] (management-handler-thread - 1) WFLYCTL0183: Service status report
      WFLYCTL0186:   Services which failed to start:      service org.wildfly.security.security-realm.test
      
      Show
      touch /tmp/users.properties jboss-eap-7.1/bin/jboss-cli.sh -c "/subsystem=elytron/properties-realm=test:add(users-properties={path=/tmp/users.properties, plain-text= true })" { "outcome" => "failed" , "failure-description" => { "WFLYCTL0080: Failed services" => { "org.wildfly.security.security-realm.test" => "org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.test: WFLYELY00025: Referenced property file is invalid: ELY01006: No realm name found in users property file - file must contain \" #$REALM_NAME=RealmName$\ " line" }, "WFLYCTL0412: Required services that are not installed:" => [ "org.wildfly.security.security-realm.test" ] }, "rolled-back" => true } Server log contains then: 07:00:27,993 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service org.wildfly.security.security-realm.test: org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.test: WFLYELY00025: Referenced property file is invalid: ELY01006: No realm name found in users property file - file must contain "#$REALM_NAME=RealmName$" line at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:194) at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:172) at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53) 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:745) 07:00:27,998 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ( "add" ) failed - address: ([ ( "subsystem" => "elytron" ), ( "properties-realm" => "test" ) ]) - failure description: { "WFLYCTL0080: Failed services" => { "org.wildfly.security.security-realm.test" => "org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.test: WFLYELY00025: Referenced property file is invalid: ELY01006: No realm name found in users property file - file must contain \" #$REALM_NAME=RealmName$\ " line" }, "WFLYCTL0412: Required services that are not installed:" => [ "org.wildfly.security.security-realm.test" ] } 07:00:28,009 INFO [org.jboss.as.controller] (management-handler-thread - 1) WFLYCTL0183: Service status report WFLYCTL0186: Services which failed to start: service org.wildfly.security.security-realm.test

      Elytron enforces existence of "#$REALM_NAME=...$" comment in property file referenced from properties-realms.

      When using legacy security and this line is missing, server starts without error.

      Expected behavior:
      Elytron's properties-realm doesn't require this comment. If the comment is present, it may verify if its content fits the realm name.

              jkalina@redhat.com Jan Kalina (Inactive)
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Martin Svehla Martin Svehla
              Martin Svehla Martin Svehla
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: