for expires sts credentials.
Fixes: https://tracker.ceph.com/issues/73441
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
{ ERR_ACLS_NOT_SUPPORTED, {400, "AccessControlListNotSupported"}},
{ ERR_INVALID_BUCKET_ACL, {400, "InvalidBucketAclWithObjectOwnership"}},
{ ERR_NO_SUCH_OWNERSHIP_CONTROLS, {404, "OwnershipControlsNotFoundError"}},
+ { ERR_EXPIRED_TOKEN, {400, "ExpiredToken"}},
});
rgw_http_errors rgw_http_swift_errors({
#define ERR_ACCOUNT_EXISTS 2403
#define ERR_RESTORE_ALREADY_IN_PROGRESS 2500
-
+#define ERR_EXPIRED_TOKEN 2501
+
#ifndef UINT32_MAX
#define UINT32_MAX (0xffffffffu)
#endif
real_clock::time_point now = real_clock::now();
if (now >= *exp) {
ldpp_dout(dpp, 0) << "ERROR: Token expired" << dendl;
- return result_t::reject(-EPERM);
+ return result_t::reject(-ERR_EXPIRED_TOKEN);
}
} else {
ldpp_dout(dpp, 0) << "ERROR: Invalid expiration: " << expiration << dendl;