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

fix(cognito-identitypool): refactor authentication providers #31482

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

Conversation

Leo10Gama
Copy link
Member

Issue # (if applicable)

N/A

Reason for this change

The authentication providers and their logic in this module have bad code smells, and thus, we have refactored them to bring the module more in line with CDK standards and best practices.

Description of changes

  • Any modules relating to the Digits auth have been tagged with the deprecated tag, as the service was deprecated back in 2017.
  • All of the login providers now extend from a common interface, IdentityPoolAuthenticationProvider, as they were incredibly similar aside from slight differences in docstrings and nomenclature.
  • The IdentityPoolProviders and IdentityPoolAuthenticationProviders interfaces have been merged, as there did not seem to be a reason to keep them separate, aside from differentiating third-party and internal providers.

Description of how you validated changes

Unit tests and integration tests have been tweaked only as necessary to confirm these changes. Since they all still pass or show no need to be updated, we can confirm that this refactor does not affect them.

Checklist


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

@github-actions github-actions bot added the p2 label Sep 18, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team September 18, 2024 17:29
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 18, 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.

@Leo10Gama
Copy link
Member Author

Exemption Request - this is a refactor; seeing no changes to the integ tests is expected

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Sep 18, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review September 19, 2024 20:07

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@@ -179,19 +180,19 @@ new IdentityPool(this, 'myidentitypool', {
identityPoolName: 'myidentitypool',
authenticationProviders: {
amazon: {
appId: 'amzn1.application.12312k3j234j13rjiwuenf',
clientId: 'amzn1.application.12312k3j234j13rjiwuenf',
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to be a breaking change though, can we mention in the PR.

…ool.ts

Co-authored-by: Shikha Aggarwal <shikhaaggarwal1995@gmail.com>
@shikha372 shikha372 self-assigned this Sep 20, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: f19cd25
  • Result: SUCCEEDED
  • 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-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants