Secrets in Vault: env: and vault: references wherever a secret file is named, and the store's own secrets sealed under a master key — Vault transit or a local key
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
bce54f0941
commit
35657c1417
20 files changed
+837
-14
No files matched your search
@@ -48,6 +48,7 @@ import (
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/obs"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/promq"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/router"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/secrets"
|
||||
storepkg "gitea.mynodes.xyz/ilker/llmgw/internal/store"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/tlsconf"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/version"
|
||||
@@ -120,6 +121,15 @@ func newServerCmd() *cobra.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// The store's own secrets sealed under a key kept outside it,
|
||||
// before anything reads them.
|
||||
if st := rt.Store(); st != nil && cfg.Secrets.MasterKey != "" {
|
||||
sealer, err := secrets.NewSealer(cmd.Context(), cfg.Secrets.MasterKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
st.SetSealer(sealer)
|
||||
}
|
||||
// The longest any key may live, where every way of making one
|
||||
// reads it: the store.
|
||||
if st := rt.Store(); st != nil {
|
||||
|
||||
Reference in new issue
Block a user