Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-689

CLI - between operations REMOVE and ADD CredentialStore alias is needed reload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.0.Beta28
    • 1.1.0.Beta11
    • Credential Store
    • None
    • Hide
      • run EAP server
        ./bin/standalone.sh
      • run CLI
        ./bin/jboss-cli.sh -c
        if applicaple add Elytron extension and Elytron subsystem and reload server
        /extension=org.wildfly.extension.elytron:add()
        /subsystem=elytron:add()
        reload
      • /subsystem=elytron/credential-store=credStore:add(uri="cr-store://test/cs/csscratch.jceks?create.storage=true;store.password=pass123;key.password=pass456"
      • /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass)
      • /subsystem=elytron/credential-store=credStore/alias=csAlias001:remove()
      • /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass)
      Show
      run EAP server ./bin/standalone.sh run CLI ./bin/jboss-cli.sh -c if applicaple add Elytron extension and Elytron subsystem and reload server /extension=org.wildfly.extension.elytron:add() /subsystem=elytron:add() reload /subsystem=elytron/credential-store=credStore:add(uri="cr-store://test/cs/csscratch.jceks?create.storage=true;store.password=pass123;key.password=pass456" /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass) /subsystem=elytron/credential-store=credStore/alias=csAlias001:remove() /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass)
    • Workaround Exists
    • Hide
      • run EAP server
        ./bin/standalone.sh
      • run CLI
        ./bin/jboss-cli.sh -c
        if applicaple add Elytron extension and Elytron subsystem and reload server
        /extension=org.wildfly.extension.elytron:add()
        /subsystem=elytron:add()
        reload
      • /subsystem=elytron/credential-store=credStore:add(uri="cr-store://test/cs/csscratch.jceks?create.storage=true;store.password=pass123;key.password=pass456"
      • /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass)
      • /subsystem=elytron/credential-store=credStore/alias=csAlias001:remove()
      • reload
      • /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass)
      Show
      run EAP server ./bin/standalone.sh run CLI ./bin/jboss-cli.sh -c if applicaple add Elytron extension and Elytron subsystem and reload server /extension=org.wildfly.extension.elytron:add() /subsystem=elytron:add() reload /subsystem=elytron/credential-store=credStore:add(uri="cr-store://test/cs/csscratch.jceks?create.storage=true;store.password=pass123;key.password=pass456" /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass) /subsystem=elytron/credential-store=credStore/alias=csAlias001:remove() reload /subsystem=elytron/credential-store=credStore/alias=csAlias001:add(secret-value=ElytronWrongPass)

      If I want remove entry from credential store and immediately I try to add new entry with same alias then I get error message

      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalStateException: WFLYCTL0075: Duplicate resource csAlias001",
          "rolled-back" => true
      }
      

      In case of reload after remove operation then adding entry with same alias passes.

      I cannot see any information about reload-required after executing remove operation.

      {
          "outcome" => "success",
          "result" => undefined
      }
      

      My suggestions

      1. add there information about reload-required
        OR
      2. fix it so it will not be necessary reload

      In my opinion second option is better.

              pskopek@redhat.com Peter Skopek
              hsvabek_jira Hynek Švábek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: