Repository navigation
rgw/sts: log trust-policy denials with request prefix - #72336
Conversation
The deny/pass messages in RGWSTSAssumeRole::verify_permission() and RGWSTSAssumeRoleWithWebIdentity::verify_permission() used ldout(), so they lacked the "req <id>" prefix and could not be correlated with the rest of the request's log lines. An authenticated request that is then rejected by the role's trust policy looked like an unexplained 403. Use ldpp_dout(this, ...) like the surrounding error paths. Signed-off-by: Krunal Chheda <[email protected]>
cbodley
left a comment
There was a problem hiding this comment.
good change, but they probably shouldn't be at log level 0
errors have been logged at |
true, but the question is whether an admin needs to see the message by default in their rgw log. log levels 0 and 1 should only be used for errors that may need admin intervention. some auth errors may indicate a broken configuration in rgw. but here, we're just rejecting a request based on iam policy which is under the control of the end user/account. we return that http error to the client, so there's no need to escalate this to a cluster admin. if an admin wants to help a user understand why this is failing, they can raise the log level for debugging |
fair point on distinguishing between admin errors and client specific errors |
|
This PR has been added to main integration testing by anuchaithra started 2026-10-16-04:47. |
pr testing completed and approved by @ivancich , more details in : https://tracker.ceph.com/issues/81818. |
The trust-policy deny/pass messages in
RGWSTSAssumeRole::verify_permission()andRGWSTSAssumeRoleWithWebIdentity::verify_permission()were logged withldout(), so they carry noreq <id>prefix. When a request authenticates successfully and is then denied by the role's trust policy, searching the logs by request id shows the authentication but not the denial, and the 403 looks unexplained.Switch the four
ldout(s->cct, 0)calls toldpp_dout(this, 0), matching the neighbouring error paths in the same functions. Log-only change; no behaviour change.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