Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-2453

Complicated failure-descriptions in Elytron simple-permission-mapper

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 3.0.0.Beta7
    • Security

      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:
        /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
        }
        
      • Adding permission, but non existing module is used:
        /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
        }
        

      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

              Unassigned Unassigned
              olukas Ondrej Lukas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: