]> go.fuhry.dev Git - runtime.git/commit
[mtls] add common identity parser
authorDan Fuhry <dan@fuhry.com>
Wed, 19 Nov 2025 14:14:51 +0000 (09:14 -0500)
committerDan Fuhry <dan@fuhry.com>
Wed, 19 Nov 2025 14:14:51 +0000 (09:14 -0500)
commitf40d8bf69feea738adcc5d4b2fa81cfb907a7f3c
tree6c6c7821bc656ee75b0d85a2d2b574d3afcc7430
parent6593afdccb49da7a9a0089336df9182e53764779
[mtls] add common identity parser

Add a new function in `mtls`, `ParseIdentity`, which standardizes the following prefixes for identities:
- "user." for human users
- "ssl://" for publicly trusted certs
- the exact string "anonymous" for anonymous access
- all other strings are parsed as service identities

The etcd client is configured to follow this convention.
mtls/identity.go
sd/etcd_factory.go