Checkpoint: auth, engine, seal, server, grpc updates
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user