CVE-2024-29037: Insufficient Information (NVD-CWE-noinfo)
value: datahub-helm provides the Kubernetes Helm charts for deploying Datahub and its dependencies on a Kubernetes cluster. Starting in version 0.1.143 and prior to version 0.2.182, due to configuration issues in the helm chart, if there was a successful initial deployment during a limited window of time, personal access tokens were possibly created with a default secret key. Since the secret key is a static, publicly available value, someone could inspect the algorithm used to generate personal access tokens and generate their own for an instance. Deploying with Metadata Service Authentication enabled would have been difficult during window of releases. If someone circumvented the helm settings and manually set Metadata Service Authentication to be enabled using environment variables directly, this would skip over the autogeneration logic for the Kubernetes Secrets and DataHub GMS would default to the signing key specified statically in the application.yml. Most deployments probably did not attempt to circumvent the helm settings to enable Metadata Service Authentication during this time, so impact is most likely limited. Any deployments with Metadata Service Authentication enabled should ensure that their secret values are properly randomized. Version 0.2.182 contains a patch for this issue. As a workaround, one may reset the token signing key to be a random value, which will invalidate active personal access tokens.
CWE description: There is insufficient information about the issue to classify it; details are unkown or unspecified.
Published: 2024-03-20T21:15Z
Repository: https://github.com/acryldata/datahub-helm
Language: YAML
Files changed: charts/datahub/Chart.yaml, charts/datahub/templates/datahub-upgrade/_upgrade.tpl, charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml, charts/datahub/templates/datahub-upgrade/datahub-nocode-migration-job.yml, charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml
Commit date: 2023-08-17 22:36:12 -0500
Commit message: fix(auth-secrets): fix system update secrets (#351)

* fix(auth-secret): remove auth secret from common template, cannot be used by all jobs
Diff: diff --git a/charts/datahub/Chart.yaml b/charts/datahub/Chart.yaml
index da510e5..43e2cf2 100644
--- a/charts/datahub/Chart.yaml
+++ b/charts/datahub/Chart.yaml
@@ -2,11 +2,11 @@ apiVersion: v2
 name: datahub
 description: A Helm chart for LinkedIn DataHub
 type: application
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
-version: 0.2.181
+version: 0.2.182
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application.
 appVersion: 0.10.5
 dependencies:
   - name: datahub-gms
diff --git a/charts/datahub/templates/datahub-upgrade/_upgrade.tpl b/charts/datahub/templates/datahub-upgrade/_upgrade.tpl
index dda0945..e67ea96 100644
--- a/charts/datahub/templates/datahub-upgrade/_upgrade.tpl
+++ b/charts/datahub/templates/datahub-upgrade/_upgrade.tpl
@@ -37,19 +37,10 @@ Return the env variables for upgrade jobs
   value: "{{ .Values.global.sql.datasource.host }}"
 - name: EBEAN_DATASOURCE_URL
   value: "{{ .Values.global.sql.datasource.url }}"
 - name: EBEAN_DATASOURCE_DRIVER
   value: "{{ .Values.global.sql.datasource.driver }}"
-{{- if .Values.global.datahub.metadata_service_authentication.enabled }}
-- name: DATAHUB_SYSTEM_CLIENT_ID
-  value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
-- name: DATAHUB_SYSTEM_CLIENT_SECRET
-  valueFrom:
-    secretKeyRef:
-      name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
-      key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
-{{- end }}
 - name: KAFKA_BOOTSTRAP_SERVER
   value: "{{ .Values.global.kafka.bootstrap.server }}"
 {{- if eq .Values.global.kafka.schemaregistry.type "INTERNAL" }}
 - name: KAFKA_SCHEMAREGISTRY_URL
   value: {{ printf "http://%s-%s:%s/schema-registry/api/" .Release.Name "datahub-gms" .Values.global.datahub.gms.port }}
diff --git a/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml b/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml
index fdd539d..54d51b8 100644
--- a/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml
+++ b/charts/datahub/templates/datahub-upgrade/datahub-cleanup-job-template.yml
@@ -56,10 +56,19 @@ spec:
               image: "{{ .Values.datahubUpgrade.image.repository }}:{{ required "Global or specific tag is required" (.Values.datahubUpgrade.image.tag | default .Values.global.datahub.version) }}"
               imagePullPolicy: {{ .Values.datahubUpgrade.image.pullPolicy | default "IfNotPresent" }}
               args: [ "-u", "NoCodeDataMigrationCleanup" ]
               env:
                 {{- include "datahub.upgrade.env" . | nindent 16}}
+                {{- if .Values.global.datahub.metadata_service_authentication.enabled }}
+                - name: DATAHUB_SYSTEM_CLIENT_ID
+                  value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
+                - name: DATAHUB_SYSTEM_CLIENT_SECRET
+                  valueFrom:
+                    secretKeyRef:
+                      name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
+                      key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
+                {{- end }}
               {{- with .Values.datahubUpgrade.extraEnvs }}
                 {{- toYaml . | nindent 16 }}
               {{- end }}
               securityContext:
                 {{- toYaml .Values.datahubUpgrade.securityContext | nindent 16 }}
diff --git a/charts/datahub/templates/datahub-upgrade/datahub-nocode-migration-job.yml b/charts/datahub/templates/datahub-upgrade/datahub-nocode-migration-job.yml
index 7649584..311c1f3 100644
--- a/charts/datahub/templates/datahub-upgrade/datahub-nocode-migration-job.yml
+++ b/charts/datahub/templates/datahub-upgrade/datahub-nocode-migration-job.yml
@@ -66,10 +66,19 @@ spec:
             - "batchDelayMs={{ .Values.datahubUpgrade.batchDelayMs }}"
             - "-a"
             - "dbType={{ .Values.datahubUpgrade.noCodeDataMigration.sqlDbType }}"
           env:
             {{- include "datahub.upgrade.env" . | nindent 12}}
+            {{- if .Values.global.datahub.metadata_service_authentication.enabled }}
+            - name: DATAHUB_SYSTEM_CLIENT_ID
+              value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
+            - name: DATAHUB_SYSTEM_CLIENT_SECRET
+              valueFrom:
+                secretKeyRef:
+                  name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
+                  key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
+            {{- end }}
           {{- with .Values.datahubUpgrade.extraEnvs }}
             {{- toYaml . | nindent 12 }}
           {{- end }}
           securityContext:
             {{- toYaml .Values.datahubUpgrade.securityContext | nindent 12 }}
diff --git a/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml b/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml
index 7fbdde2..167b0d6 100644
--- a/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml
+++ b/charts/datahub/templates/datahub-upgrade/datahub-restore-indices-job-template.yml
@@ -68,10 +68,19 @@ spec:
                 - "batchSize={{ .Values.datahubUpgrade.batchSize }}"
                 - "-a"
                 - "batchDelayMs={{ .Values.datahubUpgrade.batchDelayMs }}"
               env:
                 {{- include "datahub.upgrade.env" . | nindent 16}}
+                {{- if .Values.global.datahub.metadata_service_authentication.enabled }}
+                - name: DATAHUB_SYSTEM_CLIENT_ID
+                  value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
+                - name: DATAHUB_SYSTEM_CLIENT_SECRET
+                  valueFrom:
+                    secretKeyRef:
+                      name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
+                      key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
+                {{- end }}
               {{- with .Values.datahubUpgrade.extraEnvs }}
                 {{- toYaml . | nindent 16 }}
               {{- end }}
               securityContext:
                 {{- toYaml .Values.datahubUpgrade.securityContext | nindent 16 }}

Vulnerable code: version: 0.2.181
{{- if .Values.global.datahub.metadata_service_authentication.enabled }}
- name: DATAHUB_SYSTEM_CLIENT_ID
  value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
- name: DATAHUB_SYSTEM_CLIENT_SECRET
  valueFrom:
    secretKeyRef:
      name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
      key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
{{- end }}
Fixed code: version: 0.2.182
                {{- if .Values.global.datahub.metadata_service_authentication.enabled }}
                - name: DATAHUB_SYSTEM_CLIENT_ID
                  value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
                - name: DATAHUB_SYSTEM_CLIENT_SECRET
                  valueFrom:
                    secretKeyRef:
                      name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
                      key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
                {{- end }}
            {{- if .Values.global.datahub.metadata_service_authentication.enabled }}
            - name: DATAHUB_SYSTEM_CLIENT_ID
              value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
            - name: DATAHUB_SYSTEM_CLIENT_SECRET
              valueFrom:
                secretKeyRef:
                  name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
                  key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
            {{- end }}
                {{- if .Values.global.datahub.metadata_service_authentication.enabled }}
                - name: DATAHUB_SYSTEM_CLIENT_ID
                  value: {{ .Values.global.datahub.metadata_service_authentication.systemClientId }}
                - name: DATAHUB_SYSTEM_CLIENT_SECRET
                  valueFrom:
                    secretKeyRef:
                      name: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretRef }}
                      key: {{ .Values.global.datahub.metadata_service_authentication.systemClientSecret.secretKey }}
                {{- end }}