Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: None
    • Fix Version/s: 1.2.0.Beta3
    • Component/s: Realms
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      touch /tmp/users.properties
      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 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

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  honza889 Jan Kalina
                  Reporter:
                  jcacek Josef Cacek
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: