summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_authz_builder_test.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2025-02-24 18:49:15 +1100
committerGitHub <noreply@github.com>2025-02-24 18:49:15 +1100
commit05fa254f27e6a1eee89abe8c5512d27de77cd7e7 (patch)
tree8f56e80b855f611000fe142303026f0ed71ef7ed /internal/handlers/handler_authz_builder_test.go
parent194dd221ab7a5f2c9667b967532152df4914226a (diff)
feat(handlers): basic authz caching (#8320)
This adds the ability to cache successful basic authz attempts. This is done via a memory store that uses the HMAC-SHA256 algorithm to perform irreversible comparison of input parameters and has a maximum lifetime. Closes #5006 Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/handlers/handler_authz_builder_test.go')
-rw-r--r--internal/handlers/handler_authz_builder_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/handlers/handler_authz_builder_test.go b/internal/handlers/handler_authz_builder_test.go
index a2d6609e0..fb3e1403c 100644
--- a/internal/handlers/handler_authz_builder_test.go
+++ b/internal/handlers/handler_authz_builder_test.go
@@ -71,7 +71,7 @@ func TestAuthzBuilder_WithEndpointConfig(t *testing.T) {
builder.WithEndpointConfig(schema.ServerEndpointsAuthz{
Implementation: "ExtAuthz",
AuthnStrategies: []schema.ServerEndpointsAuthzAuthnStrategy{
- {Name: "HeaderProxyAuthorization"},
+ {Name: "HeaderProxyAuthorization", SchemeBasicCacheLifespan: time.Hour},
{Name: "CookieSession"},
},
})
@@ -83,7 +83,7 @@ func TestAuthzBuilder_WithEndpointConfig(t *testing.T) {
AuthnStrategies: []schema.ServerEndpointsAuthzAuthnStrategy{
{Name: "HeaderAuthorization"},
{Name: "HeaderProxyAuthorization"},
- {Name: "HeaderAuthRequestProxyAuthorization"},
+ {Name: "HeaderAuthRequestProxyAuthorization", SchemeBasicCacheLifespan: time.Hour},
{Name: "HeaderLegacy"},
{Name: "CookieSession"},
},