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(ec2): Allow using ec2 profile as creds #412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheRealFalcon
Copy link
Member

@TheRealFalcon TheRealFalcon commented Sep 10, 2024

I have a feeling I'm just missing something obvious, but with my SSO creds I can no longer get a secret key, but using a profile is an alternative that should work too.

@aciba90 aciba90 self-assigned this Sep 11, 2024
@aciba90
Copy link
Collaborator

aciba90 commented Sep 11, 2024

I have a feeling I'm just missing something obvious, but with my SSO creds I can no longer get a secret key, but using a profile is an alternative that should work too.

I think the idea behind SSO access is:

SSO let you access your root AWS account. From the root account, one can create a non-root user. And those non-root user's credentials can be used as previously in pycloudlib.

Does that work for you?

@TheRealFalcon
Copy link
Member Author

Does that work for you?

Makes sense, but I was actually able to find the credentials. They're just listed on a different screen at login time rather than the original account page.

I think this functionality is still useful though as it obviates the need to manage secret keys.

Copy link
Collaborator

@aciba90 aciba90 left a comment

Choose a reason for hiding this comment

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

Changeset looks good to me, thanks.

I think we should extend https://github.com/canonical/pycloudlib/blob/main/docs/clouds/ec2.md to clarify on how to use the profile mode. WDYT?

# If 'aws configure sso' has been run, 'profile' should be the only credentials needed
profile = "" # in ~/.aws/config

# With modern SSO, these should no longer be necessary.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: With modern SSO sounds a bit pretentious and likely prone to age bad. Something like the following?

Suggested change
# With modern SSO, these should no longer be necessary.
# If profile is given, these are not necessary.

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.

3 participants