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

Unable to use principal name with spaces within the simple-permission-mapper (Elytron)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 3.0.2.Final
    • None
    • Security
    • None
    • Hide
      [standalone@localhost:9990 /] /subsystem=elytron/simple-permission-mapper=anonymous-permission-mapper:list-add(name=permission-mappings[0].principals, value="John Doe")
      {
          "outcome" => "success",
          "response-headers" => {
              "operation-requires-reload" => true,
              "process-state" => "reload-required"
          }
      }
      [standalone@localhost:9990 /] /subsystem=elytron/simple-permission-mapper=anonymous-permission-mapper:read-resource
      {
          "outcome" => "success",
          "result" => {
              "mapping-mode" => "first",
              "permission-mappings" => [{
                  "principals" => [
                      "anonymous",
                      "John Doe"
                  ],
                  "permissions" => [{"class-name" => "org.wildfly.security.auth.permission.LoginPermission"}]
              }]
          },
          "response-headers" => {"process-state" => "reload-required"}
      }
      [standalone@localhost:9990 /] reload
      [standalone@localhost:9990 /] /subsystem=elytron/simple-permission-mapper=anonymous-permission-mapper:read-resource
      {
          "outcome" => "success",
          "result" => {
              "mapping-mode" => "first",
              "permission-mappings" => [{
                  "principals" => [
                      "anonymous",
                      "John",
                      "Doe"
                  ],
                  "permissions" => [{"class-name" => "org.wildfly.security.auth.permission.LoginPermission"}]
              }]
          }
      }
      
      Show
      [standalone@localhost:9990 /] /subsystem=elytron/simple-permission-mapper=anonymous-permission-mapper:list-add(name=permission-mappings[0].principals, value= "John Doe" ) { "outcome" => "success" , "response-headers" => { "operation-requires-reload" => true , "process-state" => "reload-required" } } [standalone@localhost:9990 /] /subsystem=elytron/simple-permission-mapper=anonymous-permission-mapper:read-resource { "outcome" => "success" , "result" => { "mapping-mode" => "first" , "permission-mappings" => [{ "principals" => [ "anonymous" , "John Doe" ], "permissions" => [{ " class- name" => "org.wildfly.security.auth.permission.LoginPermission" }] }] }, "response-headers" => { "process-state" => "reload-required" } } [standalone@localhost:9990 /] reload [standalone@localhost:9990 /] /subsystem=elytron/simple-permission-mapper=anonymous-permission-mapper:read-resource { "outcome" => "success" , "result" => { "mapping-mode" => "first" , "permission-mappings" => [{ "principals" => [ "anonymous" , "John" , "Doe" ], "permissions" => [{ " class- name" => "org.wildfly.security.auth.permission.LoginPermission" }] }] } }

      The simple-permission-mapper fails to handle principal names which include space character in them.

      The problem seems to be caused by storing the names into one attribute (space-separated values) in Elytron subsystem schema.

              darran.lofthouse@redhat.com Darran Lofthouse
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: