Wire accessreview.Service into server and probod

Add AccessReview field to server.Config and api.Config,
pass through to console and MCP NewMux. Create the
service in probod and run its background workers.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-04-02 11:52:05 +02:00
parent a4bf885952
commit 244b6390cb
3 changed files with 27 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ import (
"github.com/go-chi/cors"
"go.gearno.de/kit/httpserver"
"go.gearno.de/kit/log"
"go.probo.inc/probo/pkg/accessreview"
"go.probo.inc/probo/pkg/baseurl"
"go.probo.inc/probo/pkg/connector"
"go.probo.inc/probo/pkg/esign"
@@ -52,6 +53,7 @@ type (
IAM *iam.Service
Trust *trust.Service
ESign *esign.Service
AccessReview *accessreview.Service
Slack *slack.Service
Mailman *mailman.Service
Cookie securecookie.Config
@@ -161,6 +163,7 @@ func NewServer(cfg Config) (*Server, error) {
cfg.Probo,
cfg.IAM,
cfg.ESign,
cfg.AccessReview,
cfg.Mailman,
cfg.Cookie,
cfg.TokenSecret,
@@ -176,6 +179,7 @@ func NewServer(cfg Config) (*Server, error) {
cfg.Logger.Named("mcp.v1"),
cfg.Probo,
cfg.IAM,
cfg.AccessReview,
cfg.TokenSecret,
),
slackHandler: slack_v1.NewMux(

View File

@@ -24,6 +24,7 @@ import (
"go.gearno.de/kit/httpserver"
"go.gearno.de/kit/log"
"go.gearno.de/x/ref"
"go.probo.inc/probo/pkg/accessreview"
"go.probo.inc/probo/pkg/baseurl"
"go.probo.inc/probo/pkg/connector"
"go.probo.inc/probo/pkg/esign"
@@ -50,6 +51,7 @@ type Config struct {
IAM *iam.Service
Trust *trust.Service
ESign *esign.Service
AccessReview *accessreview.Service
Slack *slack.Service
Mailman *mailman.Service
Cookie securecookie.Config
@@ -80,6 +82,7 @@ func NewServer(cfg Config) (*Server, error) {
IAM: cfg.IAM,
Trust: cfg.Trust,
ESign: cfg.ESign,
AccessReview: cfg.AccessReview,
Slack: cfg.Slack,
Mailman: cfg.Mailman,
Cookie: cfg.Cookie,