]
Darran Lofthouse updated WFLY-7476:
-----------------------------------
Fix Version/s: 11.0.0.Alpha1
Complicated failure-descriptions in Elytron properties-realm
------------------------------------------------------------
Key: WFLY-7476
URL:
https://issues.jboss.org/browse/WFLY-7476
Project: WildFly
Issue Type: Bug
Components: Security
Reporter: Ondrej Lukas
Assignee: Jan Kalina
Labels: user_experience
Fix For: 11.0.0.Alpha1
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