mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: report SCIM configuration on Deployment (#26628)
Adds two nullable booleans to `telemetry.Deployment`: - `SCIMEnabled`: `true` when `CODER_SCIM_AUTH_HEADER` is set. - `SCIMUseLegacy`: `true` when `CODER_SCIM_USE_LEGACY` is set. Both mirror `Deployment.IDPOrgSync`: nullable for backward compatibility, and report configuration state rather than license entitlement (#16323). Lives on `Deployment` rather than `Snapshot` so the existing `bqDeployment` table on `coder/coder-telemetry-server` gets two columns instead of a new table. `SCIMAPIKey` is annotated as a secret and is scrubbed by `WithoutSecrets` before the config reaches telemetry, so `DeploymentConfig.SCIMAPIKey` is always empty in production. The booleans are pre-computed from the pre-scrub `DeploymentValues` in `cli/server.go` and passed in via `telemetry.Options.SCIMEnabled` / `SCIMUseLegacy`. Pairs with [coder/coder-telemetry-server#43](https://github.com/coder/coder-telemetry-server/pull/43), which adds the matching `bqDeployment` columns and the manual BigQuery `ALTER TABLE` step. --- Generated by Coder Agents on behalf of @Emyrk.
This commit is contained in:
@@ -988,6 +988,10 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
|
||||
URL: vals.Telemetry.URL.Value(),
|
||||
Tunnel: tunnel != nil,
|
||||
DeploymentConfig: deploymentConfigWithoutSecrets,
|
||||
// SCIMAPIKey is a secret and is scrubbed by WithoutSecrets above,
|
||||
// so we derive SCIMEnabled from vals (pre-scrub) instead.
|
||||
SCIMEnabled: vals.SCIMAPIKey != "",
|
||||
SCIMUseLegacy: vals.UseLegacySCIM.Value(),
|
||||
ParseLicenseJWT: func(lic *telemetry.License) error {
|
||||
// This will be nil when running in AGPL-only mode.
|
||||
if options.ParseLicenseClaims == nil {
|
||||
|
||||
Reference in New Issue
Block a user