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): credentials system uses AWS SDK v3 #31572

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

otaviomacedo
Copy link
Contributor

@otaviomacedo otaviomacedo commented Sep 26, 2024

Changes (for now)

  • New package, cdk-credential-provider (provisional name), that serves as an API contract for plugin writers.
  • The public API exposes a new type CdkCredentials, that replaces AWS.Credentials. The new type is backwards compatible.
  • Fix for --proxy command line option. It is just ignored right now.
  • Removed PatchedSharedIniFileCredentials. AWS SDK v3 now supports both use cases that motivated the creation of this class: credential_source configuration option, and SSO profiles when reading from a shared credentials file.
  • Some tests were testing the implementation details of v2. For example, to make sure that we are getting credentials via the EC2 instance metadata service, we were checking whether Ec2InstanceMetadata.refresh()was being called. Since v3 does things differently, I created a fake metadata service, similar to the Fake STS.

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team September 26, 2024 13:09
@github-actions github-actions bot added the p2 label Sep 26, 2024
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 26, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation added the pr/needs-cli-test-run This PR needs CLI tests run against it. label Sep 26, 2024
@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Features must contain a change to a README file.
❌ Features must contain a change to an integration test file and the resulting snapshot.
❌ CLI code has changed. A maintainer must run the code through the testing pipeline (git fetch origin pull/31572/head && git push -f origin FETCH_HEAD:test-main-pipeline), then add the 'pr-linter/cli-integ-tested' label when the pipeline succeeds.

PRs must pass status checks before we can provide a meaningful review.

If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing Exemption Request and/or Clarification Request.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7c46bd9
  • Result: FAILED
  • Build Logs (available for 30 days)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2 pr/needs-cli-test-run This PR needs CLI tests run against it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants