summaryrefslogtreecommitdiff
path: root/internal/configuration/validator/server_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/configuration/validator/server_test.go')
-rw-r--r--internal/configuration/validator/server_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/configuration/validator/server_test.go b/internal/configuration/validator/server_test.go
index c4e7b6e62..24c080baa 100644
--- a/internal/configuration/validator/server_test.go
+++ b/internal/configuration/validator/server_test.go
@@ -430,6 +430,15 @@ func TestServerAuthzEndpointErrors(t *testing.T) {
},
},
{
+ "ShouldErrorOnInvalidSchemeOption",
+ map[string]schema.ServerEndpointsAuthz{
+ "example": {Implementation: "ForwardAuth", AuthnStrategies: []schema.ServerEndpointsAuthzAuthnStrategy{{Name: "HeaderAuthorization", SchemeBasicCacheLifespan: time.Minute, Schemes: []string{"bearer"}}}},
+ },
+ []string{
+ "server: endpoints: authz: example: authn_strategies: strategy #1: option 'scheme_basic_cache_lifespan' can't be configured unless the 'basic' scheme is configured but only the 'bearer' schemes are configured",
+ },
+ },
+ {
"ShouldErrorOnInvalidChars",
map[string]schema.ServerEndpointsAuthz{
"/abc": {Implementation: "ForwardAuth"},