Files
zot/examples/config-mtls.json
Andrei Aaron 79439bbf63 feat: add configurable mTLS identity extraction with fallback chain (#3640)
Add support for configurable identity attributes in mTLS authentication,
allowing identity extraction from CommonName, Subject DN, Email SAN,
URI SAN, or DNSName SAN with fallback chain support. Includes regex
pattern matching for URI SANs (e.g., SPIFFE workload IDs).

- Add MTLSConfig with identity attributes, URISANPattern, and index fields
- Implement extractMTLSIdentity with fallback chain logic
- Move the mtls tests in the api package to pkg/api/mtls_test.go

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2025-12-18 09:10:47 -08:00

36 lines
669 B
JSON

{
"distSpecVersion": "1.1.1",
"storage": {
"rootDirectory": "/tmp/zot"
},
"http": {
"address": "127.0.0.1",
"port": "8080",
"realm": "zot",
"tls": {
"cert": "test/data/server.cert",
"key": "test/data/server.key",
"cacert": "test/data/ca.crt"
},
"auth": {
"mtls": {
"identityAttributes": ["CommonName"]
}
},
"accessControl": {
"repositories": {
"**": {
"policies": [{
"users": ["clientuser"],
"actions": ["read", "create"]
}],
"defaultPolicy": ["read"]
}
}
}
},
"log": {
"level": "debug"
}
}