Skip to content

feat: optional OAuth auth for the remote executor worker#81

Draft
max-datahub wants to merge 2 commits into
mainfrom
mm--executor-oauth-auth
Draft

feat: optional OAuth auth for the remote executor worker#81
max-datahub wants to merge 2 commits into
mainfrom
mm--executor-oauth-auth

Conversation

@max-datahub

Copy link
Copy Markdown

Summary

Adds optional OAuth authentication to the remote executor worker chart, the companion to the executor-side OAuth work.

  • DATAHUB_GMS_TOKEN is now rendered conditionally — only when a PAT secret is configured and no OAuth auth.type is set (so auth.type is the dominant switch and PAT/OAuth can never both render).
  • New first-class global.datahub.auth.* values render the DATAHUB_AUTH_* env vars for k8s_oidc / azure_entra / oidc_client_credentials.
  • Client secrets and projected service-account tokens ride the chart's existing extraEnvs / extraEnvsFrom (ConfigMap) / extraVolumes / serviceAccount.annotations extension points — no plaintext secret values in chart values.

Backward compatibility

Fully preserved. The default secretRef is unchanged, so an existing PAT install renders DATAHUB_GMS_TOKEN exactly as before; auth.type does nothing until the executor image that consumes it ships. OAuth-only users set secretRef: "" and an auth.type.

Verification

helm lint clean; helm template confirmed across four modes — default (PAT only), k8s_oidc, azure_entra, oidc_client_credentials — and the dual-set regression (default secretRef + auth.type) renders the auth env and no DATAHUB_GMS_TOKEN.

Why Draft

Pairs with the executor OAuth PR in datahub-fork; holding until that lands.

🤖 Generated with Claude Code

… PAT)

- Wrap DATAHUB_GMS_TOKEN env in an if-guard so pods start without the
  PAT secret when global.datahub.gms.secretRef is set to "".
- Add global.datahub.auth.{type,tokenFile,audience,azure,oidc} values
  and render DATAHUB_AUTH_TYPE + provider-specific env vars in the
  workload env block (k8s_oidc, azure_entra, oidc_client_credentials).
- Existing PAT deployments are byte-for-byte unchanged (secretRef still
  defaults to datahub-access-token-secret).
The DATAHUB_GMS_TOKEN guard and the OAuth DATAHUB_AUTH_* block were
independent, so leaving the default (non-empty) secretRef while also
setting auth.type rendered both DATAHUB_GMS_TOKEN and DATAHUB_AUTH_TYPE,
violating the token-XOR-auth contract (the SDK rejects both at once).

Make auth.type the dominant switch: the PAT env now renders only when a
secretRef is set AND no OAuth auth.type is configured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant