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

fix(experimentalIdentityAndAuth): revert release phase for SQS #5599

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions clients/client-sqs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"@aws-sdk/middleware-logger": "*",
"@aws-sdk/middleware-recursion-detection": "*",
"@aws-sdk/middleware-sdk-sqs": "*",
"@aws-sdk/middleware-signing": "*",
"@aws-sdk/middleware-user-agent": "*",
"@aws-sdk/region-config-resolver": "*",
"@aws-sdk/types": "*",
"@aws-sdk/util-endpoints": "*",
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^2.0.21",
"@smithy/core": "^1.2.0",
"@smithy/fetch-http-handler": "^2.3.1",
"@smithy/hash-node": "^2.0.17",
"@smithy/invalid-dependency": "^2.0.15",
Expand All @@ -56,7 +56,6 @@
"@smithy/util-defaults-mode-browser": "^2.0.22",
"@smithy/util-defaults-mode-node": "^2.0.29",
"@smithy/util-endpoints": "^1.0.7",
"@smithy/util-middleware": "^2.0.8",
"@smithy/util-retry": "^2.0.8",
"@smithy/util-utf8": "^2.0.2",
"tslib": "^2.5.0"
Expand Down
67 changes: 22 additions & 45 deletions clients/client-sqs/src/SQSClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ import {
} from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
getAwsAuthPlugin,
resolveAwsAuthConfig,
} from "@aws-sdk/middleware-signing";
import {
getUserAgentPlugin,
resolveUserAgentConfig,
UserAgentInputConfig,
UserAgentResolvedConfig,
} from "@aws-sdk/middleware-user-agent";
import { Credentials as __Credentials } from "@aws-sdk/types";
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
import {
DefaultIdentityProviderConfig,
getHttpAuthSchemeEndpointRuleSetPlugin,
getHttpSigningPlugin,
} from "@smithy/core";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
Expand All @@ -30,7 +32,6 @@ import {
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
} from "@smithy/smithy-client";
import {
AwsCredentialIdentityProvider,
BodyLengthCalculator as __BodyLengthCalculator,
CheckOptionalClientConfig as __CheckOptionalClientConfig,
Checksum as __Checksum,
Expand All @@ -49,12 +50,6 @@ import {
UserAgent as __UserAgent,
} from "@smithy/types";

import {
defaultSQSHttpAuthSchemeParametersProvider,
HttpAuthSchemeInputConfig,
HttpAuthSchemeResolvedConfig,
resolveHttpAuthSchemeConfig,
} from "./auth/httpAuthSchemeProvider";
import { AddPermissionCommandInput, AddPermissionCommandOutput } from "./commands/AddPermissionCommand";
import {
CancelMessageMoveTaskCommandInput,
Expand Down Expand Up @@ -250,29 +245,28 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
useFipsEndpoint?: boolean | __Provider<boolean>;

/**
* A constructor for a class implementing the {@link __Checksum} interface
* that computes MD5 hashes.
* @internal
* The AWS region to which this client will send requests
*/
md5?: __ChecksumConstructor | __HashConstructor;
region?: string | __Provider<string>;

/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* Default credentials provider; Not available in browser runtime.
* @internal
*/
defaultUserAgentProvider?: Provider<__UserAgent>;
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;

/**
* The AWS region to which this client will send requests
* A constructor for a class implementing the {@link __Checksum} interface
* that computes MD5 hashes.
* @internal
*/
region?: string | __Provider<string>;
md5?: __ChecksumConstructor | __HashConstructor;

/**
* Default credentials provider; Not available in browser runtime.
* @deprecated
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
*/
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
defaultUserAgentProvider?: Provider<__UserAgent>;

/**
* Value for how many times a request will be made at most in case of retry.
Expand Down Expand Up @@ -311,8 +305,8 @@ export type SQSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOpt
EndpointInputConfig<EndpointParameters> &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig &
HttpAuthSchemeInputConfig &
ClientInputEndpointParameters;
/**
* @public
Expand All @@ -331,8 +325,8 @@ export type SQSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHa
EndpointResolvedConfig<EndpointParameters> &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig &
HttpAuthSchemeResolvedConfig &
ClientResolvedEndpointParameters;
/**
* @public
Expand Down Expand Up @@ -428,26 +422,15 @@ export class SQSClient extends __Client<
*/
readonly config: SQSClientResolvedConfig;

private getDefaultHttpAuthSchemeParametersProvider() {
return defaultSQSHttpAuthSchemeParametersProvider;
}

private getIdentityProviderConfigProvider() {
return async (config: SQSClientResolvedConfig) =>
new DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
});
}

constructor(...[configuration]: __CheckOptionalClientConfig<SQSClientConfig>) {
const _config_0 = __getRuntimeConfig(configuration || {});
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = resolveRegionConfig(_config_1);
const _config_3 = resolveEndpointConfig(_config_2);
const _config_4 = resolveRetryConfig(_config_3);
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveUserAgentConfig(_config_5);
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
const _config_6 = resolveAwsAuthConfig(_config_5);
const _config_7 = resolveUserAgentConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
super(_config_8);
this.config = _config_8;
Expand All @@ -456,14 +439,8 @@ export class SQSClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
this.middlewareStack.use(getAwsAuthPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(
getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
})
);
this.middlewareStack.use(getHttpSigningPlugin(this.config));
}

/**
Expand Down
72 changes: 0 additions & 72 deletions clients/client-sqs/src/auth/httpAuthExtensionConfiguration.ts

This file was deleted.

137 changes: 0 additions & 137 deletions clients/client-sqs/src/auth/httpAuthSchemeProvider.ts

This file was deleted.

Loading