Read OpenID credentials from file (#3244)

* feat: read OpenID credentials from file

Signed-off-by: Uwe Jäger <uwe.jaeger@valiton.com>

* feat: allow credentials file and secret in config to keep BC

Signed-off-by: Uwe Jäger <uwe.jaeger@valiton.com>

---------

Signed-off-by: Uwe Jäger <uwe.jaeger@valiton.com>
This commit is contained in:
Uwe Jäger
2025-07-09 18:16:49 +02:00
committed by GitHub
parent 432fde45af
commit 06c1be119c
11 changed files with 144 additions and 32 deletions
+9 -2
View File
@@ -14,6 +14,14 @@ function setup() {
# Setup zot server
local zot_root_dir=${BATS_FILE_TMPDIR}/zot
local zot_config_file=${BATS_FILE_TMPDIR}/zot_config.json
local zot_openid_credentials_file=${BATS_FILE_TMPDIR}/openid_credentials.json
cat > ${zot_openid_credentials_file}<<EOF
{
"clientid": "zot-client",
"clientsecret": "ZXhhbXBsZS1hcHAtc2VjcmV0"
}
EOF
echo ${zot_root_dir} >&3
@@ -57,8 +65,7 @@ function setup() {
"providers": {
"oidc": {
"issuer": "http://127.0.0.1:5556/dex",
"clientid": "zot-client",
"clientsecret": "ZXhhbXBsZS1hcHAtc2VjcmV0",
"credentialsfile": "${zot_openid_credentials_file}",
"scopes": ["openid", "email", "groups"]
}
}