diff --git a/core/http-auth-aws-crt/pom.xml b/core/http-auth-aws-crt/pom.xml index d6f59ea0915c..6fb73bd7c704 100644 --- a/core/http-auth-aws-crt/pom.xml +++ b/core/http-auth-aws-crt/pom.xml @@ -54,6 +54,16 @@ http-auth-aws ${awsjavasdk.version} + + software.amazon.awssdk + http-client-spi + ${awsjavasdk.version} + + + software.amazon.awssdk + utils + ${awsjavasdk.version} + software.amazon.awssdk.crt aws-crt diff --git a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtS3V4aAuthScheme.java b/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtS3V4aAuthScheme.java deleted file mode 100644 index 402ef08de8f5..000000000000 --- a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtS3V4aAuthScheme.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.http.auth.aws.crt; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.aws.AwsV4aHttpSigner; -import software.amazon.awssdk.http.auth.spi.AuthScheme; -import software.amazon.awssdk.http.auth.spi.IdentityProviderConfiguration; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; -import software.amazon.awssdk.identity.spi.IdentityProvider; - -/** - * The aws.auth#sigv4a auth scheme, which uses a {@link AwsCredentialsIdentity} and {@link AwsCrtS3V4aHttpSigner}. - */ -@SdkPublicApi -public interface AwsCrtS3V4aAuthScheme extends AuthScheme { - - /** - * The scheme ID for this interface. - */ - String SCHEME_ID = "aws.auth#sigv4a"; - - /** - * Get a default implementation of a {@link AwsCrtS3V4aAuthScheme} - */ - static AwsCrtS3V4aAuthScheme create() { - return new AwsCrtS3V4aAuthScheme() { - }; - } - - /** - * Retrieve the scheme ID. - */ - @Override - default String schemeId() { - return SCHEME_ID; - } - - /** - * Retrieve the {@link AwsCredentialsIdentity} based {@link IdentityProvider} associated with this authentication scheme. - */ - @Override - default IdentityProvider identityProvider(IdentityProviderConfiguration providers) { - return providers.identityProvider(AwsCredentialsIdentity.class); - } - - /** - * Retrieve the {@link AwsV4aHttpSigner} associated with this authentication scheme. - */ - @Override - default AwsV4aHttpSigner signer() { - return AwsCrtV4aHttpSigner.create(); - } -} diff --git a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtS3V4aHttpSigner.java b/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtS3V4aHttpSigner.java deleted file mode 100644 index 2089d3e12be6..000000000000 --- a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtS3V4aHttpSigner.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.http.auth.aws.crt; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.aws.AwsV4aHttpSigner; -import software.amazon.awssdk.http.auth.aws.crt.internal.DefaultAwsCrtS3V4aHttpSigner; -import software.amazon.awssdk.http.auth.spi.HttpSigner; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; - -/** - * An {@link HttpSigner} that will sign a request using an AWS credentials ({@link AwsCredentialsIdentity}), - * specifically for S3-CRT. - */ -@SdkPublicApi -public interface AwsCrtS3V4aHttpSigner extends AwsV4aHttpSigner { - - /** - * Get a default implementation of a {@link AwsCrtS3V4aHttpSigner} - * - * @return AwsCrtS3V4aHttpSigner - */ - static AwsV4aHttpSigner create() { - return new DefaultAwsCrtS3V4aHttpSigner(); - } -} diff --git a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtV4aAuthScheme.java b/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtV4aAuthScheme.java deleted file mode 100644 index c4e94d488616..000000000000 --- a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtV4aAuthScheme.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.http.auth.aws.crt; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.aws.AwsV4aHttpSigner; -import software.amazon.awssdk.http.auth.spi.AuthScheme; -import software.amazon.awssdk.http.auth.spi.IdentityProviderConfiguration; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; -import software.amazon.awssdk.identity.spi.IdentityProvider; - -/** - * The aws.auth#sigv4a auth scheme, which uses a {@link AwsCredentialsIdentity} and {@link AwsCrtV4aHttpSigner}. - */ -@SdkPublicApi -public interface AwsCrtV4aAuthScheme extends AuthScheme { - - /** - * The scheme ID for this interface. - */ - String SCHEME_ID = "aws.auth#sigv4a"; - - /** - * Get a default implementation of a {@link AwsCrtV4aAuthScheme} - */ - static AwsCrtV4aAuthScheme create() { - return new AwsCrtV4aAuthScheme() { - }; - } - - /** - * Retrieve the scheme ID. - */ - @Override - default String schemeId() { - return SCHEME_ID; - } - - /** - * Retrieve the {@link AwsCredentialsIdentity} based {@link IdentityProvider} associated with this authentication scheme. - */ - @Override - default IdentityProvider identityProvider(IdentityProviderConfiguration providers) { - return providers.identityProvider(AwsCredentialsIdentity.class); - } - - /** - * Retrieve the {@link AwsV4aHttpSigner} associated with this authentication scheme. - */ - @Override - default AwsV4aHttpSigner signer() { - return AwsCrtV4aHttpSigner.create(); - } -} diff --git a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtV4aHttpSigner.java b/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtV4aHttpSigner.java deleted file mode 100644 index 1eb4aade96ca..000000000000 --- a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/AwsCrtV4aHttpSigner.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.http.auth.aws.crt; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.aws.AwsV4aHttpSigner; -import software.amazon.awssdk.http.auth.aws.crt.internal.signer.DefaultAwsCrtV4aHttpSigner; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; - -/** - * An {@link AwsV4aHttpSigner} that will sign a request using an AWS credentials ({@link AwsCredentialsIdentity}), specifically - * using CRT. - * TODO: Remove this once we can remove the auth-scheme. - */ -@SdkPublicApi -public interface AwsCrtV4aHttpSigner extends AwsV4aHttpSigner { - - /** - * Get a default implementation of a {@link AwsCrtV4aHttpSigner} - * - * @return AwsV4aHttpSigner - */ - static AwsV4aHttpSigner create() { - return new DefaultAwsCrtV4aHttpSigner(); - } -} diff --git a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/internal/signer/DefaultAwsCrtV4aHttpSigner.java b/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/DefaultAwsCrtV4aHttpSigner.java similarity index 93% rename from core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/internal/signer/DefaultAwsCrtV4aHttpSigner.java rename to core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/DefaultAwsCrtV4aHttpSigner.java index 39aabe42eaf4..6bfb3c9d04e5 100644 --- a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/internal/signer/DefaultAwsCrtV4aHttpSigner.java +++ b/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/DefaultAwsCrtV4aHttpSigner.java @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -package software.amazon.awssdk.http.auth.aws.crt.internal.signer; +package software.amazon.awssdk.http.auth.aws.crt; import static software.amazon.awssdk.http.auth.aws.crt.internal.CrtHttpRequestConverter.toRequest; import static software.amazon.awssdk.http.auth.aws.crt.internal.CrtUtils.sanitizeRequest; @@ -23,7 +23,7 @@ import java.time.Clock; import java.time.Duration; import java.util.concurrent.CompletableFuture; -import software.amazon.awssdk.annotations.SdkInternalApi; +import software.amazon.awssdk.annotations.SdkProtectedApi; import software.amazon.awssdk.crt.auth.signing.AwsSigner; import software.amazon.awssdk.crt.auth.signing.AwsSigningConfig; import software.amazon.awssdk.crt.auth.signing.AwsSigningResult; @@ -31,6 +31,8 @@ import software.amazon.awssdk.http.ContentStreamProvider; import software.amazon.awssdk.http.SdkHttpRequest; import software.amazon.awssdk.http.auth.aws.AwsV4aHttpSigner; +import software.amazon.awssdk.http.auth.aws.crt.internal.signer.V4aContext; +import software.amazon.awssdk.http.auth.aws.crt.internal.signer.V4aPayloadSigner; import software.amazon.awssdk.http.auth.aws.util.CredentialUtils; import software.amazon.awssdk.http.auth.spi.AsyncSignRequest; import software.amazon.awssdk.http.auth.spi.AsyncSignedRequest; @@ -44,9 +46,16 @@ * An implementation of a {@link AwsV4aHttpSigner} that uses properties to compose v4a-signers in order to delegate signing of a * request and payload (if applicable) accordingly. */ -@SdkInternalApi +@SdkProtectedApi public final class DefaultAwsCrtV4aHttpSigner implements AwsV4aHttpSigner { + /** + * Returns a default implementation for {@link AwsV4aHttpSigner}. + */ + public static AwsV4aHttpSigner create() { + return new DefaultAwsCrtV4aHttpSigner(); + } + private static Duration validateExpirationDuration(Duration expirationDuration) { if (expirationDuration.compareTo(PRESIGN_URL_MAX_EXPIRATION_DURATION) > 0) { throw new IllegalArgumentException( diff --git a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/internal/DefaultAwsCrtS3V4aHttpSigner.java b/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/internal/DefaultAwsCrtS3V4aHttpSigner.java deleted file mode 100644 index fe50ecf3eb6a..000000000000 --- a/core/http-auth-aws-crt/src/main/java/software/amazon/awssdk/http/auth/aws/crt/internal/DefaultAwsCrtS3V4aHttpSigner.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.http.auth.aws.crt.internal; - -import java.util.concurrent.CompletableFuture; -import software.amazon.awssdk.annotations.SdkInternalApi; -import software.amazon.awssdk.http.auth.aws.crt.AwsCrtS3V4aHttpSigner; -import software.amazon.awssdk.http.auth.spi.AsyncSignRequest; -import software.amazon.awssdk.http.auth.spi.AsyncSignedRequest; -import software.amazon.awssdk.http.auth.spi.SyncSignRequest; -import software.amazon.awssdk.http.auth.spi.SyncSignedRequest; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; - -/** - * A default implementation of {@link AwsCrtS3V4aHttpSigner}. - */ -@SdkInternalApi -public class DefaultAwsCrtS3V4aHttpSigner implements AwsCrtS3V4aHttpSigner { - - @Override - public SyncSignedRequest sign(SyncSignRequest request) { - throw new UnsupportedOperationException(); - } - - @Override - public CompletableFuture signAsync(AsyncSignRequest request) { - throw new UnsupportedOperationException(); - } -} diff --git a/core/http-auth-aws-crt/src/test/java/software/amazon/awssdk/http/auth/aws/crt/internal/signer/DefaultAwsCrtV4aHttpSignerTest.java b/core/http-auth-aws-crt/src/test/java/software/amazon/awssdk/http/auth/aws/crt/DefaultAwsCrtV4aHttpSignerTest.java similarity index 98% rename from core/http-auth-aws-crt/src/test/java/software/amazon/awssdk/http/auth/aws/crt/internal/signer/DefaultAwsCrtV4aHttpSignerTest.java rename to core/http-auth-aws-crt/src/test/java/software/amazon/awssdk/http/auth/aws/crt/DefaultAwsCrtV4aHttpSignerTest.java index d9cc8899d9c0..50ffa09d9a0b 100644 --- a/core/http-auth-aws-crt/src/test/java/software/amazon/awssdk/http/auth/aws/crt/internal/signer/DefaultAwsCrtV4aHttpSignerTest.java +++ b/core/http-auth-aws-crt/src/test/java/software/amazon/awssdk/http/auth/aws/crt/DefaultAwsCrtV4aHttpSignerTest.java @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -package software.amazon.awssdk.http.auth.aws.crt.internal.signer; +package software.amazon.awssdk.http.auth.aws.crt; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertNull; @@ -28,7 +28,6 @@ import java.time.Duration; import org.junit.jupiter.api.Test; import software.amazon.awssdk.crt.auth.signing.AwsSigningConfig; -import software.amazon.awssdk.http.auth.aws.crt.TestUtils; import software.amazon.awssdk.http.auth.spi.AsyncSignRequest; import software.amazon.awssdk.http.auth.spi.SyncSignRequest; import software.amazon.awssdk.http.auth.spi.SyncSignedRequest; diff --git a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsS3V4AuthScheme.java b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsS3V4AuthScheme.java deleted file mode 100644 index 34098146d24a..000000000000 --- a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsS3V4AuthScheme.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.http.auth.aws; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.spi.AuthScheme; -import software.amazon.awssdk.http.auth.spi.IdentityProviderConfiguration; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; -import software.amazon.awssdk.identity.spi.IdentityProvider; - -/** - * The aws.auth#sigv4 auth scheme, which uses a - * {@link AwsCredentialsIdentity} and {@link AwsS3V4HttpSigner}. - */ -@SdkPublicApi -public interface AwsS3V4AuthScheme extends AuthScheme { - - /** - * Get a default implementation of a {@link AwsS3V4AuthScheme} - */ - static AwsS3V4AuthScheme create() { - return new AwsS3V4AuthScheme() { - }; - } - - /** - * Retrieve the scheme ID. - */ - @Override - default String schemeId() { - return "aws.auth#sigv4"; - } - - /** - * Retrieve the {@link AwsCredentialsIdentity} based {@link IdentityProvider} associated with this authentication scheme. - */ - @Override - default IdentityProvider identityProvider(IdentityProviderConfiguration providers) { - return providers.identityProvider(AwsCredentialsIdentity.class); - } - - /** - * Retrieve the {@link AwsS3V4HttpSigner} associated with this authentication scheme. - */ - @Override - default AwsS3V4HttpSigner signer() { - return AwsS3V4HttpSigner.create(); - } -} diff --git a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsS3V4HttpSigner.java b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsS3V4HttpSigner.java deleted file mode 100644 index e786edaace06..000000000000 --- a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsS3V4HttpSigner.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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.http.auth.aws; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.aws.internal.signer.SignerLoader; -import software.amazon.awssdk.http.auth.spi.HttpSigner; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; - -/** - * An {@link HttpSigner} that will sign a request using an AWS credentials ({@link AwsCredentialsIdentity}), - * specifically for S3. - * TODO: Delete this interface once auth-scheme is cleaned up. - */ -@SdkPublicApi -public interface AwsS3V4HttpSigner extends HttpSigner { - - /** - * Get a default implementation of a {@link AwsS3V4HttpSigner} - * - * @return AwsS3V4HttpSigner - */ - static AwsS3V4HttpSigner create() { - return SignerLoader.getS3SigV4aSigner(); - } -} diff --git a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4QueryAuthScheme.java b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4QueryAuthScheme.java deleted file mode 100644 index 8e7f02471d78..000000000000 --- a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4QueryAuthScheme.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.http.auth.aws; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.spi.AuthScheme; -import software.amazon.awssdk.http.auth.spi.IdentityProviderConfiguration; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; -import software.amazon.awssdk.identity.spi.IdentityProvider; - -/** - * The aws.auth#sigv4 auth scheme, which uses a - * {@link AwsCredentialsIdentity} and {@link AwsV4QueryHttpSigner}. - */ -@SdkPublicApi -public interface AwsV4QueryAuthScheme extends AuthScheme { - - /** - * Get a default implementation of a {@link AwsV4QueryAuthScheme} - */ - static AwsV4QueryAuthScheme create() { - return new AwsV4QueryAuthScheme() { - }; - } - - /** - * Retrieve the scheme ID. - */ - @Override - default String schemeId() { - return "aws.auth#sigv4"; - } - - /** - * Retrieve the {@link AwsCredentialsIdentity} based {@link IdentityProvider} associated with this authentication scheme. - */ - @Override - default IdentityProvider identityProvider(IdentityProviderConfiguration providers) { - return providers.identityProvider(AwsCredentialsIdentity.class); - } - - /** - * Retrieve the {@link AwsV4QueryHttpSigner} associated with this authentication scheme. - */ - @Override - default AwsV4QueryHttpSigner signer() { - return AwsV4QueryHttpSigner.create(); - } -} diff --git a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4QueryHttpSigner.java b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4QueryHttpSigner.java deleted file mode 100644 index 6467ca1d0932..000000000000 --- a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4QueryHttpSigner.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.http.auth.aws; - -import software.amazon.awssdk.annotations.SdkPublicApi; -import software.amazon.awssdk.http.auth.spi.HttpSigner; -import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; - -/** - * An {@link HttpSigner} that will sign a request using an AWS credentials ({@link AwsCredentialsIdentity}), specifically for - * query. - *

- * The process for signing requests to AWS services is documented - * here. - *

- * TODO: Delete this interface once auth-scheme is cleaned up. - */ -@SdkPublicApi -public interface AwsV4QueryHttpSigner extends AwsV4HttpSigner { - - /** - * Get a default implementation of a {@link AwsV4QueryHttpSigner} - * - * @return DefaultAwsV4QueryHttpSigner - */ - static AwsV4QueryHttpSigner create() { - return null; - } -} diff --git a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4aHttpSigner.java b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4aHttpSigner.java index 77110bf8b9fe..efc47cb7483e 100644 --- a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4aHttpSigner.java +++ b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/AwsV4aHttpSigner.java @@ -89,7 +89,7 @@ public interface AwsV4aHttpSigner extends HttpSigner { * Get a default implementation of a {@link AwsV4aHttpSigner} */ static AwsV4aHttpSigner create() { - return SignerLoader.getSigV4aSigner(); + return SignerLoader.getAwsV4aHttpSigner(); } /** diff --git a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/SignerLoader.java b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/SignerLoader.java index 80c749e749d8..6b9f5022f14a 100644 --- a/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/SignerLoader.java +++ b/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/SignerLoader.java @@ -20,7 +20,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import software.amazon.awssdk.annotations.SdkInternalApi; -import software.amazon.awssdk.http.auth.aws.AwsS3V4HttpSigner; import software.amazon.awssdk.http.auth.aws.AwsV4aHttpSigner; import software.amazon.awssdk.http.auth.spi.HttpSigner; import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity; @@ -37,12 +36,8 @@ public final class SignerLoader { private SignerLoader() { } - public static AwsV4aHttpSigner getSigV4aSigner() { - return get(AwsV4aHttpSigner.class, "software.amazon.awssdk.http.auth.aws.crt.AwsCrtV4aHttpSigner"); - } - - public static AwsS3V4HttpSigner getS3SigV4aSigner() { - return get(AwsS3V4HttpSigner.class, "software.amazon.awssdk.http.auth.aws.crt.AwsCrtS3V4aHttpSigner"); + public static AwsV4aHttpSigner getAwsV4aHttpSigner() { + return get(AwsV4aHttpSigner.class, "software.amazon.awssdk.http.auth.aws.crt.DefaultAwsCrtV4aHttpSigner"); } @SuppressWarnings("unchecked")