Fix SAN-extension policy bypass #915
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 281 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.338
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #915"
general
weight: 0.35
inteon
TL;DR
A low-privileged tenant (
create certificaterequests+ RBACuseon a boundCertificateRequestPolicy) could obtain a CA-signed certificate carrying SANidentities the approver-policy gate never evaluated — e.g. a Microsoft UPN
otherNameor adirectoryName— and impersonate a privileged user to AD CS /EAP-TLS / custom mTLS relying parties.
Root cause
allowed.Evaluate()matched SANs against Go's parsed slices(
DNSNames/IPAddresses/URIs/EmailAddresses), which only cover GeneralNametags
{1,2,6,7}and silently drop{0,3,4,5,8}(otherName, x400Address,directoryName, ediPartyName, registeredID). cert-manager copies the raw SAN
extension into the issued cert, so those dropped entries shipped unseen by policy.
Fix
Parse the raw SAN extension (OID
2.5.29.17) directly and evaluate everyGeneralName — fail-closed:
{1,2,6,7}keep using the existing parsed-slice evaluators (unchanged);otherName(tag 0) is denied unless its OID is opted in via the new additiveallowed.otherNamesfield (oid+values/required/validations);{3,4,5,8}are always denied (no opt-in).DNS/IP/URI/email-only CSRs evaluate exactly as before.
The policy webhook also validates
allowed.otherNamesat admission (same asevery other
allowed.field): arequiredentry must declarevalues/validations, every CEL rule must compile, and eachoidmust be a valid,canonical dotted ASN.1 OID — so misconfigurations fail fast instead of producing
confusing runtime denials.
Migration impact
| Scenario | After |
|---|---|
| DNS/IP/URI/email SANs only | works unchanged |
| SAN UPN
otherName(AD / EAP-TLS / smart-card) | denied by default — addallowed.otherNames: [{oid: "1.3.6.1.4.1.311.20.2.3", values: ["@tenant.example.com"]}]|| SAN
directoryName/x400Address/ediPartyName/registeredID| always denied, no opt-in (rare for cert-manager; Istio/SPIFFE/CSI use URI SANs, unaffected) |Denied requests carry an
Approved=Falsecondition naming the offending SAN/OIDand the denying policy; the existing
certmanager_approverpolicy_certificaterequests_approval{status="denied"}metricflags an upgrade-induced rise.