Skip to content

Commit

Permalink
iam action hyphens in api gw actions
Browse files Browse the repository at this point in the history
  • Loading branch information
brabster committed Feb 14, 2017
1 parent f553d84 commit e3ec887
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/crucible/aws/iam.clj
Expand Up @@ -36,7 +36,7 @@
(s/def ::not-principal ::principal)

(s/def ::action-element (spec-or-ref (s/and string?
#(re-matches #"[a-zA-Z0-9*:]+" %))))
#(re-matches #"[a-zA-Z0-9*:_\-]+" %))))

(s/def ::action (s/or :single ::action-element
:list (s/+ ::action-element)))
Expand Down
2 changes: 2 additions & 0 deletions test/crucible/aws/iam_test.clj
Expand Up @@ -36,6 +36,8 @@

(deftest action-tests

(testing "hyphen in action" (is (valid ::iam/action "execute-api:Invoke")))

(testing "all actions" (is (valid ::iam/action "*")))

(testing "single action" (is (valid ::iam/action "s3:PutObject")))
Expand Down

0 comments on commit e3ec887

Please sign in to comment.