Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using saml2aws with AWS Identity Center IdP #1261

Open
TonioGela opened this issue May 6, 2024 · 2 comments
Open

Using saml2aws with AWS Identity Center IdP #1261

TonioGela opened this issue May 6, 2024 · 2 comments

Comments

@TonioGela
Copy link

TonioGela commented May 6, 2024

Has someone been able to use saml2aws with AWS Identity Center? Configuring it as a browser simply redirects to the aws idp login page, without injecting the credentials and once logged in the console on the opened browser the information is not propagated to the cli and it hangs.

This is my configuration

[default]
name                    = default
app_id                  =
url                     = https://<redacted>.awsapps.com/start/#
username                = toniogela
provider                = Browser
mfa                     = Auto
mfa_ip_address          =
skip_verify             = false
timeout                 = 0
aws_urn                 = urn:amazon:webservices
aws_session_duration    = 3600
aws_profile             = toniogela
resource_id             =
subdomain               =
role_arn                =
region                  =
http_attempts_count     =
http_retry_delay        =
credentials_file        =
saml_cache              = false
saml_cache_file         =
target_url              =
disable_remember_device = false
disable_sessions        = false
download_browser_driver = false
headless                = false
prompter                =

Any help would be appreciated

@ethanzh
Copy link

ethanzh commented May 7, 2024

I am also looking for this functionality

@monty16597
Copy link

You can use official feature of the AWS CLI

Steps

  1. Create session config using
$ aws configure sso-session
# SSO session name: <session_name i.e. organization name>
# SSO start URL [None]: https://my-sso-portal.awsapps.com/start
# SSO region [None]: us-east-1
# SSO registration scopes [None]: sso:account:access
  1. Create credential profile in ~/.aws/credentials
$ cat ~/.aws/credentials
# [<profile_name>]
# sso_session = <session_name_passed_above>
# sso_account_id = 111122223333
# sso_role_name = <role_you_want_use>
  1. Login into your session using below command. It will open the browser and ask to authorize the login.
$ aws sso login --profile <profile_name>

Ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants