-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1984 from aws/staging/9370d83f-3e00-4034-a4bb-4b2…
…0e5498e96 Pull request: release <- staging/9370d83f-3e00-4034-a4bb-4b20e5498e96
- Loading branch information
Showing
390 changed files
with
2,311 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"version": "2.17.166", | ||
"date": "2022-04-07", | ||
"entries": [ | ||
{ | ||
"type": "feature", | ||
"category": "Amazon EventBridge", | ||
"contributor": "", | ||
"description": "Adds new EventBridge Endpoint resources for disaster recovery, multi-region failover, and cross-region replication capabilities to help you build resilient event-driven applications." | ||
}, | ||
{ | ||
"type": "feature", | ||
"category": "Amazon API Gateway", | ||
"contributor": "", | ||
"description": "ApiGateway CLI command get-usage now includes usagePlanId, startDate, and endDate fields in the output to match documentation." | ||
}, | ||
{ | ||
"type": "feature", | ||
"category": "Amazon SageMaker Service", | ||
"contributor": "", | ||
"description": "Amazon Sagemaker Notebook Instances now supports G5 instance types" | ||
}, | ||
{ | ||
"type": "feature", | ||
"category": "AWS Performance Insights", | ||
"contributor": "", | ||
"description": "Adds support for DocumentDB to the Performance Insights API." | ||
}, | ||
{ | ||
"type": "feature", | ||
"category": "Amazon DocumentDB with MongoDB compatibility", | ||
"contributor": "", | ||
"description": "Added support to enable/disable performance insights when creating or modifying db instances" | ||
}, | ||
{ | ||
"type": "feature", | ||
"category": "Amazon Personalize", | ||
"contributor": "", | ||
"description": "This release provides tagging support in AWS Personalize." | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
core/auth/src/main/java/software/amazon/awssdk/auth/signer/SignerLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package software.amazon.awssdk.auth.signer; | ||
|
||
import java.lang.reflect.InvocationTargetException; | ||
import java.lang.reflect.Method; | ||
import java.util.Map; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
import software.amazon.awssdk.annotations.SdkProtectedApi; | ||
import software.amazon.awssdk.core.internal.util.ClassLoaderHelper; | ||
import software.amazon.awssdk.core.signer.Signer; | ||
|
||
/** | ||
* Utility class for instantiating signers only if they're available on the class path. | ||
*/ | ||
@SdkProtectedApi | ||
public final class SignerLoader { | ||
|
||
private static final Map<String, Signer> SIGNERS = new ConcurrentHashMap<>(); | ||
|
||
private SignerLoader() { | ||
} | ||
|
||
public static Signer getSigV4aSigner() { | ||
return get("software.amazon.awssdk.authcrt.signer.AwsCrtV4aSigner"); | ||
} | ||
|
||
public static Signer getS3SigV4aSigner() { | ||
return get("software.amazon.awssdk.authcrt.signer.AwsCrtS3V4aSigner"); | ||
} | ||
|
||
private static Signer get(String fqcn) { | ||
return SIGNERS.computeIfAbsent(fqcn, SignerLoader::initializeV4aSigner); | ||
} | ||
|
||
private static Signer initializeV4aSigner(String fqcn) { | ||
try { | ||
Class<?> signerClass = ClassLoaderHelper.loadClass(fqcn, false, (Class) null); | ||
Method m = signerClass.getDeclaredMethod("create"); | ||
Object o = m.invoke(null); | ||
return (Signer) o; | ||
} catch (ClassNotFoundException e) { | ||
throw new IllegalStateException("Cannot find the " + fqcn + " class." | ||
+ " To invoke a request that requires a SigV4a signer, such as region independent " + | ||
"signing, the 'auth-crt' core module must be on the class path. ", e); | ||
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { | ||
throw new IllegalStateException("Failed to create " + fqcn, e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.