Skip to content

rgw/oidc: make the thumprint field optional - #67656

Merged
anrao19 merged 1 commit into
ceph:mainfrom
kchheda3:wip-oidc-thumbprint-optional
Apr 20, 2026
Merged

anrao19 merged 1 commit into
ceph:mainfrom
kchheda3:wip-oidc-thumbprint-optional

Conversation

@kchheda3

@kchheda3 kchheda3 commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/75178

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • [ x] References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • [x ] No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • [ x] No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown

Config Diff Tool Output

- removed: rgw_enable_jwks_url_verification (rgw.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

Comment thread src/rgw/rgw_rest_sts.cc
@@ -578,8 +581,7 @@ WebTokenEngine::validate_signature_using_n_e(const DoutPrefixProvider* dpp, cons
bool WebTokenEngine::verify_oidc_thumbprint(const DoutPrefixProvider* dpp, const std::string& cert_url,
const std::vector<std::string>& thumbprints) const
{
if (!cct->_conf.get_val<bool>("rgw_enable_jwks_url_verification")) {
ldpp_dout(dpp, 5) << "Verification of JWKS endpoint is turned off." << dendl;
if (thumbprints.empty()) {
return true;
}

@pritha-srivastava pritha-srivastava Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With thumbprints list being empty, are you skipping the oidc endpoint cert verification? sorry I think I misunderstood the purpose of having an optional thumbprint list, can you explain that once more?

@pritha-srivastava pritha-srivastava Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWS says

This parameter is optional. If it is not included, IAM will retrieve and use the top intermediate certificate authority (CA) thumbprint of the OpenID Connect identity provider server certificate.
The server certificate thumbprint is the hex-encoded SHA-1 hash value of the X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string.

Should we not atleast extract the cert and not sure do what with it (maybe implicitly trust it). If we are presented with an endpoint which is self-signed?.
Also this change should not touch the x5c path (old way of doing the cert validation), so please restore rgw_enable_jwks_url_verification as we can not remove this option without notifying the users that this will get deprecated in a future release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWS says

This parameter is optional. If it is not included, IAM will retrieve and use the top intermediate certificate authority (CA) thumbprint of the OpenID Connect identity provider server certificate.
The server certificate thumbprint is the hex-encoded SHA-1 hash value of the X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string.

Should we not atleast extract the cert and not sure do what with it (maybe implicitly trust it). If we are presented with an endpoint which is self-signed?. Also this change should not touch the x5c path (old way of doing the cert validation), so please restore rgw_enable_jwks_url_verification as we can not remove this option without notifying the users that this will get deprecated in a future release.

2 things here,
first regarding the thumbprint being optional, if there is nothing to verify not sure what we do by pulling the latest cert ??
second regardingrgw_enable_jwks_url_verificationrgw_enable_jwks_url_verification, this was option was recently added and its only part of tentacle, so we can backport this commit to tentacle ? I have not issues putting this code back, but it is a tech debt here

@pritha-srivastava pritha-srivastava Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a way I agree there is nothing we can do with the cert, but connect_to_host_get_cert_chain does perform a TLS handshake and OpenSSL validates the entire cert chain, which can still protect us from rogue OIDC providers in the absence of thumbprint verification.
for rgw_enable_jwks_url_verification - yes this needs to be put back, and for the x5c cert validation - don't skip the verification if the thumbprint list is empty, return an error instead.
Documentation also needs to be updated saying that thumbprintlist is being made optional and the JWKS endpoint verification will be skipped in that case.
@cbodley : what do you think is the best way to avoid confusion for existing users who might be already using the old way of x5c cert validation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a way I agree there is nothing we can do with the cert, but connect_to_host_get_cert_chain does perform a TLS handshake and OpenSSL validates the entire cert chain, which can still protect us from rogue OIDC providers in the absence of thumbprint verification. for rgw_enable_jwks_url_verification - yes this needs to be put back, and for the x5c cert validation - don't skip the verification if the thumbprint list is empty, return an error instead. Documentation also needs to be updated saying that thumbprintlist is being made optional and the JWKS endpoint verification will be skipped in that case. @cbodley : what do you think is the best way to avoid confusion for existing users who might be already using the old way of x5c cert validation?

done, put back rgw_enable_jwks_url_verification and mandated thumbprint check for x5ccert

@kchheda3
kchheda3 force-pushed the wip-oidc-thumbprint-optional branch from 6e963d1 to 1ad28ec Compare March 13, 2026 13:23
@anrao19

anrao19 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

FYI, pr testing is in progress...
Tracker created for same is : https://tracker.ceph.com/issues/75780

@anrao19

anrao19 commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

FYI, pr testing is in progress... Tracker created for same is : https://tracker.ceph.com/issues/75780

Pr testing completed. Tacker approved by @ivancich. More details : https://tracker.ceph.com/issues/75780
@kchheda3, if no further testing needed, pr can be merged

@anrao19
anrao19 merged commit 38c3a0a into ceph:main Apr 20, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

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
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/24660044511

@kchheda3
kchheda3 deleted the wip-oidc-thumbprint-optional branch May 4, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants