feat/secrets #111
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: NationTech/harmony#111
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/secrets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request introduces a comprehensive and ergonomic secret management system via a new
harmony-secret
crate.What's Done
New
harmony-secret
Crate:SecretManager::get::<MySecret>()
andSecretManager::set(&my_secret)
.#[derive(Secret)]
procedural macro that automatically uses the struct's name as the secret key, simplifying usage.async SecretStore
trait to support various backend implementations.Two Secret Store Implementations:
LocalFileSecretStore
: A simple file-based store that saves secrets as JSON in the user's data directory. Ideal for local development and testing.InfisicalSecretStore
: A production-ready implementation that integrates with Infisical for centralized, secure secret management.Configuration via Environment Variables:
HARMONY_SECRET_STORE
environment variable (file
orinfisical
).HARMONY_SECRET_INFISICAL_*
variables.What's Not Done (Future Work)
test_harmony_secret_infisical.sh
script serves as a clear example of the required variables.This new secrets module provides a solid and secure foundation for managing credentials for components like OPNsense, Kubernetes, and other infrastructure services going forward. Even with the manual first-time setup for Infisical, this architecture is robust enough to serve our needs for the foreseeable future.
a1e4154da3
to9c5d1bd27f
9c5d1bd27f
to26e8e386b9