[jboss-jira] [JBoss JIRA] (WFLY-7543) Complicated failure-descriptions in Elytron properties-realm

Jan Kalina (JIRA) issues at jboss.org
Wed Nov 9 10:12:00 EST 2016


Jan Kalina created WFLY-7543:
--------------------------------

             Summary: Complicated failure-descriptions in Elytron properties-realm
                 Key: WFLY-7543
                 URL: https://issues.jboss.org/browse/WFLY-7543
             Project: WildFly
          Issue Type: Bug
          Components: Security
    Affects Versions: 11.0.0.Alpha1
            Reporter: Jan Kalina
            Assignee: Jan Kalina


There are complicated failure-descriptions in Elytron properties-realm. They include some details from exceptions which are not needed and can be confused for non-java administrators. Please handle these exceptions and provide some user friendly failure-description.

Examples of complicated failure-description in properties-realm:
* Adding path which does not exist:
{code}
/subsystem=elytron/properties-realm=realm:add(users-properties={path=/wrong/path/a.properties})
{
    "outcome" => "failed",
    "failure-description" => {
        "WFLYCTL0080: Failed services" => {"org.wildfly.security.security-realm.realm" => "org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.realm: WFLYELY00014: Unable to load the properties files required to start the properties file backed realm.
    Caused by: java.io.FileNotFoundException: /wrong/path/a.properties (No such file or directory)"},
        "WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.security-realm.realm"],
        "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
    },
    "rolled-back" => true
}
{code}
* Adding file with missing $REALM:
{code}
/subsystem=elytron/properties-realm=realm:add(users-properties={path=/some/path/roles.properties})
{
    "outcome" => "failed",
    "failure-description" => {
        "WFLYCTL0080: Failed services" => {"org.wildfly.security.security-realm.realm" => "org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.realm: 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.realm"],
        "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
    },
    "rolled-back" => true
}
{code}
* path mentiond in relative-to does not exist:
{code}
/subsystem=elytron/properties-realm=realm:add(users-properties={path=users.properties,relative-to=non.exist})
{
    "outcome" => "failed",
    "failure-description" => {
        "WFLYCTL0412: Required services that are not installed:" => ["jboss.server.path.\"non.exist\""],
        "WFLYCTL0180: Services with missing/unavailable dependencies" => ["org.wildfly.security.security-realm.realm is missing [jboss.server.path.\"non.exist\"]"]
    },
    "rolled-back" => true
}
{code}


Suggestion for improvement:
* use only description of failure, e.g. something like "file /wrong/path/a.properties was not found"
* do not use any unneeded information - e.g. "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined



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


More information about the jboss-jira mailing list