Repository navigation
rgw/oidc: make the thumprint field optional - #67656
Conversation
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. |
| @@ -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; | |||
| } | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
In a way I agree there is nothing we can do with the cert, but
connect_to_host_get_cert_chaindoes 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
Signed-off-by: Krunal Chheda <[email protected]>
6e963d1 to
1ad28ec
Compare
|
FYI, pr testing is in progress... |
Pr testing completed. Tacker approved by @ivancich. More details : https://tracker.ceph.com/issues/75780 |
|
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 |
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
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.