mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 11:37:56 +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>
70 lines
1.8 KiB
JSON
70 lines
1.8 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": {
|
|
"htpasswd": {
|
|
"path": "test/data/htpasswd"
|
|
},
|
|
"sessionKeysFile": "examples/sessionKeys.json",
|
|
"apikey": true,
|
|
"openid": {
|
|
"callbackAllowOrigins": ["http://127.0.0.1:3000"],
|
|
"providers": {
|
|
"github": {
|
|
"credentialsFile": "examples/config-openid-github-credentials.json",
|
|
"keypath": "",
|
|
"scopes": ["read:org", "user", "repo"]
|
|
},
|
|
"google": {
|
|
"credentialsFile": "examples/config-openid-google-credentials.json",
|
|
"issuer": "https://accounts.google.com",
|
|
"scopes": ["openid", "email"]
|
|
},
|
|
"gitlab": {
|
|
"issuer": "https://gitlab.com",
|
|
"credentialsFile": "examples/config-openid-gitlab-credentials.json",
|
|
"scopes": ["openid", "read_api", "read_user", "profile", "email"]
|
|
},
|
|
"oidc": {
|
|
"name": "Corporate SSO",
|
|
"issuer": "http://127.0.0.1:5556/dex",
|
|
"credentialsFile": "examples/config-openid-oidc-credentials.json",
|
|
"scopes": ["openid", "user", "email", "groups"]
|
|
}
|
|
}
|
|
},
|
|
"failDelay": 5
|
|
},
|
|
"accessControl": {
|
|
"repositories": {
|
|
"**": {
|
|
"policies": [
|
|
{
|
|
"users": [
|
|
"test"
|
|
],
|
|
"actions": [
|
|
"read",
|
|
"create"
|
|
]
|
|
}
|
|
],
|
|
"defaultPolicy": ["read"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"log": {
|
|
"level": "debug"
|
|
},
|
|
"extensions": {}
|
|
}
|