Skip to content

Commit 5ec9573

Browse files
authored
Add breakingChanges to the removal of sigv4 and sigv4a traits (#2567)
1 parent 5fc5edd commit 5ec9573

File tree

8 files changed

+130
-2
lines changed

8 files changed

+130
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "feature",
3+
"description": "Add breakingChanges to the removal of sigv4 and sigv4a traits",
4+
"pull_requests": []
5+
}

smithy-aws-traits/src/main/resources/META-INF/smithy/aws.auth.smithy

+22-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ structure cognitoUserPools {
2323
traits: [unsignedPayload]
2424
)
2525
@externalDocumentation(Reference: "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html")
26-
@trait(selector: "service")
26+
@trait(
27+
selector: "service"
28+
breakingChanges: [
29+
{
30+
change: "remove",
31+
message: """
32+
Removing the existing authentication scheme is not backward compatible \
33+
and can break existing clients' authentication."""
34+
}
35+
]
36+
)
2737
structure sigv4 {
2838
/// The signature version 4 service signing name to use in the credential
2939
/// scope when signing requests. This value SHOULD match the `arnNamespace`
@@ -46,7 +56,17 @@ structure sigv4 {
4656
Reference: "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html"
4757
Examples: "https://github.com/aws-samples/sigv4a-signing-examples"
4858
)
49-
@trait(selector: "service[trait|aws.auth#sigv4]")
59+
@trait(
60+
selector: "service[trait|aws.auth#sigv4]"
61+
breakingChanges: [
62+
{
63+
change: "remove",
64+
message: """
65+
Removing the existing authentication scheme is not backward compatible \
66+
and can break existing clients' authentication."""
67+
}
68+
]
69+
)
5070
structure sigv4a {
5171
/// The signature version 4a service signing name to use in the credential
5272
/// scope when signing requests. This value SHOULD match the `arnNamespace`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$version: "2.0"
2+
3+
metadata suppressions = [
4+
{
5+
id: "ModifiedTrait.Update.smithy.api#auth"
6+
namespace: "ns.foo"
7+
}
8+
]
9+
10+
namespace ns.foo
11+
12+
use aws.auth#sigv4
13+
14+
@auth([sigv4])
15+
@sigv4(name: "service")
16+
service Service {
17+
operations: [
18+
Operation
19+
]
20+
}
21+
22+
operation Operation {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
$version: "2.0"
2+
3+
metadata suppressions = [
4+
{
5+
id: "ModifiedTrait.Update.smithy.api#auth"
6+
namespace: "ns.foo"
7+
}
8+
]
9+
10+
namespace ns.foo
11+
12+
@auth([])
13+
service Service {
14+
operations: [
15+
Operation
16+
]
17+
}
18+
19+
20+
operation Operation {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[ERROR] ns.foo#Service: Removed trait `aws.auth#sigv4`. Previous trait value:
2+
```
3+
{
4+
"name": "service"
5+
}
6+
```
7+
; Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication. | TraitBreakingChange.Remove
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
$version: "2.0"
2+
3+
metadata suppressions = [
4+
{
5+
id: "ModifiedTrait.Update.smithy.api#auth"
6+
namespace: "ns.foo"
7+
}
8+
]
9+
10+
namespace ns.foo
11+
12+
use aws.auth#sigv4
13+
use aws.auth#sigv4a
14+
15+
@auth([sigv4, sigv4a])
16+
@sigv4(name: "service")
17+
@sigv4a(name: "service")
18+
service Service {
19+
operations: [
20+
Operation
21+
]
22+
}
23+
24+
operation Operation {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$version: "2.0"
2+
3+
metadata suppressions = [
4+
{
5+
id: "ModifiedTrait.Update.smithy.api#auth"
6+
namespace: "ns.foo"
7+
}
8+
]
9+
10+
namespace ns.foo
11+
12+
use aws.auth#sigv4
13+
14+
@auth([sigv4])
15+
@sigv4(name: "service")
16+
service Service {
17+
operations: [
18+
Operation
19+
]
20+
}
21+
22+
23+
operation Operation {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[ERROR] ns.foo#Service: Removed trait `aws.auth#sigv4a`. Previous trait value:
2+
```
3+
{
4+
"name": "service"
5+
}
6+
```
7+
; Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication. | TraitBreakingChange.Remove

0 commit comments

Comments
 (0)