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

Support SSO #282

Open
russ-te2 opened this issue Apr 12, 2022 · 8 comments · May be fixed by #295
Open

Support SSO #282

russ-te2 opened this issue Apr 12, 2022 · 8 comments · May be fixed by #295
Labels
Feature roadmap feature

Comments

@russ-te2
Copy link

russ-te2 commented Apr 12, 2022

Abstract

In attempting to use AWS SSO I was given an error than an explicit access-key/secret-key was required, is SSO authentication supported?

Proposal

Support AWS SSO

@russ-te2 russ-te2 added the Feature roadmap feature label Apr 12, 2022
@xescugc
Copy link
Member

xescugc commented Apr 20, 2022

Right now it's not supported, we support profiles for AWS or normal flags/env.

Could you describe a bit more you usecase so we could check and potentially add it?

@Hokwang
Copy link

Hokwang commented May 13, 2022

@xescugc
Hi, I have same issue.

In my profile, it looks like,

[profile xxx-prod]
sso_start_url = https://xxx.awsapps.com/start
sso_region = ap-northeast-2
sso_account_id = xxxx
sso_role_name = xxxx-role
region = ap-northeast-2

and I log in using aws sso login --profile xxx command.

after logged in,
we don't need to use access key and secret key. so these should be optional.

@xescugc xescugc linked a pull request May 23, 2022 that will close this issue
@xescugc
Copy link
Member

xescugc commented May 23, 2022

This PR #295 should fix the issue ideally :).

@Hokwang
Copy link

Hokwang commented May 24, 2022

and you need to remove required option.

$ terracognita aws --aws-profile xxx --hcl . 
Error: the flag "access-key" is required

@xescugc
Copy link
Member

xescugc commented May 26, 2022

Did you build it from the PR? Because it's not yet merged.

@russ-te2
Copy link
Author

I built it from your branch (fg-282) and had the same issue.

@dusty73
Copy link

dusty73 commented Jun 23, 2022

The issue more in general is that the tool is requiring access key and secret key, that don't fit advanced authentication models such as SSO and ADFS.
In case you use the mentioned authentication methods, the access key and secret key are generated on the fly and stored in the .aws directory, and the aws sdk should be able to work out using the information supplied in the profile to perform the login. So I think you could remove the requirement for those 2 parameters, at least if the user is providing a profile name.

@rito-sixt
Copy link

rito-sixt commented Oct 21, 2022

Much needed for saml based authentication as well.

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

Successfully merging a pull request may close this issue.

5 participants