From f403c696de3ab236f097949d8bcb2b453a471038 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Sun, 24 Apr 2022 18:43:38 +0100 Subject: [PATCH] Update options --- pkg/apis/options/authorization.go | 6 +++++- pkg/apis/options/options.go | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/apis/options/authorization.go b/pkg/apis/options/authorization.go index 0f6955a0..e2c7de54 100644 --- a/pkg/apis/options/authorization.go +++ b/pkg/apis/options/authorization.go @@ -30,8 +30,12 @@ type Authorization struct { // AuthorizationRule determines the configuration for a particular authorization // rule. - type AuthorizationRule struct { + // ID is a unique identifier for the authorization rule. Each authorization + // rule is expected to have a unique ID. + // The ID will be used to identify matched rules for audit purposes. + ID string + // Policy is the authorization policy to apply should the rule match the given // request. // All conditions specified within the rule must match the request for the diff --git a/pkg/apis/options/options.go b/pkg/apis/options/options.go index 8641a430..9559e79b 100644 --- a/pkg/apis/options/options.go +++ b/pkg/apis/options/options.go @@ -48,7 +48,8 @@ type Options struct { Server Server `cfg:",internal"` MetricsServer Server `cfg:",internal"` - Providers Providers `cfg:",internal"` + Authorization Authorization `cfg:",internal"` + Providers Providers `cfg:",internal"` SkipAuthRegex []string `flag:"skip-auth-regex" cfg:"skip_auth_regex"` SkipAuthRoutes []string `flag:"skip-auth-route" cfg:"skip_auth_routes"`