You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe:
Currently, In order to enable TiDB dashboard SSO login, TiDB maintainers need to set up TiDB dashboard OIDC client ID, OIDC discovery URL, Impersonate SQL User username/password manually. This works when maintainers only need to manage several clusters but could be quite heavy lifting when they have to manage tens or hundreds of TiDB clusters.
Describe the feature you'd like:
Kubernetes Official Doc suggests secrets can be mounted as files so that containers can read them. Inspired by this, I am proposing to have TiDB dashboard reading these files:
/var/lib/sso-secrets/oidc_client_id
/var/lib/sso-secrets/oidc_discovery_url
/var/lib/sso-secrets/sql_username
/var/lib/sso-secrets/sql_password
to setup SSOCoreConfig.ClientID, SSOCoreConfig.DiscoveryURL and building new SessionUser.
Existence of any file will stop TiDB dashboard from accepting new oidc_client_id as well as oidc_discovery_url via SetConfigRequest, and accepting new impersonate sql user information via CreateImpersonationRequest; Users sending such requests shall receive error responses indicating these setups are managed by TiDB dashboard deployments and are immutable.
This allows maintainers who are deploying TiDB cluster via Kubernetes to manage SSO secrets with Kubernetes secrets (thus allowing automation).
Describe alternatives you've considered:
An alternative is to use environment variables (as is suggested by Kubernetes official doc). Decided to use files since environment variables can be exposed to /proc filesystems and potentially prometheus.
xsfeng-zodiac
changed the title
Allowing users to specify TiDB dashboard SSO credentials programmatically
Allowing TiDB maintainers to specify TiDB dashboard SSO credentials during deployment
May 31, 2023
Feature Request
Is your feature request related to a problem? Please describe:
Currently, In order to enable TiDB dashboard SSO login, TiDB maintainers need to set up TiDB dashboard OIDC client ID, OIDC discovery URL, Impersonate SQL User username/password manually. This works when maintainers only need to manage several clusters but could be quite heavy lifting when they have to manage tens or hundreds of TiDB clusters.
Describe the feature you'd like:
Kubernetes Official Doc suggests secrets can be mounted as files so that containers can read them. Inspired by this, I am proposing to have TiDB dashboard reading these files:
to setup
SSOCoreConfig.ClientID
,SSOCoreConfig.DiscoveryURL
and building newSessionUser
.Existence of any file will stop TiDB dashboard from accepting new oidc_client_id as well as oidc_discovery_url via
SetConfigRequest
, and accepting new impersonate sql user information viaCreateImpersonationRequest
; Users sending such requests shall receive error responses indicating these setups are managed by TiDB dashboard deployments and are immutable.This allows maintainers who are deploying TiDB cluster via Kubernetes to manage SSO secrets with Kubernetes secrets (thus allowing automation).
Describe alternatives you've considered:
An alternative is to use environment variables (as is suggested by Kubernetes official doc). Decided to use files since environment variables can be exposed to
/proc
filesystems and potentially prometheus.Teachability, Documentation, Adoption, Migration Strategy:
N/A
The text was updated successfully, but these errors were encountered: