okta / okta-aws-cli

A CLI for having Okta as the IdP for AWS CLI operations
https://github.com/okta/okta-aws-cli
Other
128 stars 34 forks source link

Bringing in MatthewJohn's PR #162 - multiple config profiles in okta.yaml #175

Closed monde closed 9 months ago

monde commented 9 months ago

Configuration by profile name

Multiple okta-aws-cli configurations can be saved in the $HOME/.okta/okta.yaml file and are keyed by AWS profile name in the awscli.profiles section. This allows the operator to save many okta-aws-cli configurations in the okta.yaml.

$ okta-aws-cli web --profile staging

Example $HOME/.okta/okta.yaml

---
awscli:
  profiles:
    staging:
      oidc-client-id: "0osabc"
      org-domain: "org-stg.okata.com"
      aws-iam-idp: "arn:aws:iam::123:saml-provider/MyIdP"
      aws-iam-role: "arn:aws:iam::123:role/S3_Read"
      write-aws-credentials: true
      open-browser: true
    production:
      oidc-client-id: "0opabc"
      org-domain: "org-prd.okata.com"
      aws-iam-idp: "arn:aws:iam::456:saml-provider/MyIdP"
      aws-iam-role: "arn:aws:iam::456:role/S3_Read"
      write-aws-credentials: true
      open-browser: true

Closes #162 Closes #36