fix(ansible): inject AUTOBOT_INTERNAL_API_KEY into SLM and backend process env (#3512)#3513
Merged
mrveiss merged 3 commits intoDev_new_guifrom Apr 5, 2026
Merged
fix(ansible): inject AUTOBOT_INTERNAL_API_KEY into SLM and backend process env (#3512)#3513mrveiss merged 3 commits intoDev_new_guifrom
mrveiss merged 3 commits intoDev_new_guifrom
Conversation
#3512) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
Owner
Author
Code reviewFound 1 issue (now fixed in the same PR):
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
personality_proxy.pyandvoice_proxy.pyin the SLM backend readAUTOBOT_INTERNAL_API_KEYfrom their process environment. When the variable is absent (which it always was), both proxies immediately returned HTTP 503:The main backend's
auth_middleware.pyalso readsAUTOBOT_INTERNAL_API_KEY— the same gap meant the internal-key auth path could never succeed.The Ansible role already defined
autobot_internal_api_keyindefaults/main.ymland wrote it into the nginx config (autobot-slm.conf.j2) for theX-Internal-API-Keyproxy header, but it was never written into theEnvironmentFiletemplates that systemd loads for the actual Python processes.What was fixed
Added
AUTOBOT_INTERNAL_API_KEY={{ autobot_internal_api_key }}to bothEnvironmentFiletemplates so the variable is available in the process environment at runtime. Updated the comment indefaults/main.ymlto make clear that setting this variable is required for personality and voice proxies to function.Files changed
autobot-slm-backend/ansible/roles/slm_manager/templates/slm-secrets.env.j2— addedAUTOBOT_INTERNAL_API_KEYafterSLM_ADMIN_PASSWORDautobot-slm-backend/ansible/roles/backend/templates/backend.env.j2— addedAUTOBOT_INTERNAL_API_KEYin the Security section afterCORS_ORIGINSautobot-slm-backend/ansible/roles/slm_manager/defaults/main.yml— updated comment to state the variable is REQUIRED for personality/voice proxies and is now injected into process environmentsOperators must set
autobot_internal_api_keyto a non-empty secret in their Ansible inventory or vault; the default of""disables the feature (proxies will still 503 unless a value is provided).Closes #3512