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(cli): process credentials #11114

Merged
merged 8 commits into from
Nov 9, 2020
Merged

feat(cli): process credentials #11114

merged 8 commits into from
Nov 9, 2020

Conversation

hoegertn
Copy link
Contributor

This adds support for the credentials_process feature.

Using the aws-sso-credential-process utility you can also use AWS SSO with this feature

This should fix #3008

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Oct 26, 2020

@hoegertn
Copy link
Contributor Author

@rix0rrr @pahud this worked in my tests. Did I miss something obvious?

@pahud
Copy link
Contributor

pahud commented Oct 26, 2020

@rix0rrr @pahud this worked in my tests. Did I miss something obvious?

I haven't tested it yet. But LGTM. Thanks for your contribution!!

@rix0rrr rix0rrr changed the title feat(core): support process credentials feat(cli): process credentials Oct 28, 2020
rix0rrr
rix0rrr previously approved these changes Oct 28, 2020
@pahud
Copy link
Contributor

pahud commented Oct 28, 2020

checking the CI log

aws-cdk:   � with default config files › CLI compatible credentials loading › mfa_serial in profile will ask user for token
aws-cdk:     expect(received).toEqual(expected) // deep equality
aws-cdk:     Expected: "Error fetching MFA token: test"
aws-cdk:     Received: "Profile mfa-role did not include credential process"

Looks like this test was failing.

@hoegertn
Copy link
Contributor Author

Are you able to confirm that it works? So is the code broken or the tests needs change? I think the mock of the Mfa provider is the issue

@pahud
Copy link
Contributor

pahud commented Oct 29, 2020

Are you able to confirm that it works? So is the code broken or the tests needs change? I think the mock of the Mfa provider is the issue

Please see my screenshot. I can confirm it works ,but I have no idea how to fix that test at this time.

圖片

@mergify mergify bot dismissed rix0rrr’s stale review October 29, 2020 22:19

Pull request has been modified.

@hoegertn
Copy link
Contributor Author

I had to modify the MFA test as the MFA error is no longer thrown if there is another cred provider in the chain. I changed it to check the mock to be called instead of relying on the error message.

@rix0rrr It would be great if you could re-approve

rix0rrr
rix0rrr previously approved these changes Nov 9, 2020
@rix0rrr rix0rrr added the pr-linter/exempt-readme The PR linter will not require README changes label Nov 9, 2020
@mergify mergify bot dismissed rix0rrr’s stale review November 9, 2020 12:30

Pull request has been modified.

@mergify
Copy link
Contributor

mergify bot commented Nov 9, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 806e1a2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Nov 9, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 6efa5e1 into aws:master Nov 9, 2020
@hoegertn hoegertn deleted the hoegertn-process-creds branch July 17, 2021 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profile based credentials don't work with credential_process
4 participants