mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 11:37:56 +08:00
79439bbf63
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>
36 lines
669 B
JSON
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"
|
|
}
|
|
}
|