summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Gibson <jgibson@mitre.org>2017-08-10 19:39:35 +0200
committerJohn Gibson <jgibson@mitre.org>2017-12-26 22:59:08 +0100
commite83b647d44153a7775647693fca1848e592ee107 (patch)
tree1d250d250ba18c5f7319292366efc2768163303c
parentMerge pull request #19618 from dillaman/wip-18435 (diff)
downloadceph-e83b647d44153a7775647693fca1848e592ee107.tar.xz
ceph-e83b647d44153a7775647693fca1848e592ee107.zip
rgw: Added support for testing the wildcard principal in policies.
Signed-off-by: John Gibson <jgibson@mitre.org>
-rw-r--r--src/test/rgw/test_rgw_iam_policy.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/rgw/test_rgw_iam_policy.cc b/src/test/rgw/test_rgw_iam_policy.cc
index 7751b086898..7738869ff37 100644
--- a/src/test/rgw/test_rgw_iam_policy.cc
+++ b/src/test/rgw/test_rgw_iam_policy.cc
@@ -109,7 +109,10 @@ public:
}
bool is_identity(const flat_set<Principal>& ids) const override {
- return ids.find(id) != ids.end();
+ if (id.is_wildcard() && (!ids.empty())) {
+ return true;
+ }
+ return ids.find(id) != ids.end() || ids.find(Principal::wildcard()) != ids.end();
}
};