Skip to content

Commit d3137ae

Browse files
committed
Update naming convention of the global secret key and related comments
1 parent a7ebd71 commit d3137ae

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

charts/dify/templates/credentials.tpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# A secret key that is used for securely signing the session cookie and encrypting sensitive information on the database. You can generate a strong key using `openssl rand -base64 42`.
33
SECRET_KEY: {{ .Values.api.secretKey | default .Values.global.appSecretKey | b64enc | quote }}
44
{{- if .Values.sandbox.enabled }}
5-
CODE_EXECUTION_API_KEY: {{ .Values.sandbox.auth.apiKey | default .Values.global.innerApiKey | b64enc | quote }}
5+
CODE_EXECUTION_API_KEY: {{ .Values.sandbox.auth.apiKey | default .Values.global.internalApiKey | b64enc | quote }}
66
{{- end }}
77
{{- include "dify.db.credentials" . }}
88
# The configurations of redis connection.
@@ -14,8 +14,8 @@ CODE_EXECUTION_API_KEY: {{ .Values.sandbox.auth.apiKey | default .Values.global.
1414
{{ include "dify.vectordb.credentials" . }}
1515
{{ include "dify.mail.credentials" . }}
1616
{{- if .Values.pluginDaemon.enabled }}
17-
PLUGIN_DAEMON_KEY: {{ .Values.pluginDaemon.auth.serverKey | default .Values.global.innerApiKey | b64enc | quote }}
18-
INNER_API_KEY_FOR_PLUGIN: {{ .Values.pluginDaemon.auth.difyApiKey | default .Values.global.innerApiKey | b64enc | quote }}
17+
PLUGIN_DAEMON_KEY: {{ .Values.pluginDaemon.auth.serverKey | default .Values.global.internalApiKey | b64enc | quote }}
18+
INNER_API_KEY_FOR_PLUGIN: {{ .Values.pluginDaemon.auth.difyApiKey | default .Values.global.internalApiKey | b64enc | quote }}
1919
{{- end }}
2020
{{- if and .Values.api.otel.enabled (not .Values.externalSecret.enabled) }}
2121
OTLP_API_KEY: {{ .Values.api.otel.apiKey | b64enc | quote }}
@@ -38,8 +38,8 @@ SECRET_KEY: {{ .Values.api.secretKey | default .Values.global.appSecretKey | b64
3838
{{ include "dify.vectordb.credentials" . }}
3939
{{ include "dify.mail.credentials" . }}
4040
{{- if .Values.pluginDaemon.enabled }}
41-
PLUGIN_DAEMON_KEY: {{ .Values.pluginDaemon.auth.serverKey | default .Values.global.innerApiKey | b64enc | quote }}
42-
INNER_API_KEY_FOR_PLUGIN: {{ .Values.pluginDaemon.auth.difyApiKey | default .Values.global.innerApiKey | b64enc | quote }}
41+
PLUGIN_DAEMON_KEY: {{ .Values.pluginDaemon.auth.serverKey | default .Values.global.internalApiKey | b64enc | quote }}
42+
INNER_API_KEY_FOR_PLUGIN: {{ .Values.pluginDaemon.auth.difyApiKey | default .Values.global.internalApiKey | b64enc | quote }}
4343
{{- end }}
4444
{{- if and .Values.api.otel.enabled (not .Values.externalSecret.enabled) }}
4545
OTLP_API_KEY: {{ .Values.api.otel.apiKey | b64enc | quote }}
@@ -213,15 +213,15 @@ SMTP_PASSWORD: {{ .Values.api.mail.smtp.password | b64enc | quote }}
213213
{{- end }}
214214

215215
{{- define "dify.sandbox.credentials" -}}
216-
API_KEY: {{ .Values.sandbox.auth.apiKey | default .Values.global.innerApiKey | b64enc | quote }}
216+
API_KEY: {{ .Values.sandbox.auth.apiKey | default .Values.global.internalApiKey | b64enc | quote }}
217217
{{- end }}
218218

219219
{{- define "dify.pluginDaemon.credentials" -}}
220220
{{ include "dify.db.credentials" . }}
221221
{{ include "dify.redis.credentials" . }}
222222
{{ include "dify.pluginDaemon.storage.credentials" . }}
223-
SERVER_KEY: {{ .Values.pluginDaemon.auth.serverKey | default .Values.global.innerApiKey | b64enc | quote }}
224-
DIFY_INNER_API_KEY: {{ .Values.pluginDaemon.auth.difyApiKey | default .Values.global.innerApiKey | b64enc | quote }}
223+
SERVER_KEY: {{ .Values.pluginDaemon.auth.serverKey | default .Values.global.internalApiKey | b64enc | quote }}
224+
DIFY_INNER_API_KEY: {{ .Values.pluginDaemon.auth.difyApiKey | default .Values.global.internalApiKey | b64enc | quote }}
225225
{{- end }}
226226

227227
{{- define "dify.pluginDaemon.storage.credentials" -}}

charts/dify/values.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"properties": {
6161
"edition": { "type": "string" },
6262
"appSecretKey": { "type": "string" },
63-
"innerApiKey": { "type": "string" },
63+
"internalApiKey": { "type": "string" },
6464
"consoleApiDomain": { "type": "string" },
6565
"consoleWebDomain": { "type": "string" },
6666
"serviceApiDomain": { "type": "string" },

charts/dify/values.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ global:
77
edition: "SELF_HOSTED"
88
# A secret key that is used for securely signing the session cookie and encrypting sensitive information on the database. You can generate a strong key using `openssl rand -base64 42`.
99
appSecretKey: "sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U"
10-
# A global secret key for inter-component API calls (e.g. `api`, `sandbox` and `pluginDaemon`). You can generate a strong key using `openssl rand -base64 42`.
11-
# Used as fallback for component-specific inter-component API keys (e.g., pluginDaemon.auth.serverKey, pluginDaemon.auth.difyApiKey).
12-
# Component-specific values take precedence over this global value. If component-specific value is empty, this global value is used.
13-
innerApiKey: ""
10+
# A global secret key for all inter-component API calls among Dify containers (e.g. `api`, `sandbox` and `pluginDaemon`). You can generate a strong key using `openssl rand -base64 42`.
11+
# Takes no effect when left empty. Can be overridden by component-specific values.
12+
internalApiKey: ""
1413
# The backend domain of the console API, used to concatenate the authorization callback.
1514
# If empty, it is the same domain. Example: console.dify.ai
1615
consoleApiDomain: ""
@@ -713,7 +712,7 @@ sandbox:
713712
clusterIP: ""
714713
auth:
715714
# API key for sandbox code execution service. You can generate a strong key using `openssl rand -base64 42`.
716-
# If not set, uses global.innerApiKey
715+
# If not set, uses global.internalApiKey
717716
apiKey: ""
718717

719718
## Sandbox ServiceAccount configuration

0 commit comments

Comments
 (0)