mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
9425ca8b7d
Validate callback_ui and default invalid values to /. Allow absolute callback_ui only when its origin is allowlisted via http.auth.openid.callbackAllowOrigins (and externalUrl). Add/adjust unit + controller tests and update examples/docs for relative vs allowlisted absolute redirect Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
56 lines
1.2 KiB
JSON
56 lines
1.2 KiB
JSON
{
|
|
"distSpecVersion": "1.1.1",
|
|
"storage": {
|
|
"rootDirectory": "/tmp/zot",
|
|
"dedupe": true
|
|
},
|
|
"http": {
|
|
"address": "127.0.0.1",
|
|
"port": "8080",
|
|
"externalUrl": "http://127.0.0.1:8080",
|
|
"realm": "zot",
|
|
"auth": {
|
|
"sessionKeysFile": "examples/sessionKeys.json",
|
|
"openid": {
|
|
"callbackAllowOrigins": ["http://127.0.0.1:3000"],
|
|
"providers": {
|
|
"oidc": {
|
|
"name": "Zitadel",
|
|
"issuer": "https://iam.example.com",
|
|
"credentialsFile": "examples/config-openid-oidc-credentials.json",
|
|
"scopes": ["openid", "profile", "email", "groups"],
|
|
"claimMapping": {
|
|
"username": "preferred_username"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"failDelay": 5
|
|
},
|
|
"accessControl": {
|
|
"repositories": {
|
|
"**": {
|
|
"policies": [
|
|
{
|
|
"users": [
|
|
"admin"
|
|
],
|
|
"actions": [
|
|
"read",
|
|
"create",
|
|
"update",
|
|
"delete"
|
|
]
|
|
}
|
|
],
|
|
"defaultPolicy": ["read"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"log": {
|
|
"level": "debug"
|
|
},
|
|
"extensions": {}
|
|
}
|