Skip to content

Allow directly-configured Kubernetes issuers to use in-cluster auth path#2356

Merged
Hayden-IO merged 1 commit into
sigstore:mainfrom
kwmonroe:fix/k8s-non-default-issuer-url
May 29, 2026
Merged

Allow directly-configured Kubernetes issuers to use in-cluster auth path#2356
Hayden-IO merged 1 commit into
sigstore:mainfrom
kwmonroe:fix/k8s-non-default-issuer-url

Conversation

@kwmonroe

Copy link
Copy Markdown
Contributor

Summary

Restore the in-cluster CA + projected service-account bearer-token auth path for directly configured Kubernetes issuers whose issuer URL is not literally https://kubernetes.default.svc, while preserving the v1.8.6 SSRF / token-leak protections added in 378c654.

This fixes the regression reported in #2355 for deployments such as K3s, where the service-account issuer may be https://kubernetes.default.svc.cluster.local and is explicitly listed in OIDCIssuers.

The existing TestGetVerifier_MetaIssuerK8sTokenNotLeaked continues to pass, and a new TestGetVerifier_DirectConfiguredK8sIssuerGetsToken covers the K3s case.

Closes #2355

Release Note

  • Fixed a regression introduced in v1.8.6 where Kubernetes-type issuers configured with a non-default URL (e.g. K3s's https://kubernetes.default.svc.cluster.local) no longer received the in-cluster CA and service-account bearer token during OIDC discovery.

Documentation

NONE

Gate the in-cluster CA + bearer-token attachment in httpClientForIssuer on
the issuer being directly listed in OIDCIssuers, in addition to the existing
match against k8sIssuerURL. Clusters whose --service-account-issuer is not
literally https://kubernetes.default.svc (e.g. K3s, which uses
https://kubernetes.default.svc.cluster.local) can again use the in-cluster
auth path when their issuer URL is explicitly listed in OIDCIssuers.

The SSRF/token-leak protection from sigstore#2354 is preserved: MetaIssuer wildcard
matches against attacker-controlled hosts still do not receive the bearer
token, because the new gate trusts only directly-listed OIDCIssuers entries
(and the default k8sIssuerURL itself).

Fixes sigstore#2355.

Signed-off-by: Kevin Monroe <kevin.monroe@chainguard.dev>
@kwmonroe kwmonroe requested a review from a team as a code owner May 29, 2026 01:08
@Hayden-IO

Copy link
Copy Markdown
Contributor

Thanks! I'll cut a new release shortly.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.24%. Comparing base (cf238ac) to head (3c662b3).
⚠️ Report is 601 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2356       +/-   ##
===========================================
- Coverage   57.93%   45.24%   -12.70%     
===========================================
  Files          50       72       +22     
  Lines        3119     4721     +1602     
===========================================
+ Hits         1807     2136      +329     
- Misses       1154     2345     +1191     
- Partials      158      240       +82     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hayden-IO Hayden-IO merged commit 8254f95 into sigstore:main May 29, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

K3s / non-default Kubernetes issuer no longer gets in-cluster CA+token handling

2 participants