Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-6630

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

XMLWordPrintable

    • 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",credential-reference= {clear-text=pass123}
      • /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",credential-reference= {clear-text=pass123} /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)
    • 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",credential-reference= {clear-text=pass123}
      • /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",credential-reference= {clear-text=pass123} /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)

      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.

      Unignore tests
      When this issue is fixed, unignore (and fix if needed) related tests in testsuite/elytron/src/test/java/org/wildfly/test/integration/elytron/application/. Thanks.

      git grep WFLY-8144
      

              ehugonne1@redhat.com Emmanuel Hugonnet
              hsvabek_jira Hynek Švábek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: