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

SigV4A auth selection update #3225

Merged
merged 1 commit into from
Dec 18, 2024
Merged

SigV4A auth selection update #3225

merged 1 commit into from
Dec 18, 2024

Conversation

SergeyRyabinin
Copy link
Contributor

Issue #, if available:
specification update
Description of changes:
c2j models now have an auth list metadata that represents a list of supported Auth Schemes on the service client.
SDKs must rely on this trait to generate a SigV4-Asymmetric signer instead of Endpoint Rules.
(with the exception of 4 service clients at the moment whose service models are non-compliant on this regard
S3
CloudFront KeyValueStore
SESv2
EventBridge)

tested by generating all and seeing no diff is generated (as expected now).

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

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

@@ -208,6 +208,37 @@ protected void addRequestIdToResults(final ServiceModel serviceModel) {
});
}

private static Set<String> servicesMissingMultiAuthMRAPTrait = new HashSet<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could just do

private static Set<String> servicesMissingMultiAuthMRAPTrait = ImmutableSet.of(
  "S3",
  "S3-CRT",
  "CloudFront KeyValueStore",
  "SESv2",
  "EventBridge",
)

intead of having to have a static block, imo avoiding the static block is nice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, ty

context.put("multiRegionAccessPointSupported", true);
}
// todo: remove these checks later
if (serviceModel.getEndpointRules().contains("\"sigv4a\"") &&
Copy link
Contributor

@sbera87 sbera87 Dec 17, 2024

Choose a reason for hiding this comment

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

besides endpoint rules, I think we should also check in operations. at operation level there can be authscheme in "auth" field (example cognito idp, even though its no auth but we just add the infra in case of operation level support)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, thank you.
although, I'm not sure we need to check for noauth or bearer per operation.
This block is for enabling MRAP flag only, not for c2j model validation.

Copy link
Contributor

@sbera87 sbera87 left a comment

Choose a reason for hiding this comment

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

lgtm

@SergeyRyabinin SergeyRyabinin merged commit 90616c2 into main Dec 18, 2024
4 of 5 checks passed
@SergeyRyabinin SergeyRyabinin deleted the sr/MultiAuth branch December 18, 2024 17:19
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