Documentation
¶
Overview ¶
Package secret encrypts small at-rest values (VPS passwords and SSH keys) with a machine-local key, so a leaked database does not hand over the credentials it stores.
The key lives in ~/.antares/.secretkey (0600), generated on first use. This protects against a database read alone; someone with the key file and the DB can still decrypt, which is the right trade-off for a single-machine tool — the key never leaves the box and is not in the DB.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SocialAvailable ¶ added in v0.4.0
func SocialAvailable() bool
SocialAvailable reports whether a SocialKey can be loaded right now without generating. It does not fail the process.
func SocialGenerateKey ¶ added in v0.4.0
SocialGenerateKey creates a new 32-byte master key, writes it to the managed env file with 0600 permissions, and returns the raw key for one-time display. If the file already exists and contains a valid key, it is returned without regeneration.
func SocialKeyPath ¶ added in v0.4.0
func SocialKeyPath() string
SocialKeyPath returns the managed env file path.
func SocialReset ¶ added in v0.4.0
func SocialReset()
SocialReset clears the cached key so the next call re-reads from disk/env. Used after onboarding generates a new key.
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box encrypts and decrypts with a single AES-256-GCM key.
func Default ¶
Default returns the process-wide Box keyed from ~/.antares/.secretkey, creating the key on first use. Subsequent calls return the same Box.
type SocialKey ¶ added in v0.4.0
type SocialKey struct {
// contains filtered or unexported fields
}
SocialKey is the master encryption key for Social Media credentials. It is loaded from a managed env file (~/.antares/secrets.env) or the ANTARES_MASTER_KEY environment variable. The key never lives in the database, config YAML, API responses, logs, prompts, RAG, or browser profiles.
func SocialDefault ¶ added in v0.4.0
SocialDefault loads the social master key from the managed env file or the ANTARES_MASTER_KEY environment variable. It does NOT generate one automatically — Social Media encryption is opt-in, not silent.