docs: secure secret handling for server API key — keys.env pattern#26
Merged
Conversation
added 4 commits
May 28, 2026 13:02
- Rewrote 'Enable server forwarding' section in README.md with two secure patterns:
* Option A: Use AMPLIFIER_CONTEXT_INTELLIGENCE_API_KEY in keys.env (default behavior)
* Option B: Custom key name in keys.env + interpolated in settings.yaml with ${CUSTOM_VAR}
- Added explicit callout: settings.yaml with ${...} references is safe to commit; literal secrets are not
- Updated 'Finding connection parameters' section in context-intelligence-awareness.md:
* Removed fallback to bundle config YAML
* Documented correct pattern: secrets live in keys.env only
* Explained both default and custom key name patterns
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
Fixes a documentation error where the README and agent context file showed
context_intelligence_api_keyas a literal value insettings.yaml— thesame insecure pattern that LLM providers explicitly avoid.
Changes
README.md
instruction: add
AMPLIFIER_CONTEXT_INTELLIGENCE_SERVER_URLandAMPLIFIER_CONTEXT_INTELLIGENCE_API_KEYto~/.amplifier/keys.env. Thebehavior YAML already resolves these placeholders automatically; no
settings.yamlentry is required.settings.yamloverride mechanism for users who load the bundle throughthe app-cli and need to pass configuration overrides. Shows both the
default-name case and the custom key name case (e.g.
CONTEXT_INTELLIGENCE_TEAM_SERVER_API_KEY) with${...}interpolation.Secrets never appear as literals;
settings.yamlstays committable.context/context-intelligence-awareness.md
which env vars drive the upload tool and that they come from
keys.env.Removed all
settings.yamland app-cli references — this file is loadedinto agent context and has no business knowing about configuration
plumbing.
Validation
All documented patterns were validated in an isolated DTU (Ubuntu 24.04)
running the real
ConfigResolverfrom the module:AMPLIFIER_CONTEXT_INTELLIGENCE_API_KEYin env → resolved at priority 3${...}override → arrives as config dict at priority 1settings.yaml→ lowest priority, silently shadowed by env var