From e3ec8873998e286965f46786b276c83b46733f23 Mon Sep 17 00:00:00 2001 From: Paul Brabban Date: Tue, 14 Feb 2017 17:02:45 +0000 Subject: [PATCH] iam action hyphens in api gw actions --- src/crucible/aws/iam.clj | 2 +- test/crucible/aws/iam_test.clj | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crucible/aws/iam.clj b/src/crucible/aws/iam.clj index 3988d7c..667abae 100644 --- a/src/crucible/aws/iam.clj +++ b/src/crucible/aws/iam.clj @@ -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))) diff --git a/test/crucible/aws/iam_test.clj b/test/crucible/aws/iam_test.clj index fffae3f..46edb13 100644 --- a/test/crucible/aws/iam_test.clj +++ b/test/crucible/aws/iam_test.clj @@ -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")))