capactio / website

Source for the capact.io website
https://capact.io
Apache License 2.0
6 stars 4 forks source link

Describe AWS Secrets Storage backend #113

Closed pkosiec closed 2 years ago

pkosiec commented 2 years ago

Description

Changes proposed in this pull request:

Testing

WARNING: Make sure you installed use manifests from https://github.com/capactio/hub-manifests/pull/61

You don't need to install Mattermost:

  1. Create and run Action to test the new default storage:

    1. Create TypeInstances:

      cat > /tmp/download-ti.yaml << ENDOFFILE
      typeInstances:
      - alias: "download"
        typeRef:
          path: cap.type.capactio.capact.validation.download
          revision: 0.1.0
        value:
          key: "true"
      ENDOFFILE
      export DOWNLOAD_TI=$(capact ti create -f /tmp/download-ti.yaml -ojson | jq -r '.[] | select(.alias == "download") | .id')
      cat > /tmp/update-ti.yaml << ENDOFFILE
      typeInstances:
      - alias: "update"
        typeRef:
          path: cap.type.capactio.capact.validation.update
          revision: 0.1.0
        value:
          key: "true"
      ENDOFFILE
      export UPDATE_TI=$(capact ti create -f /tmp/update-ti.yaml -ojson | jq -r '.[] | select(.alias == "update") | .id')
    2. Create Action input:

      cat > /tmp/act-input-ti.yaml << ENDOFFILE
      typeInstances:
        - name: "testUpdate"
          id: ${UPDATE_TI}
        - name: "testInput"
          id: ${DOWNLOAD_TI}
      ENDOFFILE
    3. Run Action

      capact act create cap.interface.capactio.capact.validation.action.passing --name test --type-instances-from-file /tmp/act-input-ti.yaml
    4. Run capact act run test and capact act watch test

    5. Get Action output TypeInstances:

      capact act get test -ojson | jq '.Actions[0].output.typeInstances'

      Observe the Backend ID near the cap.type.capactio.capact.validation.upload TypeInstance.

    6. Use capact ti get {id} -oyaml to see the details.

      SAMPLE_TI_ID=$(capact act get test -ojson | jq '.Actions[0].output.typeInstances | map(select(.typeRef.path == "cap.type.capactio.capact.validation.upload"))[0].id' -r)
      capact ti get $SAMPLE_TI_ID -oyaml
    7. See the AWS Secrets Manager UI to double confirm the TypeInstance value has been stored externally.

    8. Clean up the secret from AWS UI (as the delete functionality is not implemented yet).

Related issue(s)

Resolves https://github.com/capactio/capact/issues/647