Documentation
¶
Index ¶
- Constants
- func EncryptedPrivateKeyPath(username string) string
- func MarkerJSON(username string) string
- func PublicKeyPath(username string) string
- func RecoverPassphraseFromLocalKey(store storage.Provider, username string, privKey *[32]byte, ...) error
- func RotatePassphrase(store storage.Provider, username, currentPassphrase, newPassphrase string) error
- func VaultRepo(username string) string
Constants ¶
const MarkerPath = ".vaultenv-repo.json"
MarkerPath is the file that marks a repo as a vaultenv personal vault.
const SecretsRepoName = "vaultenv-secrets"
SecretsRepoName is the GitHub repo name for a user's personal vaultenv storage.
Variables ¶
This section is empty.
Functions ¶
func EncryptedPrivateKeyPath ¶
EncryptedPrivateKeyPath is the path to the passphrase-wrapped private key in the personal repo.
func MarkerJSON ¶
MarkerJSON returns the JSON marker written when creating a personal vault.
func PublicKeyPath ¶
PublicKeyPath is the path to the base64-encoded public key in the personal repo.
func RecoverPassphraseFromLocalKey ¶ added in v0.1.4
func RecoverPassphraseFromLocalKey(store storage.Provider, username string, privKey *[32]byte, newPassphrase string) error
RecoverPassphraseFromLocalKey re-encrypts the given raw private key with newPassphrase, uploads keys/<username>.key.enc to the personal vault, and refreshes local key files. It does not read or decrypt the existing .key.enc on GitHub. The local private key must match the public key already stored in the personal repo.
func RotatePassphrase ¶
func RotatePassphrase(store storage.Provider, username, currentPassphrase, newPassphrase string) error
RotatePassphrase decrypts the user's encrypted private key with currentPassphrase, re-encrypts with newPassphrase, uploads it to the personal vault, and refreshes local key files. Fails without writing to GitHub if decryption or validation fails.
Types ¶
This section is empty.