From c548dcfd7274b89b42351325cfee86e422c7854a Mon Sep 17 00:00:00 2001 From: Jeremy Stott Date: Sat, 20 Apr 2019 23:12:20 +1200 Subject: [PATCH] Fixed refresh token and storing in keychain. Beginning to list roles given a clientid. --- README.md | 30 +++++++++++++---- aws-oidc.go | 4 ++- cli/exec.go | 49 +++++++++++++--------------- cli/list.go | 55 +++++++++++++++++++++++++++++++ go.mod | 1 + provider/provider.go | 78 ++++++++++++++++++++++++++++++++------------ 6 files changed, 162 insertions(+), 55 deletions(-) create mode 100644 cli/list.go diff --git a/README.md b/README.md index dcae344..c17df41 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,26 @@ Now you can use the AWS cli as normal, and specify the profile: ## AWS Cognito - ./aws-oidc exec \ - --provider_url=https://cognito-idp.us-west-2.amazonaws.com/us-west-2_eBYNmnpS9 \ - --client_id=70kdnvprlqf1daspkn0iikdngv \ - --pkce \ - --nonce \ - --no-reauth \ - -- open -b com.google.chrome -n --args --profile-directory=Default {} + ./aws-oidc exec \ + --provider_url=https://cognito-idp.us-west-2.amazonaws.com/us-west-2_eBYNmnpS9 \ + --client_id=70kdnvprlqf1daspkn0iikdngv \ + --pkce \ + --nonce \ + --no-reauth \ + -- open -b com.google.chrome -n --args --profile-directory=Default {} + +## Find roles that an oidc client could assume + + aws-vault exec test-privileged-admin -- aws iam list-roles --query <