.
This commit is contained in:
@@ -101,6 +101,7 @@ log_info "Linking Synapse and MAS via OIDC..."
|
|||||||
CLIENT_ID="synapse-client"
|
CLIENT_ID="synapse-client"
|
||||||
CLIENT_SECRET=$(openssl rand -hex 32)
|
CLIENT_SECRET=$(openssl rand -hex 32)
|
||||||
ADMIN_SECRET=$(openssl rand -hex 32)
|
ADMIN_SECRET=$(openssl rand -hex 32)
|
||||||
|
MATRIX_SECRET=$(openssl rand -hex 32)
|
||||||
MATRIX_ENDPOINT="http://synapse:8008"
|
MATRIX_ENDPOINT="http://synapse:8008"
|
||||||
EXISTING_CLIENT=$(yq '.clients[] | select(.client_id == "'"${CLIENT_ID}"'")' "$MAS_CFG" 2>/dev/null || echo "")
|
EXISTING_CLIENT=$(yq '.clients[] | select(.client_id == "'"${CLIENT_ID}"'")' "$MAS_CFG" 2>/dev/null || echo "")
|
||||||
|
|
||||||
@@ -142,6 +143,7 @@ if ! yq '.oidc_providers' "$SYNAPSE_CFG" 2>/dev/null | grep -q "idp_id"; then
|
|||||||
\"issuer\": \"${ISSUER_URL}\",
|
\"issuer\": \"${ISSUER_URL}\",
|
||||||
\"client_id\": \"${CLIENT_ID}\",
|
\"client_id\": \"${CLIENT_ID}\",
|
||||||
\"client_secret\": \"${CLIENT_SECRET}\",
|
\"client_secret\": \"${CLIENT_SECRET}\",
|
||||||
|
\"shared_secret\": \"${MATRIX_SECRET}\",
|
||||||
\"scopes\": [\"openid\", \"profile\"],
|
\"scopes\": [\"openid\", \"profile\"],
|
||||||
\"skip_verification\": false
|
\"skip_verification\": false
|
||||||
}]" "$SYNAPSE_CFG" || { log_error "Failed to inject OIDC config"; exit 1; }
|
}]" "$SYNAPSE_CFG" || { log_error "Failed to inject OIDC config"; exit 1; }
|
||||||
|
|||||||
Reference in New Issue
Block a user