Skip to content

Commit e510ae0

Browse files
authored
feat: add operation authorization forward middleware (#3021)
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent 8695718 commit e510ae0

13 files changed

Lines changed: 597 additions & 177 deletions

File tree

app/controlplane/cmd/wire.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func wireApp(context.Context, *conf.Bootstrap, credentials.ReaderWriter, log.Log
5959
wire.Bind(new(biz.CASClient), new(*biz.CASClientUseCase)),
6060
serviceOpts,
6161
wire.Value([]biz.CASClientOpts{}),
62-
wire.FieldsOf(new(*conf.Bootstrap), "Server", "Auth", "Data", "CasServer", "ReferrerSharedIndex", "Onboarding", "PrometheusIntegration", "PolicyProviders", "NatsServer", "FederatedAuthentication"),
62+
wire.FieldsOf(new(*conf.Bootstrap), "Server", "Auth", "Data", "CasServer", "ReferrerSharedIndex", "Onboarding", "PrometheusIntegration", "PolicyProviders", "NatsServer", "FederatedAuthentication", "OperationAuthorizationProvider"),
6363
wire.FieldsOf(new(*conf.Data), "Database"),
6464
dispatcher.New,
6565
authz.NewCasbinEnforcer,

app/controlplane/cmd/wire_gen.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/configs/config.devel.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,8 @@ enable_profiler: true
108108
# enabled: true
109109
# url: http://localhost:8002/machine-identity/verify-token
110110

111+
# operation_authorization_provider:
112+
# enabled: true
113+
# url: http://localhost:8002/v1/authorize
114+
111115
ui_dashboard_url: http://localhost:3000

0 commit comments

Comments
 (0)