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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 1.1.0.CR2
    • None
    • None
    • None

    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?store.password=pass123;create.storage=true")
      • /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/AAA_prezentace/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 suggestion 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

              Unassigned Unassigned
              hsvabek_jira Hynek Švábek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: