Skip to content

fix(secret_hex): add secret_hex/secret_payload filters; refactor outline_runtime#11

Merged
baditaflorin merged 2 commits into
mainfrom
claude/affectionate-mcnulty-8c6bd3
May 20, 2026
Merged

fix(secret_hex): add secret_hex/secret_payload filters; refactor outline_runtime#11
baditaflorin merged 2 commits into
mainfrom
claude/affectionate-mcnulty-8c6bd3

Conversation

@baditaflorin
Copy link
Copy Markdown
Owner

Summary

  • scripts/secret_masking_utility.py: add generate_real_secret_hex(service_name, length) — produces srvclaw_hex_<service>_<64hex>, greppable like srvclaw_ family but payload is pure lowercase hex (ADR 0403 hex_32 form)
  • plugins/filter/generate_secret.py: add secret_hex and secret_payload Jinja2 filters; both registered in FilterModule
  • outline_runtime/tasks/main.yml: collapse two-step (openssl shell + manage_service_secrets) into a single manage_service_secrets call using secret_hex; apply secret_payload in set_fact and outline_runtime_secret_payload so SECRET_KEY/UTILS_SECRET env vars receive only the 64-char hex Outline requires

Design

Format Filter Stored in file Used in env var
urlsafe (default) | secret srvclaw_outline_<base64> same
hex (new) | secret_hex srvclaw_hex_outline_<64hex> <64hex> via | secret_payload

Greppable: grep -r srvclaw_hex_ /etc/ catches leaked Outline secrets in the same way grep -r srvclaw_ /etc/ catches urlsafe secrets.

Backward-compatible: existing servers have plain hex files written by openssl rand -hex 32. The write-if-missing guard leaves them unchanged; secret_payload passes through values that don't match the srvclaw_ pattern.

Test plan

  • python3 -c "from secret_masking_utility import generate_real_secret_hex; v=generate_real_secret_hex('outline',32); print(len(v.split('_')[-1]), all(c in '0123456789abcdef' for c in v.split('_')[-1]))"64 True
  • make converge-outline env=production on a clean VM produces Outline env with 64-char hex SECRET_KEY
  • Re-converge on existing VM: write-if-missing guard keeps current hex values; Outline stays running without restart

🤖 Generated with Claude Code

baditaflorin and others added 2 commits May 20, 2026 21:33
Update live_apply_evidence receipts for glitchtip, outline, and excalidraw
to reflect successful 2026-05-20 deployments. Bump repo_version and
platform_version to 0.179.46.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…utline_runtime to use hex filter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@baditaflorin baditaflorin merged commit dcfa13e into main May 20, 2026
0 of 2 checks passed
@baditaflorin baditaflorin deleted the claude/affectionate-mcnulty-8c6bd3 branch May 20, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant