mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(cli/server.go): allow the use of public OIDC clients (#16489)
Support public OIDC clients - Enables support for public OIDC clients by only checking for a client ID being set. This allows for confidential and public clients to be used with Coder's OIDC authentication. - Also adds a public client configuration to the development OIDC setup script. Fixes #16135 Change-Id: Iadd85d40c2faa595a0498e25d3407a1f94b5c8a8 Signed-off-by: Thomas Kosiewski <tk@coder.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
This commit is contained in:
@@ -49,6 +49,17 @@ cat <<EOF >/tmp/example-realm.json
|
||||
"baseUrl": "/coder",
|
||||
"redirectUris": ["*"],
|
||||
"secret": "coder"
|
||||
},
|
||||
{
|
||||
"clientId": "coder-public",
|
||||
"publicClient": true,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"enabled": true,
|
||||
"fullScopeAllowed": true,
|
||||
"baseUrl": "/coder",
|
||||
"redirectUris": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -79,6 +90,9 @@ hostname=$(hostname -f)
|
||||
export CODER_OIDC_ISSUER_URL="http://${hostname}:9080/realms/coder"
|
||||
export CODER_OIDC_CLIENT_ID=coder
|
||||
export CODER_OIDC_CLIENT_SECRET=coder
|
||||
# Comment out the two lines above, and comment in the line below,
|
||||
# to configure OIDC auth using a public client.
|
||||
# export CODER_OIDC_CLIENT_ID=coder-public
|
||||
export CODER_DEV_ACCESS_URL="http://${hostname}:8080"
|
||||
|
||||
exec "${SCRIPT_DIR}/develop.sh" "$@"
|
||||
|
||||
Reference in New Issue
Block a user