Skip to content

fixes #10 Add support for SSO/organization login#12

Closed
seifrajhi wants to merge 37 commits intonilbuild:masterfrom
seifrajhi:master
Closed

fixes #10 Add support for SSO/organization login#12
seifrajhi wants to merge 37 commits intonilbuild:masterfrom
seifrajhi:master

Conversation

@seifrajhi
Copy link
Copy Markdown

Description of change

We Would like to be able to get a cost summary of all of the accounts within our AWS Organization account using SSO login

Therefore, we want to use SSO login instead of configuring ~/.aws/credentials file with static credentials

Pull-Request Checklist

  • Code is up-to-date with the main branch
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions outlined in the conventional commit spec

@seifrajhi
Copy link
Copy Markdown
Author

  1. separate function is created loadSsoAwsCredentials
  2. SSO retrieval is placed is last
  3. Camel case is now used instead of underscores and creds is replaced by credentials

@seifrajhi
Copy link
Copy Markdown
Author

Hello @kamranahmedse, changes are done as asked.

Comment thread src/config.ts Outdated
Comment on lines +114 to +123
const awsCredentials = fromSSO({
profile: profile,
});

const ssoCredentials = new SSOClient({
region: region,
credentials: awsCredentials,
});

const credentials = await ssoCredentials.config.credentials();
Copy link
Copy Markdown
Owner

@nilbuild nilbuild May 16, 2023

Choose a reason for hiding this comment

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

There are TypeScript errors in this section. Type definitions do not seem to match. Can you please have a look?

image

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