-
Notifications
You must be signed in to change notification settings - Fork 28
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!: Modularize identity and auth #751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments to help reviewers.
@@ -36,8 +36,10 @@ let package = Package( | |||
.library(name: "SmithyXML", targets: ["SmithyXML"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 2 new modules: SmithyIdentity
and SmithyHTTPAuth
.
SmithyIdentity
has concrete implementation of the Identity
protocol from SmithyIdentityAPI
module, such as AWSCredentialIdentity
. It also has non-AWS specific AWS credential identity resolver such as StaticAWSCredentialIdentityResolver
.
SmithyHTTPAuth
has SigV4 signing config things moved from aws-sdk-swift. Moving the actual SigV4Signer
and the auth schemes (e.g., SigV4AuthScheme
) is on-hold for after HTTP modularization.
@@ -12,6 +12,7 @@ import class Smithy.Context | |||
import class SmithyHTTPAPI.SdkHttpRequestBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import statements have been made granular & updated to match new organization. No further comments will be made for this type of change.
@@ -1,21 +0,0 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is moved to SmithyHTTPAuth
module.
@@ -0,0 +1,61 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved from aws-sdk-swift.
@@ -0,0 +1,103 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all adapter methods that convert types in SmithyHTTPAuthAPI
to matching CRT types.
@@ -1,9 +0,0 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is moved to Sources/SmithyIdentity/AWSCredentialIdentityResolver.swift
, but git picked it up as deletion because the new file has new changes.
@@ -0,0 +1,26 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Organized into Context/
subdirectory along with other Context+XYZ
files.
@@ -0,0 +1,11 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved from aws-sdk-swift to here.
@@ -0,0 +1,20 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was moved from aws-sdk-swift to here, as the thing it's testing was moved as well.
@@ -0,0 +1,22 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was moved from aws-sdk-swift to here, as the thing it tests was moved here.
83ad11a
to
b5c8100
Compare
60a6fbb
to
328c8df
Compare
Package.swift
Outdated
.target( | ||
name: "SmithyHTTPAuthAPI", | ||
dependencies: ["Smithy", "SmithyHTTPAPI"] | ||
dependencies: ["Smithy", "SmithyHTTPAPI", "SmithyIdentityAPI", "SmithyChecksumsAPI"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SmithyChecksumsAPI shouldnt be a dependency here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed as pointed out
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import enum SmithyChecksumsAPI.ChecksumAlgorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a string / have no dependency on checksums
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed as pointed out
Companion PR: awslabs/aws-sdk-swift#1544
Issue #
awslabs/aws-sdk-swift#1382
awslabs/aws-sdk-swift#1383
Description of changes
Modularize identity & auth according to SRA.
Scope
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.