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

Problems with creating CredentialStore from scratch when directory path doesn't exist.

    XMLWordPrintable

Details

    Description

      There are problems with creating CredentialStore from scratch when directory path doesn't exist.

      How to reproduce

      • /subsystem=elytron/credential-store=cs007:add(uri="cr-store://test/folderNotExist/keystorecs007.jceks?create=true", credential-reference= {clear-text=pass123}

        )

      • /subsystem=elytron/credential-store=cs007/alias=newCs007:add(secret-value=Elytron)

      You can see this error message

      {
          "outcome" => "failed",
          "failure-description" => "WFLYELY00009: Unable to complete operation. 'ELY09504: Cannot write storage file '/home/hsvabek/securityworkspace/jboss-eap-7.1.0.DR7/standalone/data/folderNotExist/keystorecs007.jceks' for the store 'cs007''",
          "rolled-back" => true
      }
      

      When you execute repeatedly last command /subsystem=elytron/credential-store=cs007/alias=newCs007:add(secret-value=Elytron)
      you get information about duplicate resource. It's mean the entry is in Credential Store (in memory) but not in file...

      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0212: Duplicate resource [
          (\"subsystem\" => \"elytron\"),
          (\"credential-store\" => \"cs123\"),
          (\"alias\" => \"newCs007\")
      ]",
          "rolled-back" => true
      }
      

      My suggestions for solutions of this two problems:

      • try to create directory path
      • when fails creating of CredentialStore file then we remove entry from memory too. It can be confusing have entry only in memory.

      Attachments

        Issue Links

          Activity

            People

              rhn-cservice-bbaranow Bartosz Baranowski
              hsvabek_jira Hynek Švábek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: