Checkpoint: auth, engine, seal, server, grpc updates

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-03-15 09:54:04 -07:00
parent 33beb33a13
commit 44e5e6e174
21 changed files with 185 additions and 31 deletions

View File

@@ -3,6 +3,8 @@ package main
import (
"context"
"fmt"
"log/slog"
"os"
"syscall"
"github.com/spf13/cobra"
@@ -47,8 +49,9 @@ func runInit(cmd *cobra.Command, args []string) error {
return err
}
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
b := barrier.NewAESGCMBarrier(database)
sealMgr := seal.NewManager(database, b)
sealMgr := seal.NewManager(database, b, logger)
if err := sealMgr.CheckInitialized(); err != nil {
return err
}

View File

@@ -57,7 +57,7 @@ func runServer(cmd *cobra.Command, args []string) error {
}
b := barrier.NewAESGCMBarrier(database)
sealMgr := seal.NewManager(database, b)
sealMgr := seal.NewManager(database, b, logger)
if err := sealMgr.CheckInitialized(); err != nil {
return err
@@ -70,9 +70,9 @@ func runServer(cmd *cobra.Command, args []string) error {
return err
}
authenticator := auth.NewAuthenticator(mcClient)
authenticator := auth.NewAuthenticator(mcClient, logger)
policyEngine := policy.NewEngine(b)
engineRegistry := engine.NewRegistry(b)
engineRegistry := engine.NewRegistry(b, logger)
engineRegistry.RegisterFactory(engine.EngineTypeCA, ca.NewCAEngine)
srv := server.New(cfg, sealMgr, authenticator, policyEngine, engineRegistry, logger, version)