Skip to content

Commit 0a251aa

Browse files
authored
feat: support Sigv4 for non AWS services (#2385)
* feat(middleware-signing): support SigV4 for non AWS services There is no regionInfo to determine signingService. The signingName will instead directly come from input. And region will be used as signingRegion. * feat(codegen): support SigV4 for non AWS services Write `signingName` from the SigV4 trait for non AWS service. `region` is used for the signingRegion. A separate SigV4Auth is used for SigV4 logic for non AWS services. * fix(codegen): use Region plugin explicitly for AWS service The models for the protocol tests don't seem to have the SigV4 trait, so can't rely solely on it for using the Region plugin. e.g, https://github.com/awslabs/smithy/blob/main/smithy-aws-protocol-tests/model/restJson1/main.smithy#L11-L13 * chore(clients): update clients with updates for SigV4 for non AWS services * test(middleware-signing): add test for non AWS service SigV4 * chore(codegen): reduce duplication for writing region * Reverting unnecessary changes to protocol tests
1 parent 3110d62 commit 0a251aa

File tree

271 files changed

+493
-322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+493
-322
lines changed

Diff for: clients/client-accessanalyzer/AccessAnalyzerClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
235235
serviceId?: string;
236236

237237
/**
238-
* The AWS region to which this client will send requests or use as signingRegion
238+
* The AWS region to which this client will send requests
239239
*/
240240
region?: string | __Provider<string>;
241241

Diff for: clients/client-acm-pca/ACMPCAClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
235235
serviceId?: string;
236236

237237
/**
238-
* The AWS region to which this client will send requests or use as signingRegion
238+
* The AWS region to which this client will send requests
239239
*/
240240
region?: string | __Provider<string>;
241241

Diff for: clients/client-acm/ACMClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
196196
serviceId?: string;
197197

198198
/**
199-
* The AWS region to which this client will send requests or use as signingRegion
199+
* The AWS region to which this client will send requests
200200
*/
201201
region?: string | __Provider<string>;
202202

Diff for: clients/client-alexa-for-business/AlexaForBusinessClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
523523
serviceId?: string;
524524

525525
/**
526-
* The AWS region to which this client will send requests or use as signingRegion
526+
* The AWS region to which this client will send requests
527527
*/
528528
region?: string | __Provider<string>;
529529

Diff for: clients/client-amp/AmpClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
145145
serviceId?: string;
146146

147147
/**
148-
* The AWS region to which this client will send requests or use as signingRegion
148+
* The AWS region to which this client will send requests
149149
*/
150150
region?: string | __Provider<string>;
151151

Diff for: clients/client-amplify/AmplifyClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
268268
serviceId?: string;
269269

270270
/**
271-
* The AWS region to which this client will send requests or use as signingRegion
271+
* The AWS region to which this client will send requests
272272
*/
273273
region?: string | __Provider<string>;
274274

Diff for: clients/client-amplifybackend/AmplifyBackendClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
214214
serviceId?: string;
215215

216216
/**
217-
* The AWS region to which this client will send requests or use as signingRegion
217+
* The AWS region to which this client will send requests
218218
*/
219219
region?: string | __Provider<string>;
220220

Diff for: clients/client-api-gateway/APIGatewayClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
596596
serviceId?: string;
597597

598598
/**
599-
* The AWS region to which this client will send requests or use as signingRegion
599+
* The AWS region to which this client will send requests
600600
*/
601601
region?: string | __Provider<string>;
602602

Diff for: clients/client-apigatewaymanagementapi/ApiGatewayManagementApiClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
133133
serviceId?: string;
134134

135135
/**
136-
* The AWS region to which this client will send requests or use as signingRegion
136+
* The AWS region to which this client will send requests
137137
*/
138138
region?: string | __Provider<string>;
139139

Diff for: clients/client-apigatewayv2/ApiGatewayV2Client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
382382
serviceId?: string;
383383

384384
/**
385-
* The AWS region to which this client will send requests or use as signingRegion
385+
* The AWS region to which this client will send requests
386386
*/
387387
region?: string | __Provider<string>;
388388

Diff for: clients/client-app-mesh/AppMeshClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
292292
serviceId?: string;
293293

294294
/**
295-
* The AWS region to which this client will send requests or use as signingRegion
295+
* The AWS region to which this client will send requests
296296
*/
297297
region?: string | __Provider<string>;
298298

Diff for: clients/client-appconfig/AppConfigClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
274274
serviceId?: string;
275275

276276
/**
277-
* The AWS region to which this client will send requests or use as signingRegion
277+
* The AWS region to which this client will send requests
278278
*/
279279
region?: string | __Provider<string>;
280280

Diff for: clients/client-appflow/AppflowClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
205205
serviceId?: string;
206206

207207
/**
208-
* The AWS region to which this client will send requests or use as signingRegion
208+
* The AWS region to which this client will send requests
209209
*/
210210
region?: string | __Provider<string>;
211211

Diff for: clients/client-appintegrations/AppIntegrationsClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
181181
serviceId?: string;
182182

183183
/**
184-
* The AWS region to which this client will send requests or use as signingRegion
184+
* The AWS region to which this client will send requests
185185
*/
186186
region?: string | __Provider<string>;
187187

Diff for: clients/client-application-auto-scaling/ApplicationAutoScalingClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
181181
serviceId?: string;
182182

183183
/**
184-
* The AWS region to which this client will send requests or use as signingRegion
184+
* The AWS region to which this client will send requests
185185
*/
186186
region?: string | __Provider<string>;
187187

Diff for: clients/client-application-discovery-service/ApplicationDiscoveryServiceClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
247247
serviceId?: string;
248248

249249
/**
250-
* The AWS region to which this client will send requests or use as signingRegion
250+
* The AWS region to which this client will send requests
251251
*/
252252
region?: string | __Provider<string>;
253253

Diff for: clients/client-application-insights/ApplicationInsightsClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
232232
serviceId?: string;
233233

234234
/**
235-
* The AWS region to which this client will send requests or use as signingRegion
235+
* The AWS region to which this client will send requests
236236
*/
237237
region?: string | __Provider<string>;
238238

Diff for: clients/client-appstream/AppStreamClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
325325
serviceId?: string;
326326

327327
/**
328-
* The AWS region to which this client will send requests or use as signingRegion
328+
* The AWS region to which this client will send requests
329329
*/
330330
region?: string | __Provider<string>;
331331

Diff for: clients/client-appsync/AppSyncClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
265265
serviceId?: string;
266266

267267
/**
268-
* The AWS region to which this client will send requests or use as signingRegion
268+
* The AWS region to which this client will send requests
269269
*/
270270
region?: string | __Provider<string>;
271271

Diff for: clients/client-athena/AthenaClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
256256
serviceId?: string;
257257

258258
/**
259-
* The AWS region to which this client will send requests or use as signingRegion
259+
* The AWS region to which this client will send requests
260260
*/
261261
region?: string | __Provider<string>;
262262

Diff for: clients/client-auditmanager/AuditManagerClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
370370
serviceId?: string;
371371

372372
/**
373-
* The AWS region to which this client will send requests or use as signingRegion
373+
* The AWS region to which this client will send requests
374374
*/
375375
region?: string | __Provider<string>;
376376

Diff for: clients/client-auto-scaling-plans/AutoScalingPlansClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
154154
serviceId?: string;
155155

156156
/**
157-
* The AWS region to which this client will send requests or use as signingRegion
157+
* The AWS region to which this client will send requests
158158
*/
159159
region?: string | __Provider<string>;
160160

Diff for: clients/client-auto-scaling/AutoScalingClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
430430
serviceId?: string;
431431

432432
/**
433-
* The AWS region to which this client will send requests or use as signingRegion
433+
* The AWS region to which this client will send requests
434434
*/
435435
region?: string | __Provider<string>;
436436

Diff for: clients/client-backup/BackupClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
367367
serviceId?: string;
368368

369369
/**
370-
* The AWS region to which this client will send requests or use as signingRegion
370+
* The AWS region to which this client will send requests
371371
*/
372372
region?: string | __Provider<string>;
373373

Diff for: clients/client-batch/BatchClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
208208
serviceId?: string;
209209

210210
/**
211-
* The AWS region to which this client will send requests or use as signingRegion
211+
* The AWS region to which this client will send requests
212212
*/
213213
region?: string | __Provider<string>;
214214

Diff for: clients/client-braket/BraketClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
157157
serviceId?: string;
158158

159159
/**
160-
* The AWS region to which this client will send requests or use as signingRegion
160+
* The AWS region to which this client will send requests
161161
*/
162162
region?: string | __Provider<string>;
163163

Diff for: clients/client-budgets/BudgetsClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
217217
serviceId?: string;
218218

219219
/**
220-
* The AWS region to which this client will send requests or use as signingRegion
220+
* The AWS region to which this client will send requests
221221
*/
222222
region?: string | __Provider<string>;
223223

Diff for: clients/client-chime/ChimeClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
997997
serviceId?: string;
998998

999999
/**
1000-
* The AWS region to which this client will send requests or use as signingRegion
1000+
* The AWS region to which this client will send requests
10011001
*/
10021002
region?: string | __Provider<string>;
10031003

Diff for: clients/client-cloud9/Cloud9Client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
190190
serviceId?: string;
191191

192192
/**
193-
* The AWS region to which this client will send requests or use as signingRegion
193+
* The AWS region to which this client will send requests
194194
*/
195195
region?: string | __Provider<string>;
196196

Diff for: clients/client-clouddirectory/CloudDirectoryClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
403403
serviceId?: string;
404404

405405
/**
406-
* The AWS region to which this client will send requests or use as signingRegion
406+
* The AWS region to which this client will send requests
407407
*/
408408
region?: string | __Provider<string>;
409409

Diff for: clients/client-cloudformation/CloudFormationClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
361361
serviceId?: string;
362362

363363
/**
364-
* The AWS region to which this client will send requests or use as signingRegion
364+
* The AWS region to which this client will send requests
365365
*/
366366
region?: string | __Provider<string>;
367367

Diff for: clients/client-cloudfront/CloudFrontClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
520520
serviceId?: string;
521521

522522
/**
523-
* The AWS region to which this client will send requests or use as signingRegion
523+
* The AWS region to which this client will send requests
524524
*/
525525
region?: string | __Provider<string>;
526526

Diff for: clients/client-cloudhsm-v2/CloudHSMV2Client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
175175
serviceId?: string;
176176

177177
/**
178-
* The AWS region to which this client will send requests or use as signingRegion
178+
* The AWS region to which this client will send requests
179179
*/
180180
region?: string | __Provider<string>;
181181

Diff for: clients/client-cloudhsm/CloudHSMClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
193193
serviceId?: string;
194194

195195
/**
196-
* The AWS region to which this client will send requests or use as signingRegion
196+
* The AWS region to which this client will send requests
197197
*/
198198
region?: string | __Provider<string>;
199199

Diff for: clients/client-cloudsearch-domain/CloudSearchDomainClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
130130
serviceId?: string;
131131

132132
/**
133-
* The AWS region to which this client will send requests or use as signingRegion
133+
* The AWS region to which this client will send requests
134134
*/
135135
region?: string | __Provider<string>;
136136

Diff for: clients/client-cloudsearch/CloudSearchClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
244244
serviceId?: string;
245245

246246
/**
247-
* The AWS region to which this client will send requests or use as signingRegion
247+
* The AWS region to which this client will send requests
248248
*/
249249
region?: string | __Provider<string>;
250250

Diff for: clients/client-cloudtrail/CloudTrailClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
187187
serviceId?: string;
188188

189189
/**
190-
* The AWS region to which this client will send requests or use as signingRegion
190+
* The AWS region to which this client will send requests
191191
*/
192192
region?: string | __Provider<string>;
193193

Diff for: clients/client-cloudwatch-events/CloudWatchEventsClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
328328
serviceId?: string;
329329

330330
/**
331-
* The AWS region to which this client will send requests or use as signingRegion
331+
* The AWS region to which this client will send requests
332332
*/
333333
region?: string | __Provider<string>;
334334

Diff for: clients/client-cloudwatch-logs/CloudWatchLogsClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
289289
serviceId?: string;
290290

291291
/**
292-
* The AWS region to which this client will send requests or use as signingRegion
292+
* The AWS region to which this client will send requests
293293
*/
294294
region?: string | __Provider<string>;
295295

Diff for: clients/client-cloudwatch/CloudWatchClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
268268
serviceId?: string;
269269

270270
/**
271-
* The AWS region to which this client will send requests or use as signingRegion
271+
* The AWS region to which this client will send requests
272272
*/
273273
region?: string | __Provider<string>;
274274

Diff for: clients/client-codeartifact/CodeartifactClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
295295
serviceId?: string;
296296

297297
/**
298-
* The AWS region to which this client will send requests or use as signingRegion
298+
* The AWS region to which this client will send requests
299299
*/
300300
region?: string | __Provider<string>;
301301

Diff for: clients/client-codebuild/CodeBuildClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
301301
serviceId?: string;
302302

303303
/**
304-
* The AWS region to which this client will send requests or use as signingRegion
304+
* The AWS region to which this client will send requests
305305
*/
306306
region?: string | __Provider<string>;
307307

Diff for: clients/client-codecommit/CodeCommitClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
502502
serviceId?: string;
503503

504504
/**
505-
* The AWS region to which this client will send requests or use as signingRegion
505+
* The AWS region to which this client will send requests
506506
*/
507507
region?: string | __Provider<string>;
508508

Diff for: clients/client-codedeploy/CodeDeployClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
370370
serviceId?: string;
371371

372372
/**
373-
* The AWS region to which this client will send requests or use as signingRegion
373+
* The AWS region to which this client will send requests
374374
*/
375375
region?: string | __Provider<string>;
376376

0 commit comments

Comments
 (0)