Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-490 Domain Management Role Based Access Control
  3. WFLY-2271

A problem setting include-all on a role mapping is failing getting rolled back.

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • Major
    • 8.0.0.CR1
    • None
    • Management
    • None

    Description

      As a side effect of another bug the following failure occurs: -

      [domain@localhost:9990 /] ./core-service=management/access=authorization/role-mapping=test:add
      {
          "outcome" => "success",
          "result" => undefined,
          "server-groups" => {"main-server-group" => {"host" => {"master" => {
              "server-one" => {"response" => {"outcome" => "success"}},
              "server-two" => {"response" => {"outcome" => "success"}}
          }}}}
      }
      [domain@localhost:9990 /] ./core-service=management/access=authorization/role-mapping=test:write-attribute(name=include-all, value=true)
      {
          "outcome" => "failed",
          "failure-description" => {"domain-failure-description" => "JBAS014749: Operation handler failed: JBAS013470: Unknown role 'TEST'"},
          "rolled-back" => true
      }
      

      Roll back however fails with this error: -

      [Host Controller] 11:47:25,216 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 11) JBAS014603:  caught exception attempting to revert operation write-attribute at address [
      [Host Controller]     ("core-service" => "management"),
      [Host Controller]     ("access" => "authorization"),
      [Host Controller]     ("role-mapping" => "test")
      [Host Controller] ]: java.lang.IllegalArgumentException
      [Host Controller] 	at org.jboss.dmr.ModelValue.asBoolean(ModelValue.java:66) [jboss-dmr-1.2.0.Final.jar:1.2.0.Final]
      [Host Controller] 	at org.jboss.dmr.ModelNode.asBoolean(ModelNode.java:262) [jboss-dmr-1.2.0.Final.jar:1.2.0.Final]
      [Host Controller] 	at org.jboss.as.domain.management.access.RoleIncludeAllWriteAttributeHander.revertUpdateToRuntime(RoleIncludeAllWriteAttributeHander.java:65)
      [Host Controller] 	at org.jboss.as.domain.management.access.RoleIncludeAllWriteAttributeHander.revertUpdateToRuntime(RoleIncludeAllWriteAttributeHander.java:35)
      

      Two issues here: -
      1 - "rolled-back" should not be true as it failed.
      2 - The failure during rollback needs to be fixed, the default for this attribute if not set is 'false'.

      Attachments

        Issue Links

          Activity

            People

              darran.lofthouse@redhat.com Darran Lofthouse
              darran.lofthouse@redhat.com Darran Lofthouse
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: