Add data flow diagram with trust boundaries - #22
Merged
Conversation
Shows credential data transformation through each stage (raw IAM creds -> AWS Sig v4 signed request -> base64 JSON payload -> Vault token -> temporary STS credentials) with trust boundary crossings highlighted. Includes Mermaid source, draw.io XML, and rendered PNGs.
Use a sequence diagram (matching HSTCertMon style) showing temporal message flow between participants across 4 phases: - Authentication Phase: IMDS credential retrieval + AWS Sig v4 signing - Vault Login Phase: provider calls /v1/auth/aws/login, STS verifies - Credential Issuance Phase: secrets engine generates JIT credentials - Resource Management Phase: AWS provider uses temporary creds Remove draw.io PNG render since sequence diagrams don't map well to editable draw.io shapes. Mermaid source is the authoritative version.
There was a problem hiding this comment.
Pull request overview
Adds a Mermaid sequence diagram documenting how credential material flows and transforms through the vault-iam-auth Terraform/Vault/AWS STS interaction, including trust boundary crossings.
Changes:
- Introduces a new
sequenceDiagramdescribing the auth/login and credential issuance phases. - Documents the data shapes at each step (metadata creds → signed request material → Vault token → STS temporary creds).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use IMDS field name "Token" (not "SessionToken") to match metadata response and aws-credentials.sh parsing - Fix SigV4 signing note to show correct key derivation chain: HMAC(AWS4+secret, date, region, sts, aws4_request) - Add iam_http_request_method to /v1/auth/aws/login request body
- Rewrite SigV4 note to show the 4-step process matching aws4-sign.sh: canonical request, string-to-sign, derived signing key, signature - Use X-Vault-Token header (not Authorization) to avoid confusion with the AWS SigV4 Authorization header
- Add trust boundary box annotations (EC2 Instance, Vault, AWS) - Use versioned IMDS path /2020-10-27/meta-data to match implementation - Add Version=2011-06-15 to STS GetCallerIdentity request body - Replace hvs.xxx with generic [vault_token] placeholder - Note base64 encoding on login payload fields
- Remove duplicate participant declarations; define only within box groups - Include X-Vault-AWS-IAM-Server-Id in SigV4 canonical request note - Show both /v1/aws/creds/:role and /v1/aws/sts/:role endpoints - Replace AWS STS target in Resource Management phase with Target AWS Services (EC2, S3, IAM, etc.) since STS is only for credential minting
- Use full endpoint paths in participant label: /v1/aws/creds/:role or /v1/aws/sts/:role - Fix Resource Management phase: Vault provider returns creds to Terraform, which then makes API calls to target AWS services
aws_credentials() first fetches creds using the profile name derived from the ARN, then re-fetches via the listing endpoint as validation. Show both calls to match the actual temporal flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Files
docs/diagrams/data-flow.mmddocs/diagrams/data-flow.pngTest plan