feat(pam): add AWS IAM CLI access#285
Conversation
Write temporary STS credentials to ~/.aws/credentials under a named profile (infisical-pam/<folder>/<account>). Credentials are cleaned up on Ctrl+C or session expiry. Follows the same pattern as Kubernetes kubeconfig management.
|
💬 Discussion in Slack: #pr-review-cli-285-feat-pam-add-aws-iam-cli-access Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
|
| Filename | Overview |
|---|---|
| packages/pam/local/aws-iam-access.go | New file implementing AWS IAM credential delivery via ~/.aws/credentials; previous review comments have been addressed, but silent chmod failure, unvalidated INI section names from user input, and lack of file locking for concurrent sessions remain. |
| packages/pam/local/access.go | One-line change routing the aws-iam account type to the new startAWSAccess handler instead of the previous stub error; no issues. |
Reviews (3): Last reviewed commit: "fix(pam): check credential expiry before..." | Re-trigger Greptile
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
Use cfg.Section() instead of cfg.NewSection() so that a leftover profile from a killed session is silently overwritten instead of causing a fatal error. Also always chmod credentials file to 0600 after write (not just when creating it), and guard against negative remaining duration from clock skew.
|
@greptile review |
Move the expiry guard before the file write so expired credentials are never written to ~/.aws/credentials.
|
@greptile review |
Context
Adds AWS IAM CLI access. Running
infisical pam access folder/accountfor an AWS IAM account writes temporary STS credentials to~/.aws/credentialsunder a named profile (infisical-pam/<folder>/<account>). Credentials are cleaned up on Ctrl+C or session expiry. Same pattern as Kubernetes kubeconfig management.Companion PR: Infisical/infisical#7054
Screenshots
Steps to verify the change
Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).