]
Darran Lofthouse moved WFLY-7475 to WFCORE-2453:
------------------------------------------------
Project: WildFly Core (was: WildFly)
Key: WFCORE-2453 (was: WFLY-7475)
Component/s: Security
(was: Security)
Affects Version/s: 3.0.0.Beta7
(was: 11.0.0.Alpha1)
Fix Version/s: 4.0.0.Alpha1
(was: 11.0.0.Alpha1)
Complicated failure-descriptions in Elytron simple-permission-mapper
--------------------------------------------------------------------
Key: WFCORE-2453
URL:
https://issues.jboss.org/browse/WFCORE-2453
Project: WildFly Core
Issue Type: Bug
Components: Security
Affects Versions: 3.0.0.Beta7
Reporter: Ondrej Lukas
Assignee: Darran Lofthouse
Labels: user_experience
Fix For: 4.0.0.Alpha1
There are complicated failure-descriptions in Elytron simple-permission-mapper. 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 simple-permission-mapper:
* Wrong name of permission class:
{code}
/subsystem=elytron/simple-permission-mapper=mapper:add(permission-mappings=[{permissions=[{action=read,class-name=org.wildfly.security.auth.permission.WrongLoginPermission,target-name=someName}]}])
{
"outcome" => "failed",
"failure-description" => {
"WFLYCTL0080: Failed services" =>
{"org.wildfly.security.permission-mapper.mapper" =>
"org.jboss.msc.service.StartException in service
org.wildfly.security.permission-mapper.mapper: WFLYELY00021: Exception while creating the
permission object for the permission mapping. Please check [class-name], [target-name]
(name of permission) and [action] of
[org.wildfly.security.auth.permission.WrongLoginPermission].
Caused by: org.wildfly.security.permission.InvalidPermissionClassException: ELY03015:
Could not load permission class
\"org.wildfly.security.auth.permission.WrongLoginPermission\"
Caused by: java.lang.ClassNotFoundException:
org.wildfly.security.auth.permission.WrongLoginPermission from [Module
\"org.wildfly.extension.elytron:main\" from local module loader @5479e3f
(finder: local module finder @27082746 (roots:
/home/olukas/workspace/uxcli/jboss-eap-7.1/modules,/home/olukas/workspace/uxcli/jboss-eap-7.1/modules/system/layers/base))]"},
"WFLYCTL0412: Required services that are not installed:" =>
["org.wildfly.security.permission-mapper.mapper"],
"WFLYCTL0180: Services with missing/unavailable dependencies" =>
undefined
},
"rolled-back" => true
}
{code}
* Adding permission, but non existing module is used:
{code}
/subsystem=elytron/simple-permission-mapper=mapper:add(permission-mappings=[{permissions=[{action=read,class-name=org.wildfly.security.auth.permission.LoginPermission,target-name=someName,module=some.nonexist.module}]}])
{
"outcome" => "failed",
"failure-description" => {
"WFLYCTL0080: Failed services" =>
{"org.wildfly.security.permission-mapper.mapper" =>
"org.jboss.msc.service.StartException in service
org.wildfly.security.permission-mapper.mapper: org.jboss.modules.ModuleNotFoundException:
some.nonexist.module:main
Caused by: org.jboss.modules.ModuleNotFoundException:
some.nonexist.module:main"},
"WFLYCTL0412: Required services that are not installed:" =>
["org.wildfly.security.permission-mapper.mapper"],
"WFLYCTL0180: Services with missing/unavailable dependencies" =>
undefined
},
"rolled-back" => true
}
{code}
Suggestion for improvement:
* use only description of failure, e.g. something like "module a.b.c. does not
exist"
* do not use any unneeded information - e.g. "WFLYCTL0180: Services with
missing/unavailable dependencies" => undefined