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: refactor AWS and identity pool clients to use suppliers #1776

Merged
merged 7 commits into from
Mar 27, 2024

Conversation

aeitzman
Copy link
Contributor

Refactors AWS and identity pool client types to use suppliers to get subject tokens and AWS security credentials. Moved internal implementations out of the client classes into stand alone supplier classes. Follow up PR will add support for custom suppliers in the client constructors.

@aeitzman aeitzman requested review from a team as code owners March 21, 2024 16:29
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Mar 21, 2024
src/auth/awsclient.ts Outdated Show resolved Hide resolved
src/auth/awsclient.ts Outdated Show resolved Hide resolved
src/auth/baseexternalclient.ts Show resolved Hide resolved
src/auth/defaultawssecuritycredentialssupplier.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@danielbankhead danielbankhead left a comment

Choose a reason for hiding this comment

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

Looks good so far; a few things + tests would wrap things up

src/auth/awsclient.ts Outdated Show resolved Hide resolved
src/auth/defaultawssecuritycredentialssupplier.ts Outdated Show resolved Hide resolved
src/auth/defaultawssecuritycredentialssupplier.ts Outdated Show resolved Hide resolved
src/auth/defaultawssecuritycredentialssupplier.ts Outdated Show resolved Hide resolved
src/auth/defaultawssecuritycredentialssupplier.ts Outdated Show resolved Hide resolved
src/auth/identitypoolclient.ts Outdated Show resolved Hide resolved
src/auth/urlsubjecttokensupplier.ts Outdated Show resolved Hide resolved
src/auth/urlsubjecttokensupplier.ts Outdated Show resolved Hide resolved
src/auth/identitypoolclient.ts Outdated Show resolved Hide resolved
src/auth/filesubjecttokensupplier.ts Outdated Show resolved Hide resolved
@aeitzman
Copy link
Contributor Author

Looks good so far; a few things + tests would wrap things up

What tests are you looking for? Since the new files are the same logic as the existing AWS/Identity pool clients, they already have coverage from the existing tests.

@danielbankhead
Copy link
Contributor

Looks good so far; a few things + tests would wrap things up

What tests are you looking for? Since the new files are the same logic as the existing AWS/Identity pool clients, they already have coverage from the existing tests.

Fair point; from a coverage standpoint this should all be the same. Tests would be useful for the follow-up PR.

@aeitzman
Copy link
Contributor Author

Looks good so far; a few things + tests would wrap things up

What tests are you looking for? Since the new files are the same logic as the existing AWS/Identity pool clients, they already have coverage from the existing tests.

Fair point; from a coverage standpoint this should all be the same. Tests would be useful for the follow-up PR.

Yep, the next PR will include unit tests around suppliers used to instantiate the clients

@aeitzman aeitzman merged commit 4ea7e8b into googleapis:programmatic-auth Mar 27, 2024
11 of 12 checks passed
aeitzman added a commit that referenced this pull request Apr 18, 2024
)

* feat: refactor AWS and identity pool clients to use suppliers (#1776)

* feat: refactor aws and identity pool credentials to use suppliers

* Apply suggestions from code review

Co-authored-by: Leo <[email protected]>

* Apply suggestions from code review

Co-authored-by: Daniel Bankhead <[email protected]>

* updating suppliers to use options objects

* updating docs

* moved transporter to context object and deprecated consts

* fix imports

---------

Co-authored-by: Leo <[email protected]>
Co-authored-by: Daniel Bankhead <[email protected]>

* feat: adds support for creating AWS and Identity Pool credentials with custom suppliers. (#1783)

* feat: adds support for users to build credentials with custom suppliers

Also adds default values to make it easier to instantiate credentials in code.

* Apply suggestions from code review

Co-authored-by: Leo <[email protected]>

* responding to review comments

---------

Co-authored-by: Leo <[email protected]>

* docs: adding documentation for programmatic auth feature (#1790)

* docs: adding documentation for programmatic auth feature

* fix typos

* Apply suggestions from code review

Co-authored-by: Leo <[email protected]>
Co-authored-by: Daniel Bankhead <[email protected]>

* add audience placeholder

---------

Co-authored-by: Leo <[email protected]>
Co-authored-by: Daniel Bankhead <[email protected]>

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix lint

---------

Co-authored-by: Leo <[email protected]>
Co-authored-by: Daniel Bankhead <[email protected]>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants