Skip to content

add identity and auth interfaces#105

Merged
dlm6693 merged 7 commits intodevelopfrom
identity-auth
Jan 4, 2023
Merged

add identity and auth interfaces#105
dlm6693 merged 7 commits intodevelopfrom
identity-auth

Conversation

@dlm6693
Copy link
Contributor

@dlm6693 dlm6693 commented Dec 19, 2022

Description of changes:
This adds several interfaces for identities and authentication. An Identity object represents who an AWS customer is. HttpAuthScheme represents a method by which the identity of a customer is authenticated. There are several other interfaces defined that are used for signing requests, resolving identities/auth schemes and configuring identity resolvers.

This also includes a couple of new exception types and a few additional paths to ignore in .gitignore.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

I left some target comments but it seems like we've taken a lot of the general purpose signing interface and put it directly into the AWS SDK.

If we can avoid customers having to reimplement all of this themselves, we should try to keep things like IdentityResolver and HttpSigner in smithy_python since they're not AWS specific. We should also try to avoid using "SDK" in most of these contexts and use the more general term "client".

@dlm6693 dlm6693 force-pushed the identity-auth branch 3 times, most recently from f7a3e47 to b6fff66 Compare December 27, 2022 18:09
@dlm6693 dlm6693 requested a review from jonemo December 27, 2022 20:45
"""Represents a way an AWS service will authenticate the customer's identity."""

scheme_id: str
"""A unique identifier for the authentication scheme (v4, v4a, none, bearer, etc.)."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have this pattern elsewhere in the codebase currently? If so, we should consider fixing this. We shouldn't be using multiple docstrings like this within the class definition generally. It's also odd they follow what they're discussing. Is there a reason for the current layout?

We can either include this info in a single docstring, or use line comments above the variable to add any specific information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this is the current style being used. I copied what was in retries and http. I can update to comments above the variable as I think they do provide helpful context.

cc @jonemo

Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

:shipit:

@dlm6693 dlm6693 dismissed JordonPhillips’s stale review January 4, 2023 19:05

already resolved

@dlm6693 dlm6693 merged commit ec00094 into develop Jan 4, 2023
@dlm6693 dlm6693 deleted the identity-auth branch January 4, 2023 19:05
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