Problem
The AWS vault provider and auto-registration do not support AWS_PROFILE-based authentication:
-
Vault auto-registration (vault_service.ts:ensureDefaultVaults) only checks for AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY + AWS_REGION. If a user relies on AWS_PROFILE for SSO/role-based auth, the automatic aws-sm vault is never created.
-
AWS vault provider (aws_vault_provider.ts) only accepts { region: string } in its config. There is no way to pass a named profile, even though the design doc (design/vaults.md) specifies profile as a supported config option.
-
vault create CLI (vault_create.ts) has no --profile flag for the aws-sm type.
Proposed Solution
Vault auto-registration
- Check
AWS_PROFILE as an alternative to explicit AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY
- Also check
AWS_DEFAULT_REGION as a region fallback (matches AWS SDK precedence)
- Pass
profile through to the vault provider config when AWS_PROFILE is set
- Update error messages to mention
AWS_PROFILE as an option
AWS vault provider
- Export an
AwsVaultConfig interface: { region: string; profile?: string }
- When
profile is set, use fromIni({ profile }) from @aws-sdk/credential-provider-ini
- Add
@aws-sdk/credential-provider-ini as a direct import in deno.json (already a transitive dep)
vault create CLI
- Add
--profile <profile:string> option
- Resolve from flag or
AWS_PROFILE env var
- Include in persisted config when present
Related
Problem
The AWS vault provider and auto-registration do not support
AWS_PROFILE-based authentication:Vault auto-registration (
vault_service.ts:ensureDefaultVaults) only checks forAWS_ACCESS_KEY_ID+AWS_SECRET_ACCESS_KEY+AWS_REGION. If a user relies onAWS_PROFILEfor SSO/role-based auth, the automaticaws-smvault is never created.AWS vault provider (
aws_vault_provider.ts) only accepts{ region: string }in its config. There is no way to pass a named profile, even though the design doc (design/vaults.md) specifiesprofileas a supported config option.vault createCLI (vault_create.ts) has no--profileflag for theaws-smtype.Proposed Solution
Vault auto-registration
AWS_PROFILEas an alternative to explicitAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGIONas a region fallback (matches AWS SDK precedence)profilethrough to the vault provider config whenAWS_PROFILEis setAWS_PROFILEas an optionAWS vault provider
AwsVaultConfiginterface:{ region: string; profile?: string }profileis set, usefromIni({ profile })from@aws-sdk/credential-provider-ini@aws-sdk/credential-provider-inias a direct import indeno.json(already a transitive dep)vault createCLI--profile <profile:string>optionAWS_PROFILEenv varRelated
design/vaults.mdlines 168-189