From e39d78f450755ee7d580d7de4ec047c7418a2cac Mon Sep 17 00:00:00 2001 From: romartin Date: Thu, 18 Dec 2025 00:13:38 +0100 Subject: [PATCH 1/8] AAP-58797: Operator - Implement Chatbot authentication --- roles/chatbot/defaults/main.yml | 5 +++++ .../tasks/handle_chatbot_api_key_secret.yml | 21 +++++++++++++++++++ roles/chatbot/tasks/main.yml | 3 +++ ....configmap_lightspeed_stack_config.yaml.j2 | 4 ++++ .../templates/chatbot.deployment.yaml.j2 | 2 ++ .../secrets/chatbot_api_key_secret.yaml.j2 | 14 +++++++++++++ roles/model/defaults/main.yml | 5 +++++ roles/model/tasks/update_status.yml | 2 ++ .../model/templates/model.deployment.yaml.j2 | 5 +++++ 9 files changed, 61 insertions(+) create mode 100644 roles/chatbot/tasks/handle_chatbot_api_key_secret.yml create mode 100644 roles/chatbot/templates/secrets/chatbot_api_key_secret.yaml.j2 diff --git a/roles/chatbot/defaults/main.yml b/roles/chatbot/defaults/main.yml index e059fe3f..1da8bc03 100644 --- a/roles/chatbot/defaults/main.yml +++ b/roles/chatbot/defaults/main.yml @@ -42,6 +42,11 @@ _chatbot_mcp_lightspeed_image_version: "{{ lookup('env', 'DEFAULT_CHATBOT_MCP_LI chatbot_config_secret_name: '' # ======================================== +# ---------------------------------------- +# Configuration for the Chatbot API Key +# ---------------------------------------- +chatbot_api_key_secret_name: 'chatbot-api-key' +# ======================================== # ---------------------------------------- # Configuration for underlying service diff --git a/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml new file mode 100644 index 00000000..00a41a67 --- /dev/null +++ b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml @@ -0,0 +1,21 @@ +--- +- name: Create Chatbot API Key Secret + kubernetes.core.k8s: + apply: true + state: present + force: false + definition: "{{ lookup('template', 'secrets/chatbot_api_key_secret.yaml.j2') }}" + no_log: "{{ no_log }}" + +- name: Read Chatbot API Key + kubernetes.core.k8s_info: + kind: Secret + namespace: '{{ ansible_operator_meta.namespace }}' + name: '{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}' + register: _generated_chatbot_api_key + no_log: "{{ no_log }}" + +- name: Set Chatbot API Key + ansible.builtin.set_fact: + chatbot_api_key: '{{ _generated_chatbot_api_key["resources"][0]["data"]["api_key"] | b64decode }}' + no_log: "{{ no_log }}" diff --git a/roles/chatbot/tasks/main.yml b/roles/chatbot/tasks/main.yml index f3d15fcf..90a41d83 100644 --- a/roles/chatbot/tasks/main.yml +++ b/roles/chatbot/tasks/main.yml @@ -14,6 +14,9 @@ - name: Read AnsibleAIConnect's Chatbot secret ansible.builtin.include_tasks: read_chatbot_configuration_secret.yml + - name: Read AnsibleAIConnect's Chatbot secret + ansible.builtin.include_tasks: handle_chatbot_api_key_secret.yml + - name: Clean up old Chatbot PVC before upgrade ansible.builtin.include_tasks: upgrade_chatbot.yml diff --git a/roles/chatbot/templates/chatbot.configmap_lightspeed_stack_config.yaml.j2 b/roles/chatbot/templates/chatbot.configmap_lightspeed_stack_config.yaml.j2 index 7fe16eff..03165b31 100644 --- a/roles/chatbot/templates/chatbot.configmap_lightspeed_stack_config.yaml.j2 +++ b/roles/chatbot/templates/chatbot.configmap_lightspeed_stack_config.yaml.j2 @@ -31,6 +31,10 @@ data: transcripts_enabled: false customization: system_prompt_path: /.llama/distributions/ansible-chatbot/system-prompts/default.txt + authentication: + module: "api-key-token" + api_key_config: + api_key: ${env.CHATBOT_API_KEY} {% if _aap_gateway_url is defined or _aap_controller_url is defined %} mcp_servers: {% if _aap_gateway_url is defined and _aap_controller_url is defined %} diff --git a/roles/chatbot/templates/chatbot.deployment.yaml.j2 b/roles/chatbot/templates/chatbot.deployment.yaml.j2 index 6aaa2fbb..5dfe2f87 100644 --- a/roles/chatbot/templates/chatbot.deployment.yaml.j2 +++ b/roles/chatbot/templates/chatbot.deployment.yaml.j2 @@ -106,6 +106,8 @@ spec: value: /.llama/data - name: EMBEDDING_MODEL value: ./embeddings_model + - name: CHATBOT_API_KEY + value: {{ chatbot_api_key }} - name: PROVIDER_TOKEN value: {{ chatbot_token }} - name: PROVIDER_URL diff --git a/roles/chatbot/templates/secrets/chatbot_api_key_secret.yaml.j2 b/roles/chatbot/templates/secrets/chatbot_api_key_secret.yaml.j2 new file mode 100644 index 00000000..ad0e9a3f --- /dev/null +++ b/roles/chatbot/templates/secrets/chatbot_api_key_secret.yaml.j2 @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: '{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}' + namespace: '{{ ansible_operator_meta.namespace }}' + labels: + app.kubernetes.io/name: '{{ ansible_operator_meta.name }}' + app.kubernetes.io/part-of: '{{ ansible_operator_meta.name }}' + app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' + app.kubernetes.io/component: '{{ deployment_type }}' + app.kubernetes.io/operator-version: '{{ lookup("env", "OPERATOR_VERSION") }}' +stringData: + api_key: '{{ lookup('password', '/dev/null length=32 chars=ascii_letters,digits') }}' diff --git a/roles/model/defaults/main.yml b/roles/model/defaults/main.yml index e2d77e77..2c71d7e7 100644 --- a/roles/model/defaults/main.yml +++ b/roles/model/defaults/main.yml @@ -49,6 +49,11 @@ auth_config_secret_name: '' model_config_secret_name: '' # ======================================== +# ---------------------------------------- +# Configuration for the Chatbot API Key +# ---------------------------------------- +chatbot_api_key_secret_name: 'chatbot-api-key' +# ======================================== # ---------------------------------------- # Configuration for underlying service diff --git a/roles/model/tasks/update_status.yml b/roles/model/tasks/update_status.yml index eaea819b..a60cad0a 100644 --- a/roles/model/tasks/update_status.yml +++ b/roles/model/tasks/update_status.yml @@ -18,6 +18,7 @@ chatbotImage: "" chatbotVersion: "" chatbotConfigurationSecret: "" + chatbotAuthenticationSecret: "" # ============================================ # Retrieve and update AnsibleAIConnect status @@ -102,6 +103,7 @@ chatbotImage: "{{ _chatbot_image }}" chatbotVersion: "{{ chatbot_instance_version.stdout | trim }}" chatbotConfigurationSecret: "{{ chatbot_config_secret_name }}" + chatbotAuthenticationSecret: "{{ chatbot_api_key_secret_name }}" when: - chatbot_api_pod_name is defined - chatbot_api_pod_name | length diff --git a/roles/model/templates/model.deployment.yaml.j2 b/roles/model/templates/model.deployment.yaml.j2 index 7805a72a..da04c01e 100644 --- a/roles/model/templates/model.deployment.yaml.j2 +++ b/roles/model/templates/model.deployment.yaml.j2 @@ -204,6 +204,11 @@ spec: secretKeyRef: name: "{{ __model_pipeline_secret_name }}" key: config + - name: CHATBOT_API_KEY + valueFrom: + secretKeyRef: + name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" + key: api_key {% if chatbot_config is defined %} - name: CHATBOT_DEFAULT_PROVIDER value: {{ chatbot_llm_provider_type }} From f97444513464b10be0bead00ac3f2ff083548767 Mon Sep 17 00:00:00 2001 From: romartin Date: Tue, 23 Dec 2025 19:46:19 +0100 Subject: [PATCH 2/8] Test --- roles/chatbot/tasks/main.yml | 4 ++-- roles/chatbot/templates/chatbot.deployment.yaml.j2 | 3 ++- roles/model/templates/model.deployment.yaml.j2 | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/roles/chatbot/tasks/main.yml b/roles/chatbot/tasks/main.yml index 90a41d83..6758e5cc 100644 --- a/roles/chatbot/tasks/main.yml +++ b/roles/chatbot/tasks/main.yml @@ -14,8 +14,8 @@ - name: Read AnsibleAIConnect's Chatbot secret ansible.builtin.include_tasks: read_chatbot_configuration_secret.yml - - name: Read AnsibleAIConnect's Chatbot secret - ansible.builtin.include_tasks: handle_chatbot_api_key_secret.yml +# - name: Read AnsibleAIConnect's Chatbot API Key +# ansible.builtin.include_tasks: handle_chatbot_api_key_secret.yml - name: Clean up old Chatbot PVC before upgrade ansible.builtin.include_tasks: upgrade_chatbot.yml diff --git a/roles/chatbot/templates/chatbot.deployment.yaml.j2 b/roles/chatbot/templates/chatbot.deployment.yaml.j2 index 5dfe2f87..7b95faf9 100644 --- a/roles/chatbot/templates/chatbot.deployment.yaml.j2 +++ b/roles/chatbot/templates/chatbot.deployment.yaml.j2 @@ -107,7 +107,8 @@ spec: - name: EMBEDDING_MODEL value: ./embeddings_model - name: CHATBOT_API_KEY - value: {{ chatbot_api_key }} + #value: {{ chatbot_api_key }} + value: 'test-api-key-1' - name: PROVIDER_TOKEN value: {{ chatbot_token }} - name: PROVIDER_URL diff --git a/roles/model/templates/model.deployment.yaml.j2 b/roles/model/templates/model.deployment.yaml.j2 index da04c01e..76e22940 100644 --- a/roles/model/templates/model.deployment.yaml.j2 +++ b/roles/model/templates/model.deployment.yaml.j2 @@ -205,10 +205,11 @@ spec: name: "{{ __model_pipeline_secret_name }}" key: config - name: CHATBOT_API_KEY - valueFrom: - secretKeyRef: - name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" - key: api_key + value: "test-api-key-1" +{# valueFrom:#} +{# secretKeyRef:#} +{# name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}"#} +{# key: api_key#} {% if chatbot_config is defined %} - name: CHATBOT_DEFAULT_PROVIDER value: {{ chatbot_llm_provider_type }} From 900fc77423eea38f368a2ed3b6a61c8c22180ed2 Mon Sep 17 00:00:00 2001 From: romartin Date: Tue, 23 Dec 2025 20:04:22 +0100 Subject: [PATCH 3/8] Test 1 --- roles/chatbot/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/chatbot/tasks/main.yml b/roles/chatbot/tasks/main.yml index 6758e5cc..ff264ef1 100644 --- a/roles/chatbot/tasks/main.yml +++ b/roles/chatbot/tasks/main.yml @@ -14,8 +14,8 @@ - name: Read AnsibleAIConnect's Chatbot secret ansible.builtin.include_tasks: read_chatbot_configuration_secret.yml -# - name: Read AnsibleAIConnect's Chatbot API Key -# ansible.builtin.include_tasks: handle_chatbot_api_key_secret.yml + - name: Read AnsibleAIConnect's Chatbot API Key + ansible.builtin.include_tasks: handle_chatbot_api_key_secret.yml - name: Clean up old Chatbot PVC before upgrade ansible.builtin.include_tasks: upgrade_chatbot.yml From e716401ca5a656ddf36511562516f162df1032df Mon Sep 17 00:00:00 2001 From: romartin Date: Tue, 23 Dec 2025 20:29:37 +0100 Subject: [PATCH 4/8] Test 2 --- roles/chatbot/tasks/handle_chatbot_api_key_secret.yml | 11 +++++++++-- roles/chatbot/templates/chatbot.deployment.yaml.j2 | 6 +++++- roles/model/templates/model.deployment.yaml.j2 | 10 +++++----- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml index 00a41a67..e6131499 100644 --- a/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml +++ b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml @@ -1,11 +1,18 @@ --- +#- name: Check for existing Chatbot API Key Secret +# kubernetes.core.k8s_info: +# kind: Secret +# namespace: '{{ ansible_operator_meta.namespace }}' +# name: '{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}' +# register: _existing_chatbot_api_key +# no_log: "{{ no_log }}" + - name: Create Chatbot API Key Secret kubernetes.core.k8s: - apply: true state: present - force: false definition: "{{ lookup('template', 'secrets/chatbot_api_key_secret.yaml.j2') }}" no_log: "{{ no_log }}" +# when: _existing_chatbot_api_key is defined - name: Read Chatbot API Key kubernetes.core.k8s_info: diff --git a/roles/chatbot/templates/chatbot.deployment.yaml.j2 b/roles/chatbot/templates/chatbot.deployment.yaml.j2 index 7b95faf9..a3a32cce 100644 --- a/roles/chatbot/templates/chatbot.deployment.yaml.j2 +++ b/roles/chatbot/templates/chatbot.deployment.yaml.j2 @@ -108,7 +108,11 @@ spec: value: ./embeddings_model - name: CHATBOT_API_KEY #value: {{ chatbot_api_key }} - value: 'test-api-key-1' + #value: 'test-api-key-1' + valueFrom: + secretKeyRef: + name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" + key: api_key - name: PROVIDER_TOKEN value: {{ chatbot_token }} - name: PROVIDER_URL diff --git a/roles/model/templates/model.deployment.yaml.j2 b/roles/model/templates/model.deployment.yaml.j2 index 76e22940..52a53283 100644 --- a/roles/model/templates/model.deployment.yaml.j2 +++ b/roles/model/templates/model.deployment.yaml.j2 @@ -205,11 +205,11 @@ spec: name: "{{ __model_pipeline_secret_name }}" key: config - name: CHATBOT_API_KEY - value: "test-api-key-1" -{# valueFrom:#} -{# secretKeyRef:#} -{# name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}"#} -{# key: api_key#} + #value: "test-api-key-1" + valueFrom: + secretKeyRef: + name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" + key: api_key {% if chatbot_config is defined %} - name: CHATBOT_DEFAULT_PROVIDER value: {{ chatbot_llm_provider_type }} From e0b5443f55d9e796f72adf5edbbb998c28840575 Mon Sep 17 00:00:00 2001 From: romartin Date: Tue, 23 Dec 2025 20:53:46 +0100 Subject: [PATCH 5/8] Test 3 --- roles/chatbot/templates/chatbot.deployment.yaml.j2 | 10 +++++----- roles/model/templates/model.deployment.yaml.j2 | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/chatbot/templates/chatbot.deployment.yaml.j2 b/roles/chatbot/templates/chatbot.deployment.yaml.j2 index a3a32cce..67b3b70f 100644 --- a/roles/chatbot/templates/chatbot.deployment.yaml.j2 +++ b/roles/chatbot/templates/chatbot.deployment.yaml.j2 @@ -108,11 +108,11 @@ spec: value: ./embeddings_model - name: CHATBOT_API_KEY #value: {{ chatbot_api_key }} - #value: 'test-api-key-1' - valueFrom: - secretKeyRef: - name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" - key: api_key + value: 'test-api-key-1' +{# valueFrom:#} +{# secretKeyRef:#} +{# name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}"#} +{# key: api_key#} - name: PROVIDER_TOKEN value: {{ chatbot_token }} - name: PROVIDER_URL diff --git a/roles/model/templates/model.deployment.yaml.j2 b/roles/model/templates/model.deployment.yaml.j2 index 52a53283..76e22940 100644 --- a/roles/model/templates/model.deployment.yaml.j2 +++ b/roles/model/templates/model.deployment.yaml.j2 @@ -205,11 +205,11 @@ spec: name: "{{ __model_pipeline_secret_name }}" key: config - name: CHATBOT_API_KEY - #value: "test-api-key-1" - valueFrom: - secretKeyRef: - name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" - key: api_key + value: "test-api-key-1" +{# valueFrom:#} +{# secretKeyRef:#} +{# name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}"#} +{# key: api_key#} {% if chatbot_config is defined %} - name: CHATBOT_DEFAULT_PROVIDER value: {{ chatbot_llm_provider_type }} From e73773631c2576ee56a91af5c1f650971c8cc452 Mon Sep 17 00:00:00 2001 From: romartin Date: Tue, 23 Dec 2025 21:12:02 +0100 Subject: [PATCH 6/8] Test 4 --- roles/chatbot/templates/chatbot.deployment.yaml.j2 | 4 ++-- roles/model/templates/model.deployment.yaml.j2 | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/chatbot/templates/chatbot.deployment.yaml.j2 b/roles/chatbot/templates/chatbot.deployment.yaml.j2 index 67b3b70f..4fbb9b30 100644 --- a/roles/chatbot/templates/chatbot.deployment.yaml.j2 +++ b/roles/chatbot/templates/chatbot.deployment.yaml.j2 @@ -107,8 +107,8 @@ spec: - name: EMBEDDING_MODEL value: ./embeddings_model - name: CHATBOT_API_KEY - #value: {{ chatbot_api_key }} - value: 'test-api-key-1' + value: {{ chatbot_api_key }} +{# value: 'test-api-key-1'#} {# valueFrom:#} {# secretKeyRef:#} {# name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}"#} diff --git a/roles/model/templates/model.deployment.yaml.j2 b/roles/model/templates/model.deployment.yaml.j2 index 76e22940..abe40f43 100644 --- a/roles/model/templates/model.deployment.yaml.j2 +++ b/roles/model/templates/model.deployment.yaml.j2 @@ -205,11 +205,11 @@ spec: name: "{{ __model_pipeline_secret_name }}" key: config - name: CHATBOT_API_KEY - value: "test-api-key-1" -{# valueFrom:#} -{# secretKeyRef:#} -{# name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}"#} -{# key: api_key#} +{# value: "test-api-key-1"#} + valueFrom: + secretKeyRef: + name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" + key: api_key {% if chatbot_config is defined %} - name: CHATBOT_DEFAULT_PROVIDER value: {{ chatbot_llm_provider_type }} From 93cc8d4197ed92e364632da82890402a808a1339 Mon Sep 17 00:00:00 2001 From: romartin Date: Tue, 23 Dec 2025 21:36:30 +0100 Subject: [PATCH 7/8] Test 5 --- .../tasks/handle_chatbot_api_key_secret.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml index e6131499..a4900811 100644 --- a/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml +++ b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml @@ -1,18 +1,18 @@ --- -#- name: Check for existing Chatbot API Key Secret -# kubernetes.core.k8s_info: -# kind: Secret -# namespace: '{{ ansible_operator_meta.namespace }}' -# name: '{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}' -# register: _existing_chatbot_api_key -# no_log: "{{ no_log }}" +- name: Check for existing Chatbot API Key Secret + kubernetes.core.k8s_info: + kind: Secret + namespace: '{{ ansible_operator_meta.namespace }}' + name: '{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}' + register: _existing_chatbot_api_key + no_log: "{{ no_log }}" - name: Create Chatbot API Key Secret kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'secrets/chatbot_api_key_secret.yaml.j2') }}" no_log: "{{ no_log }}" -# when: _existing_chatbot_api_key is defined + when: _existing_chatbot_api_key is defined - name: Read Chatbot API Key kubernetes.core.k8s_info: From 121f3db0a77ba383eccb91f70eb24f6a9727a395 Mon Sep 17 00:00:00 2001 From: romartin Date: Wed, 24 Dec 2025 00:04:02 +0100 Subject: [PATCH 8/8] Test 6 --- .../tasks/handle_chatbot_api_key_secret.yml | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml index a4900811..cba8a4b4 100644 --- a/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml +++ b/roles/chatbot/tasks/handle_chatbot_api_key_secret.yml @@ -1,28 +1,33 @@ --- +- name: Set the composed Chatbot API Key Secret name. + set_fact: + _chatbot_api_key_secret_name: "{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}" + - name: Check for existing Chatbot API Key Secret - kubernetes.core.k8s_info: - kind: Secret - namespace: '{{ ansible_operator_meta.namespace }}' - name: '{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}' - register: _existing_chatbot_api_key - no_log: "{{ no_log }}" + set_fact: + _chatbot_api_key_secret: "{{ query('kubernetes.core.k8s', kind='Secret', namespace=ansible_operator_meta.namespace, resource_name=_chatbot_api_key_secret_name) }}" - name: Create Chatbot API Key Secret kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'secrets/chatbot_api_key_secret.yaml.j2') }}" no_log: "{{ no_log }}" - when: _existing_chatbot_api_key is defined + when: + - _chatbot_api_key_secret | length == 0 - name: Read Chatbot API Key kubernetes.core.k8s_info: kind: Secret namespace: '{{ ansible_operator_meta.namespace }}' - name: '{{ ansible_operator_meta.name }}-{{ chatbot_api_key_secret_name }}' + name: '{{ _chatbot_api_key_secret_name }}' register: _generated_chatbot_api_key no_log: "{{ no_log }}" + when: + - _chatbot_api_key_secret | length == 0 - name: Set Chatbot API Key ansible.builtin.set_fact: chatbot_api_key: '{{ _generated_chatbot_api_key["resources"][0]["data"]["api_key"] | b64decode }}' no_log: "{{ no_log }}" + when: + - _chatbot_api_key_secret | length == 0