File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : AWS Secrets Manager OIDC POC
2+
3+ on :
4+ push :
5+ branches :
6+ - aws-sm-oidc-poc
7+
8+ permissions : {}
9+
10+ jobs :
11+ fetch-test-secret :
12+ if : github.repository == 'hellosign/hellosign-openapi'
13+ runs-on : ubuntu-latest
14+ permissions :
15+ id-token : write
16+ steps :
17+ - name : Configure AWS credentials
18+ uses : aws-actions/configure-aws-credentials@v6.2.3
19+ with :
20+ role-to-assume : arn:aws:iam::781865768738:role/oidc-github-hellosign-hellosign-openapi-branch-aws-sm-oidc-poc
21+ aws-region : us-west-2
22+ role-duration-seconds : 900
23+ role-session-name : hellosign-openapi-oidc-poc-${{ github.run_id }}
24+ allowed-account-ids : " 781865768738"
25+ mask-aws-account-id : true
26+
27+ - name : Fetch test secret
28+ uses : aws-actions/aws-secretsmanager-get-secrets@v3
29+ with :
30+ secret-ids : |
31+ OIDC_POC_SECRET,dev/automation_hellosign_openapi_oidc_poc
32+ parse-json-secrets : false
33+
34+ - name : Verify test secret
35+ shell : bash
36+ run : |
37+ set -euo pipefail
38+
39+ actual_digest="$(printf '%s' "$OIDC_POC_SECRET" | sha256sum | cut -d ' ' -f 1)"
40+ expected_digest="b36c054d42285f712df06e782f4c338bb97794e5952b0eb2449113fab75c4567"
41+
42+ if [[ "$actual_digest" != "$expected_digest" ]]; then
43+ echo "::error::The test secret did not contain the expected value"
44+ exit 1
45+ fi
46+
47+ echo "The test secret was retrieved and validated successfully"
You can’t perform that action at this time.
0 commit comments