[jboss-jira] [JBoss JIRA] (WFLY-7104) Elytron properties-realm enforces REALM_NAME comment

Josef Cacek (JIRA) issues at jboss.org
Tue Feb 7 01:09:00 EST 2017


     [ https://issues.jboss.org/browse/WFLY-7104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josef Cacek updated WFLY-7104:
------------------------------
    Steps to Reproduce: 
{code}
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
}
{code}

Server log contains then:
{code}
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
{code}


  was:
{code}
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: WFLYELY00014: Unable to load the properties files required to start the properties file backed realm.
    Caused by: java.io.IOException: ELY01006: No realm name found in properties file"},
        "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.security-realm.test"],
        "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
    },
    "rolled-back" => true
}
{code}

Server log contains then:
{code}
13:09:20,521 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service org.wildfly.security.security-realm.test: org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.test: WFLYELY00014: Unable to load the properties files required to start the properties file backed realm.
        at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:181)
        at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:162)
        at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        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)
Caused by: java.io.IOException: ELY01006: No realm name found in properties file
        at org.wildfly.security.auth.realm.LegacyPropertiesSecurityRealm.load(LegacyPropertiesSecurityRealm.java:260)
        at org.wildfly.security.auth.realm.LegacyPropertiesSecurityRealm$Builder.build(LegacyPropertiesSecurityRealm.java:335)
        at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:178)
        ... 7 more

13:09:20,522 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 5) 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: WFLYELY00014: Unable to load the properties files required to start the properties file backed realm.
    Caused by: java.io.IOException: ELY01006: No realm name found in properties file"},
    "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.security-realm.test"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
13:09:20,528 INFO  [org.jboss.as.controller] (management-handler-thread - 5) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service org.wildfly.security.security-realm.test
{code}




> Elytron properties-realm enforces REALM_NAME comment
> ----------------------------------------------------
>
>                 Key: WFLY-7104
>                 URL: https://issues.jboss.org/browse/WFLY-7104
>             Project: WildFly
>          Issue Type: Bug
>          Components: Security
>            Reporter: Josef Cacek
>            Assignee: Darran Lofthouse
>             Fix For: 11.0.0.Alpha1
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list