Skip to content

fix(experimentalIdentityAndAuth): revert release phase for DynamoDB #5600

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

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-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"@aws-sdk/middleware-host-header": "*",
"@aws-sdk/middleware-logger": "*",
"@aws-sdk/middleware-recursion-detection": "*",
"@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 @@ -55,7 +55,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",
"@smithy/util-waiter": "^2.0.15",
Expand Down
73 changes: 25 additions & 48 deletions clients/client-dynamodb/src/DynamoDBClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,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 @@ -35,7 +37,6 @@ import {
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
} from "@smithy/smithy-client";
import {
AwsCredentialIdentityProvider,
BodyLengthCalculator as __BodyLengthCalculator,
CheckOptionalClientConfig as __CheckOptionalClientConfig,
ChecksumConstructor as __ChecksumConstructor,
Expand All @@ -52,12 +53,6 @@ import {
UserAgent as __UserAgent,
} from "@smithy/types";

import {
defaultDynamoDBHttpAuthSchemeParametersProvider,
HttpAuthSchemeInputConfig,
HttpAuthSchemeResolvedConfig,
resolveHttpAuthSchemeConfig,
} from "./auth/httpAuthSchemeProvider";
import {
BatchExecuteStatementCommandInput,
BatchExecuteStatementCommandOutput,
Expand Down Expand Up @@ -380,22 +375,28 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
useFipsEndpoint?: boolean | __Provider<boolean>;

/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* The AWS region to which this client will send requests
*/
region?: string | __Provider<string>;

/**
* 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
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
*/
region?: string | __Provider<string>;
defaultUserAgentProvider?: Provider<__UserAgent>;

/**
* Default credentials provider; Not available in browser runtime.
* @deprecated
* The provider which populates default for endpointDiscoveryEnabled configuration, if it's
* not passed during client creation.
* @internal
*/
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;

/**
* Value for how many times a request will be made at most in case of retry.
Expand Down Expand Up @@ -423,13 +424,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
*/
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;

/**
* The provider which populates default for endpointDiscoveryEnabled configuration, if it's
* not passed during client creation.
* @internal
*/
endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;
}

/**
Expand All @@ -441,8 +435,8 @@ export type DynamoDBClientConfigType = Partial<__SmithyConfiguration<__HttpHandl
EndpointInputConfig<EndpointParameters> &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig &
HttpAuthSchemeInputConfig &
EndpointDiscoveryInputConfig &
ClientInputEndpointParameters;
/**
Expand All @@ -462,8 +456,8 @@ export type DynamoDBClientResolvedConfigType = __SmithyResolvedConfiguration<__H
EndpointResolvedConfig<EndpointParameters> &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig &
HttpAuthSchemeResolvedConfig &
EndpointDiscoveryResolvedConfig &
ClientResolvedEndpointParameters;
/**
Expand Down Expand Up @@ -504,26 +498,15 @@ export class DynamoDBClient extends __Client<
*/
readonly config: DynamoDBClientResolvedConfig;

private getDefaultHttpAuthSchemeParametersProvider() {
return defaultDynamoDBHttpAuthSchemeParametersProvider;
}

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

constructor(...[configuration]: __CheckOptionalClientConfig<DynamoDBClientConfig>) {
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 = resolveEndpointDiscoveryConfig(_config_7, {
endpointDiscoveryCommandCtor: DescribeEndpointsCommand,
});
Expand All @@ -535,14 +518,8 @@ export class DynamoDBClient 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

This file was deleted.

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

This file was deleted.

Loading