Skip to content

feat: derive mTLS identity from URI SANs, not just dNSName - #1934

Merged
levkk merged 1 commit into
pgdogdev:mainfrom
eidam:feat/mtls-uri-san-identity
Nov 2, 2026
Merged

levkk merged 1 commit into
pgdogdev:mainfrom
eidam:feat/mtls-uri-san-identity

Conversation

@levkk

@levkk levkk commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Workload identity platforms (SPIFFE, SPIRE, Istio, GKE managed workload identity) assert identity as a spiffe:// URI SAN and issue no dNSName, so their certificates resolved to no identity and were rejected even when signed by the configured client CA.

identity_from_certs now prefers dNSName, then uniformResourceIdentifier, then Subject CN. The URI is matched verbatim against [[users]] identity; no scheme-specific parsing. Certificates that resolved before resolve identically.

Closes #1893

Workload identity platforms (SPIFFE, SPIRE, Istio, GKE managed workload
identity) assert identity as a `spiffe://` URI SAN and issue no `dNSName`,
so their certificates resolved to no identity and were rejected even when
signed by the configured client CA.

`identity_from_certs` now prefers `dNSName`, then `uniformResourceIdentifier`,
then Subject CN. The URI is matched verbatim against `[[users]] identity`;
no scheme-specific parsing. Certificates that resolved before resolve
identically.

Closes pgdogdev#1893

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Nov 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Metal bench skipped! Fork PRs are not run on yet for safety reasons.

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/net/tls.rs 96.55% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@levkk
levkk merged commit a49941e into pgdogdev:main Nov 2, 2026
46 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.

[Auth] Derive mTLS identity from URI SANs, not just dNSName

3 participants