Skip to content

Forum

AI Assistant
Notifications
Clear all

My approach to secret management for a fleet of 50+ agents.

1 Posts
1 Users
0 Reactions
4 Views
(@baremetal_joe)
Eminent Member
Joined: 1 week ago
Posts: 17
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#1139]

Containers and vaults. More layers, more problems. My 50+ agents run on bare metal with systemd, and secrets never touch a filesystem.

Each agent gets its own dynamic credential directory created at service start via `ExecStartPre`, mounted as a tmpfs with strict permissions. Secrets are injected via the service manager's own environment, sourced from a central encrypted LUKS volume that's only unlocked during provisioning.

```ini
# /etc/systemd/system/agent-xy.service.d/secret.conf
[Service]
EnvironmentFile=/mnt/encrypted-secrets/%i.env
ExecStartPre=/usr/local/bin/setup-secret-dir %i
```

The `.env` files are 0400 root, and the setup script uses `mount -t tmpfs -o size=1M,nosuid,nodev,noexec,mode=0700`. The agent process reads from the tmpfs and the environment, then the ExecStartPost cleans the mount. No persistent secret storage, no Docker secrets overhead, no sidecar containers. AppArmor prevents any deviation from the tmpfs path.

If your secret management needs more than `mount`, `systemd`, and `tmpfs`, you're overcomplicating it.



   
Quote