Repository navigation
rgw/sts: added logic to disallow role - #70565
Conversation
| //to verify its permission. | ||
| //disallow temporary credentials from invoking assumerole* calls | ||
| if (s->auth.identity && s->auth.identity->get_identity_type() == TYPE_ROLE) { | ||
| ldout(s->cct, 0) << "Role chaining is not supported!" << dendl; |
There was a problem hiding this comment.
i don't think we should spam the rgw logs with request auth errors. maybe it should be sent back to the client as an error response via s->err.message?
| try: | ||
| chained_sts_client.assume_role( | ||
| RoleArn=role_response['Role']['Arn'], | ||
| RoleSessionName=get_parameter_name(), |
There was a problem hiding this comment.
nit: maybe use assert_raises() for this pattern? ex
e = assert_raises(ClientError, chained_sts_client.assume_role,
RoleArn=role_response['Role']['Arn'],
RoleSessionName=get_parameter_name())
assert (403, 'AccessDenied') == _get_status_and_error_code(e.response)1c96917 to
47eaf56
Compare
47eaf56 to
1f34a6f
Compare
chaining. fixes: https://tracker-origin.ceph.com/issues/78697 Signed-off-by: Pritha Srivastava <[email protected]>
role chaining fails successfully in RGW. Signed-off-by: Pritha Srivastava <[email protected]>
1f34a6f to
0b960f7
Compare
|
successful run here: https://pulpito.ceph.com/prsrivas-2026-08-05_05:01:20-rgw:sts-wip-rgw-sts-role-chaining-fix-distro-default-trial/ @cbodley this is ready to be merged |
|
thanks @pritha-srivastava - this should probably go through the full rgw suite? |
is that needed? this is touching only sts code. does not even touch the auth code/ iam code |
|
https://pulpito.ceph.com/prsrivas-2026-08-07_08:39:08-rgw-wip-rgw-sts-role-chaining-fix-distro-default-trial/ The other failure is: The PR can be merged |
|
pr testing completed and approved by @ivancich , more details : https://tracker.ceph.com/issues/79148 |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
|
@pritha-srivastava it looks like we're starting to see sts failures on main after this merge, tracked in https://tracker.ceph.com/issues/79430. could you please take a look? |
@cbodley: I am not sure how this is possible, as I had completed a successful run of all sts tests here: |
|
from the rgw log, i see the AssumeRoleWithWebIdentity requests start failing with "token expired"
|
chaining.
fixes: https://tracker-origin.ceph.com/issues/78697
The explanation for the fix is given in the tracker issue above.
Role chaining as a separate STS feature is not officially supported in RGW. It requires the trust policy to have the ARN of the role assuming the role using temporary credentials. There are other rules related to role chaining which are not supported in RGW:
https://aws.amazon.com/blogs/security/how-to-use-trust-policies-with-iam-roles/
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.