diff --git a/services/acm/pom.xml b/services/acm/pom.xml index 97c86ba93ace..8f6b4ea0cd21 100644 --- a/services/acm/pom.xml +++ b/services/acm/pom.xml @@ -61,5 +61,11 @@ http-auth-aws ${awsjavasdk.version} + + software.amazon.awssdk + auth-crt + ${awsjavasdk.version} + test + diff --git a/services/acm/src/it/java/software/amazon/awssdk/services/acm/AwsCertficateManagerIntegrationTest.java b/services/acm/src/it/java/software/amazon/awssdk/services/acm/AwsCertficateManagerIntegrationTest.java index fc281388891c..32be1c442233 100644 --- a/services/acm/src/it/java/software/amazon/awssdk/services/acm/AwsCertficateManagerIntegrationTest.java +++ b/services/acm/src/it/java/software/amazon/awssdk/services/acm/AwsCertficateManagerIntegrationTest.java @@ -19,6 +19,8 @@ import org.junit.BeforeClass; import org.junit.Test; import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; +import software.amazon.awssdk.authcrt.signer.AwsCrtV4aSigner; +import software.amazon.awssdk.core.client.config.SdkAdvancedClientOption; import software.amazon.awssdk.services.acm.model.AcmException; import software.amazon.awssdk.services.acm.model.GetCertificateRequest; import software.amazon.awssdk.services.acm.model.ListCertificatesRequest; @@ -40,6 +42,17 @@ public void list_certificates() { Assert.assertTrue(result.certificateSummaryList().size() >= 0); } + @Test + public void list_certificates_using_oldSigv4aSigner() { + AcmClient client = AcmClient.builder() + .credentialsProvider(StaticCredentialsProvider.create(getCredentials())) + .overrideConfiguration(c -> c.putAdvancedOption(SdkAdvancedClientOption.SIGNER, + AwsCrtV4aSigner.create())) + .build(); + ListCertificatesResponse result = client.listCertificates(ListCertificatesRequest.builder().build()); + Assert.assertTrue(result.certificateSummaryList().size() >= 0); + } + /** * Ideally the service must be throwing a Invalid Arn exception * instead of SdkServiceException. Have reported this to service to diff --git a/services/acm/src/it/resources/log4j2.properties b/services/acm/src/it/resources/log4j2.properties new file mode 100644 index 000000000000..e5e68dd2faa4 --- /dev/null +++ b/services/acm/src/it/resources/log4j2.properties @@ -0,0 +1,38 @@ +# +# 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. +# + +status = warn + +appender.console.type = Console +appender.console.name = ConsoleAppender +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n%throwable + +rootLogger.level = info +rootLogger.appenderRef.stdout.ref = ConsoleAppender + +# Uncomment below to enable more specific logging +# +#logger.sdk.name = software.amazon.awssdk +#logger.sdk.level = debug +# +#logger.request.name = software.amazon.awssdk.request +#logger.request.level = debug +# +#logger.apache.name = org.apache.http.wire +#logger.apache.level = debug +# +#logger.netty.name = io.netty.handler.logging +#logger.netty.level = debug