mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(iam): word the account property key refusal as AWS does (#9161)
A key that satisfies the published shape and is not Namespace/PropertyName answers 'Property key must be in format Namespace/PropertyName: <key>', recorded for a key carrying no separator, with the key as the request sent it. This package described the rule in a sentence of its own instead. The rule itself is unchanged, and the layer AWS applies after it is left out on purpose rather than guessed: an unrecognised namespace is refused there, and building that check needs the set of namespaces AWS recognises, which the recordings do not give. The IAM page says so.
This commit is contained in:
1 parent
1cad7b2b62
commit
6fe1da3219
3 files changed
+33
-5
No files matched your search
@@ -102,7 +102,10 @@ class AccountPropertiesIntegrationTest {
|
||||
/**
|
||||
* These three satisfy the published pattern, which admits no slash, several, and a trailing
|
||||
* one, and fail only the Namespace/PropertyName rule. The service applies that after the
|
||||
* format is already good, so it is {@code InvalidInput} rather than a constraint failure.
|
||||
* format is already good, so it is {@code InvalidInput} rather than a constraint failure, and
|
||||
* the sentence is the one AWS was recorded answering for the key that carries no separator,
|
||||
* with the key as the request sent it. The other two spellings are this package's own rule
|
||||
* under the same sentence, nothing recording what AWS answers for them.
|
||||
*/
|
||||
@Test
|
||||
void aKeyThatIsNotNamespaceSlashPropertyIsInvalidInput() {
|
||||
@@ -115,7 +118,7 @@ class AccountPropertiesIntegrationTest {
|
||||
.body(not(containsString("ValidationError")))
|
||||
// The wording matters as much as the code here: carrying the constraint phrasing
|
||||
// on an InvalidInput is the mismatch this split exists to remove.
|
||||
.body(containsString("is not Namespace/PropertyName"))
|
||||
.body(containsString("Property key must be in format Namespace/PropertyName: " + key))
|
||||
.body(not(containsString("failed to satisfy constraint")));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user