]> 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)
commit5bba8dbff0044ba5f42c40424ca490e5fad90ed4
treef7ea154efdbfdbe3d12e58583b94c2425e47a80d
parent80e04760f5a385872a1d3d19d6f219478999104e
[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