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

feat(console) Log into the AWS console from saml2aws #410

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

wolfeidau
Copy link
Contributor

@wolfeidau wolfeidau commented Jan 24, 2020

As per https://segment.com/blog/secure-access-to-100-aws-accounts/ I have implemented AWS console login directly from saml2aws.

This will open using your default browser.

Note: Like the exec command, if your credentials are still active this will not prompt for login.

As per https://segment.com/blog/secure-access-to-100-aws-accounts/ I have implemented console log in directly from saml2aws.

Note: Like the exec command, if your credentials are still active this will not prompt for login.
@wolfeidau wolfeidau merged commit b7a08b2 into master Jan 24, 2020
@wolfeidau wolfeidau deleted the feat_console_login branch January 24, 2020 00:56
--skip-prompt Skip prompting for parameters during login.
--exec-profile Execute the given command utilizing a specific profile from your ~/.aws/config file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this get removed from the readme?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran the help command and updated the version in the README. May have been removed in a previous PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#420 has some fixes for the issues you have identified.

return errors.Wrap(err, "error logging in")
}

if consoleFlags.ExecProfile != "" {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saml2aws console --exec-profile staging-admin
saml2aws: error: unknown long flag '--exec-profile', try --help

Does this command need a different flag set? It looks like it is currently sharing with 'login'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be a copy paste issue, i wanted to demo it more widely so I released it a bit early TBH given it was a new command.

It may have been a bit rough.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure you can do a 'login to this secondary assume' (eg: okta -> loginRole -> assumedRole -> web console) anyway - I tried to do it using python and got stuck - the closest I got is that you can open directly to the 'Switch Role' page directly and fill the info in, which is at least just a click away.

destination := "https://console.aws.amazon.com/"

loginURL := fmt.Sprintf(
"https://signin.aws.amazon.com/federation?Action=login&Issuer=aws-okta&Destination=%s&SigninToken=%s",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this have a different issuer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it should, nice pickup!

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

Successfully merging this pull request may close these issues.

2 participants