-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
agnhost: Try both in-cluster and external discovery #101589
Conversation
need to bump test/images/agnhost/VERSION as well |
Bumped. |
looks like build/dependencies.yaml is unhappy, and will want you to update |
looks reasonable otherwise |
/hold cancel I've tested this on GKE and it works with our cluster-external endpoints. |
The conformance test for ServiceAccountIssuerDiscovery is currently configured with --in-cluster-discovery, which only supports token validation against in-cluster endpoints. Many cloud providers provide their own, external endpoints for OIDC discovery, and because the iss claim in tokens will point to these endpoints, but the client in this test only trusts the Cluster CA, it will fail to connect to the external discovery endpoints when validating the token. To ensure that the conformance test at least supports scenario where both the discovery doc endpoint and JWKS endpoint are cluster-local and the scenario where both endpoints are cluster-external, this PR has the test try both and requires at least one to pass. Caveat: The test still won't support a configuration where one endpoint is cluster-local and the other is external. We don't yet have evidence that this is a configuration that is used in practice, so this initial hotfix will at least fix the conformance test for the "both external" configuration we know providers already use. Note that if one endpoint is cluster-local, and the other is cluster-external, tokens can still only be validated in-cluster, because both endpoints must be accessible to Relying Parties that validate tokens.
/lgtm post-merge, follow https://github.com/kubernetes/kubernetes/blob/master/test/images/README.md#promoting-images to update https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-e2e-test-images/images.yaml, then open a follow-up to bump the manifest version used to 2.32 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, mtaufen The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
sg, thanks! |
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
4 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
This promotes the version of agnhost with the conformance test fix from kubernetes/kubernetes#101589
Updates e2e tests to use agnhost 2.32, which fixes an issue with the conformance tests for ServiceAccountIssuerDiscovery. Original fix: kubernetes#101589 Image promotion: kubernetes/k8s.io#1994
Updates e2e tests to use agnhost 2.32, which fixes an issue with the conformance tests for ServiceAccountIssuerDiscovery. Original fix: kubernetes#101589 Image promotion: kubernetes/k8s.io#1994
The conformance test for ServiceAccountIssuerDiscovery is currently
configured with --in-cluster-discovery, which only supports token
validation against in-cluster endpoints. Many cloud providers provide
their own, external endpoints for OIDC discovery, and because the iss
claim in tokens will point to these endpoints, but the client in this
test only trusts the Cluster CA, it will fail to connect to the external
discovery endpoints when validating the token.
To ensure that the conformance test at least supports scenario where
both the discovery doc endpoint and JWKS endpoint are cluster-local and
the scenario where both endpoints are cluster-external, this PR has the
test try both and requires at least one to pass.
Caveat: The test still won't support a configuration where one
endpoint is cluster-local and the other is external. We don't yet have
evidence that this is a configuration that is used in practice, so this
initial hotfix will at least fix the conformance test for the "both
external" configuration we know providers already use. Note that if one
endpoint is cluster-local, and the other is cluster-external, tokens can
still only be validated in-cluster, because both endpoints must be
accessible to Relying Parties that validate tokens.
What type of PR is this?
/kind bug
/kind failing-test
Does this PR introduce a user-facing change?
Hold since I still need to test this for GKE to ensure it can succeed in that environment:
/hold
/assign @liggitt