Skip to content

[release-1.23] Decode all CAs in the activator's routing secret - #16863

Merged
knative-prow[bot] merged 5 commits into
knative:release-1.23from
knative-prow-robot:cherry-pick-16707-to-release-1.23
Nov 30, 2026
Merged

knative-prow[bot] merged 5 commits into
knative:release-1.23from
knative-prow-robot:cherry-pick-16707-to-release-1.23

Conversation

@knative-prow-robot

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #16707

The activator now trusts all CA certificates contained in the `ca.crt` field of the `routing-serving-certs` secret, not just the first one, and no longer panics if that field holds invalid data.

cvas22 and others added 5 commits November 29, 2026 18:18
The activator only decoded the first PEM block of ca.crt in the
routing-serving-certs secret, so any additional CAs (e.g. during a CA
rotation or with a bring-your-own CA bundle) were silently ignored. If
the field did not contain PEM data at all, pem.Decode returned a nil
block and the activator panicked with a nil pointer dereference.

Use x509.CertPool.AppendCertsFromPEM to add every CA in the field and
log a warning when no valid certificate is found.

Fixes knative#13877

Signed-off-by: cvas22 <[email protected]>
@knative-prow knative-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 29, 2026
@knative-prow
knative-prow Bot requested review from dsimansk and skonto November 29, 2026 18:19
@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.48%. Comparing base (4dd0b7d) to head (6882aca).
⚠️ Report is 10 commits behind head on release-1.23.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.23   #16863      +/-   ##
================================================
+ Coverage         80.47%   80.48%   +0.01%     
================================================
  Files               217      217              
  Lines             13576    13574       -2     
================================================
  Hits              10925    10925              
  Misses             2293     2293              
+ Partials            358      356       -2     

☔ View full report in Codecov by Harness.
📢 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.

@dprotaso

Copy link
Copy Markdown
Member

/retest

@dprotaso

Copy link
Copy Markdown
Member

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Nov 30, 2026
@knative-prow

knative-prow Bot commented Nov 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, knative-prow-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 30, 2026
@knative-prow
knative-prow Bot merged commit 7a6133e into knative:release-1.23 Nov 30, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants