From: Matt Benjamin Date: Thu, 29 Oct 2020 11:57:50 +0000 (-0400) Subject: Merge pull request #35612 from pritha-srivastava/wip-sts-role-min-duration X-Git-Tag: v16.1.0~737 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=133f26325dfb383b3723cb5860f0342231cd9294;p=ceph.git Merge pull request #35612 from pritha-srivastava/wip-sts-role-min-duration rgw/sts: Adding a configurable rgw_sts_min_session_duration --- 133f26325dfb383b3723cb5860f0342231cd9294 diff --cc src/rgw/rgw_sts.cc index 40c0fb7ea9a,c851bcbb6ed..6d8f2060ddb --- a/src/rgw/rgw_sts.cc +++ b/src/rgw/rgw_sts.cc @@@ -177,8 -174,9 +177,9 @@@ AssumeRoleRequestBase::AssumeRoleReques const string& iamPolicy, const string& roleArn, const string& roleSessionName) - : iamPolicy(iamPolicy), roleArn(roleArn), roleSessionName(roleSessionName) + : cct(cct), iamPolicy(iamPolicy), roleArn(roleArn), roleSessionName(roleSessionName) { + MIN_DURATION_IN_SECS = cct->_conf->rgw_sts_min_session_duration; if (duration.empty()) { this->duration = DEFAULT_DURATION_IN_SECS; } else { diff --cc src/rgw/rgw_sts.h index e283e18a022,9f1fe12bcec..c10b35f212a --- a/src/rgw/rgw_sts.h +++ b/src/rgw/rgw_sts.h @@@ -20,8 -19,8 +19,9 @@@ protected static constexpr uint64_t MAX_ROLE_ARN_SIZE = 2048; static constexpr uint64_t MIN_ROLE_SESSION_SIZE = 2; static constexpr uint64_t MAX_ROLE_SESSION_SIZE = 64; + uint64_t MIN_DURATION_IN_SECS; uint64_t MAX_DURATION_IN_SECS; + CephContext* cct; uint64_t duration; string err_msg; string iamPolicy;