Skip to content

Commit

Permalink
Require non-empty aws.auth#sigv4 name
Browse files Browse the repository at this point in the history
  • Loading branch information
kstich committed Nov 13, 2020
1 parent 076547f commit ba959f0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/1.0/spec/aws/aws-auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Trait value
* - name
- ``string``
- **Required**. The signature version 4 service signing name to use
in the `credential scope`_ when signing requests. This value
SHOULD match the ``arnNamespace`` property of the
:ref:`aws.api#service-trait`.
in the `credential scope`_ when signing requests. This value MUST
NOT be empty. This value SHOULD match the ``arnNamespace`` property
of the :ref:`aws.api#service-trait`.

.. tabs::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"target": "smithy.api#String",
"traits": {
"smithy.api#required": {},
"smithy.api#length": {
"min": 1
},
"smithy.api#documentation": "The signature version 4 service signing name to use in the credential scope when signing requests. This value SHOULD match the `arnNamespace` property of the `aws.api#service-trait`.",
"smithy.api#externalDocumentation": {
"Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ERROR] smithy.example#InvalidService: Error validating trait `aws.auth#sigv4`.name: String value provided for `aws.auth#sigv4$name` must be >= 1 characters, but the provided value is only 0 characters. | TraitValue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace smithy.example

use aws.auth#sigv4

@sigv4(name: "")
service InvalidService {
version: "2020-07-02"
}

0 comments on commit ba959f0

Please sign in to comment.