if ((t->notaction & iamAllValue) == iamAllValue) {
t->notaction[iamAll] = 1;
}
+ if ((t->action & stsAllValue) == stsAllValue) {
+ t->action[stsAll] = 1;
+ }
+ if ((t->notaction & stsAllValue) == stsAllValue) {
+ t->notaction[stsAll] = 1;
+ }
}
}
} else if (w->id == TokenID::Resource || w->id == TokenID::NotResource) {
static constexpr std::uint64_t iamListRolePolicies = 66;
static constexpr std::uint64_t iamDeleteRolePolicy = 67;
static constexpr std::uint64_t iamAll = 68;
+static constexpr std::uint64_t stsAssumeRole = 69;
+static constexpr std::uint64_t stsAll = 70;
static constexpr std::uint64_t s3Count = s3DeleteObjectVersionTagging + 1;
-static constexpr std::uint64_t allCount = iamAll + 1;
+static constexpr std::uint64_t allCount = stsAll + 1;
using Action_t = bitset<allCount>;
using NotAction_t = Action_t;
static const Action_t None(0);
static const Action_t s3AllValue("111111111111111111111111111111111111111111111111111111");
static const Action_t iamAllValue("11111111111110000000000000000000000000000000000000000000000000000000");
+static const Action_t stsAllValue("1000000000000000000000000000000000000000000000000000000000000000000000");
//Modify allValue if more Actions are added
-static const Action_t allValue("111111111111111111111111111111111111111111111111111111111111111111111");
-
-static constexpr std::uint64_t stsAssumeRole = 1ULL << 55;
+static const Action_t allValue("11111111111111111111111111111111111111111111111111111111111111111111111");
namespace {
inline int op_to_perm(std::uint64_t op) {
#include "rgw_crypt_sanitize.h"
#include "rgw_rest_user_policy.h"
#include "include/ceph_assert.h"
-#include "include/assert.h"
#include "rgw_role.h"
#include "rgw_rest_sts.h"
#include "rgw_sts.h"
#include <boost/utility/in_place_factory.hpp>
#include <boost/tokenizer.hpp>
-#include "include/assert.h"
#include "ceph_ver.h"
#include "common/Formatter.h"
using rgw::IAM::iamCreateRole;
using rgw::IAM::iamDeleteRole;
using rgw::IAM::iamAll;
+using rgw::IAM::stsAll;
class FakeIdentity : public Identity {
const Principal id;
EXPECT_TRUE(p->statements[0].noprinc.empty());
EXPECT_EQ(p->statements[0].effect, Effect::Allow);
Action_t act;
- for (auto i = 0U; i <= iamAll; i++)
+ for (auto i = 0U; i <= stsAll; i++)
act[i] = 1;
EXPECT_EQ(p->statements[0].action, act);
EXPECT_EQ(p->statements[0].notaction, None);