Skip to content

Keep the netcup token encrypted; add operator security checklist - #32

Open
byjpr wants to merge 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-8-operator-security
Open

byjpr wants to merge 1 commit into
claude/admiring-planck-25cvzffrom
claude/fix-8-operator-security

Conversation

@byjpr

@byjpr byjpr commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Closes #8

Changes

  • just netcup-login stores the SCP refresh token directly in secrets/secrets.yaml (netcup.scp_refresh_token, encrypted) instead of printing an export line that ends up in shell history. just apply loads it automatically when provider = "netcup"; an explicitly exported NETCUP_SCP_REFRESH_TOKEN still takes precedence.
  • docs/operator-security.md covers the accounts and machine that are the real perimeter:
    • Accounts: 2FA (hardware key preferred) on the provider, registrar (plus transfer lock), DNS, GitHub, the backup bucket provider and the alert mailbox.
    • Your machine:
      • the age key, via age-plugin-yubikey or SOPS_AGE_KEY_CMD with a password manager (sops 3.13 in the dev shell supports both);
      • ed25519-sk SSH keys;
      • least-privilege, per-shell provider API keys;
      • disk encryption.
    • If something leaks: what to rotate for each kind of leak. Re-encrypting is not enough, because old ciphertexts stay in git history.
  • Linked from the README setup section and docs/security.md.

Testing

All 5 provider example systems build. nixfmt, shellcheck and tofu validate pass. The netcup login flow itself needs a netcup account.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B


Generated by Claude Code

just netcup-login now stores the SCP refresh token in secrets/secrets.yaml
instead of printing an export line into terminal history, and just apply
loads it from there. docs/operator-security.md covers the accounts and
machine that are the real perimeter (2FA on provider, registrar, DNS,
GitHub; protecting the age key with a hardware key or SOPS_AGE_KEY_CMD;
hardware-backed SSH keys; least-privilege API keys) and what to rotate
after a leak.

Closes #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
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.

[High] Account and credential hygiene: the real perimeter is undocumented, and the netcup token is printed to the terminal

2 participants