Files
server-26/infra/ansible/vault.yml.example
Logan CusanoandClaude Opus 5.5 bdbde359a1 Weather review fixes: zone-fetch time budget, prod NWS_USER_AGENT (Refs #237)
- Cap one refresh's NWS zone fetches at 15 s wall clock. They run under the
  feed lock, so a hung zone endpoint could otherwise stall every
  /weather/alerts request for minutes; unfinished zones retry next refresh.
- Prod c2-core.env.j2 never set NWS_USER_AGENT, so the VM would have sent the
  contact-less placeholder. Default it to the site URL (overridable via
  vault_nws_user_agent); warn on the .env.example example.com placeholder too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:58:32 -04:00

65 lines
4.3 KiB
Plaintext

# Template for your Ansible Vault secrets file.
# Copy to vault.yml, fill in values, then encrypt:
# ansible-vault encrypt vault.yml
# Edit later with:
# ansible-vault edit vault.yml
# DO NOT put a literal "$" in any value here. Docker compose interpolates the
# top-level .env, and depending on version it also interpolates env_file, so a
# password like "aB$fPx" is read as the variable $fPx and silently replaced
# with an empty string — on one side of the connection but not the other.
# That produced "MQTT connect refused: Not authorized" with no obvious cause.
# Generate with: openssl rand -hex 32 (hex output has no shell metacharacters)
# ── MQTT ─────────────────────────────────────────────────────────────────────
# No more shared node credential (vault_mqtt_node_user/pass) — nodes now
# authenticate as username=<node_id>, password=<their node_keys.api_key>,
# checked by mosquitto's built-in dynamic-security plugin (c2-core
# administers it — see app/internal/dynsec.py). See vault_enrollment_token
# below for how a node gets that key in the first place.
vault_mqtt_c2_user: drb-c2-core
vault_mqtt_c2_pass: "CHANGE_ME"
vault_mqtt_dynsec_admin_pass: "CHANGE_ME" # openssl rand -hex 32 — must be >=12 chars, plugin-enforced minimum
# ── C2 Core ───────────────────────────────────────────────────────────────────
vault_service_key: "" # openssl rand -hex 32 — the Discord bot's key
# The work-session agent's own key for GET/PUT /admin/features. Generate a
# SEPARATE value — never a copy of vault_service_key, or a flag flip cannot be
# attributed to the agent vs the bot (server-26#64).
vault_agent_service_key: "" # openssl rand -hex 32
vault_enrollment_token: "" # openssl rand -hex 32 — fleet-wide, shared by every node's POST /nodes/enroll
vault_openai_api_key: ""
vault_google_maps_api_key: ""
vault_gemini_api_key: ""
vault_gcs_bucket: "your-gcs-bucket-name"
vault_firestore_database: "c2-server"
# ── Gitea Container Registry ──────────────────────────────────────────────────
vault_registry_host: "git.vpn.cusano.net"
vault_registry_user: "logan"
vault_registry_token: "" # Gitea access token, READ-ONLY package scope.
# The VM only pulls (roles/deploy/tasks/main.yml:62-72);
# nothing here pushes. Pushing is CI's job and uses a
# separate write-scoped token (BUILD_TOKEN in Gitea
# repo secrets). Keep them separate: this token sits on
# an internet-facing VM, and a write-scoped one there
# would let an attacker publish a poisoned image that
# every future deploy and edge node would install.
vault_registry: "git.vpn.cusano.net/logan" # full image prefix
# ── Discord Bot ───────────────────────────────────────────────────────────────
vault_discord_token: ""
# ── Frontend (Firebase) ───────────────────────────────────────────────────────
vault_firebase_api_key: ""
vault_firebase_auth_domain: ""
vault_firebase_project_id: ""
vault_firebase_storage_bucket: ""
vault_firebase_messaging_sender_id: ""
vault_firebase_app_id: ""
# No GCP key needed — the VM uses Application Default Credentials via the
# GCE metadata server. Terraform grants the required IAM roles at apply time.
vault_nws_user_agent: "" # optional; e.g. "DRB scanner map (ops@yourdomain)" -- blank/absent uses the site URL