]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_sts.h
Import ceph 15.2.8
[ceph.git] / ceph / src / rgw / rgw_sts.h
index 86b621a30852e3ca81b29490fb62906c55ddf1c8..fa8cc70295da39fd1dbbd3393c29b7190237db4e 100644 (file)
@@ -128,11 +128,12 @@ struct SessionToken {
   uint32_t perm_mask;
   bool is_admin;
   uint32_t acct_type;
+  string role_session;
 
   SessionToken() {}
 
   void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
+    ENCODE_START(2, 1, bl);
     encode(access_key_id, bl);
     encode(secret_access_key, bl);
     encode(expiration, bl);
@@ -143,11 +144,12 @@ struct SessionToken {
     encode(perm_mask, bl);
     encode(is_admin, bl);
     encode(acct_type, bl);
+    encode(role_session, bl);
     ENCODE_FINISH(bl);
   }
 
   void decode(bufferlist::const_iterator& bl) {
-    DECODE_START(1, bl);
+    DECODE_START(2, bl);
     decode(access_key_id, bl);
     decode(secret_access_key, bl);
     decode(expiration, bl);
@@ -158,6 +160,9 @@ struct SessionToken {
     decode(perm_mask, bl);
     decode(is_admin, bl);
     decode(acct_type, bl);
+    if (struct_v >= 2) {
+      decode(role_session, bl);
+    }
     DECODE_FINISH(bl);
   }
 };
@@ -175,6 +180,7 @@ public:
                           const uint64_t& duration,
                           const boost::optional<string>& policy,
                           const boost::optional<string>& roleId,
+                          const boost::optional<string>& role_session,
                           boost::optional<rgw_user> user,
                           rgw::auth::Identity* identity);
   const string& getAccessKeyId() const { return accessKeyId; }