Repository navigation
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chala2001 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
could you make the change in the upstream openapi-generator? so we don't need to carry a patch in this repo? |
roycaihw
left a comment
There was a problem hiding this comment.
Only the IdP calls need this. _refresh_oidc already uses a requests session for the token refresh; can the discovery GET go through the same session with your adapter? Then we don't need the Configuration field or the generated-code patch, and nothing to upstream.
What type of PR is this?
/kind bug
What this PR does / why we need it:
When the OIDC IdP CA in the kubeconfig is a leaf or intermediate cert, kubectl accepts it but the Python client fails with "self-signed certificate in certificate chain". On Python 3.12 and older OpenSSL needs a self-signed root unless
VERIFY_X509_PARTIAL_CHAINis set. Python 3.13 sets it by default.This adds
Configuration.ssl_partial_chain(off by default) to the sync client, and_refresh_oidcturns it on when an IdP CA is given. The token request goes through requests, so it gets the same flag with a small adapter.The generated files get
scripts/partial_chain_patch.diff, applied inupdate-client.shlike the keepalive patch.Which issue(s) this PR fixes:
Fixes #2415
Special notes for your reviewer:
Tested end to end on 3.12 with a local IdP and a root, intermediate, leaf chain. Leaf or intermediate as the CA failed before and works now. An unrelated CA and a wrong hostname still fail. Also checked on 3.13.
The asyncio client is not changed here.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: