mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-21 07:24:21 +00:00
add config for audit logging, remove Audit() from Logger interface
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
This commit is contained in:
committed by
Joshua Casey
co-authored by
Joshua Casey
parent
76f6b725b8
commit
ced8686d11
@@ -1853,7 +1853,7 @@ func TestCallbackEndpoint(t *testing.T) {
|
||||
jwksProviderIsUnused := jwks.NewDynamicJWKSProvider()
|
||||
oauthHelper := oidc.FositeOauth2Helper(oauthStore, downstreamIssuer, hmacSecretFunc, jwksProviderIsUnused, timeoutsConfiguration, nil)
|
||||
|
||||
logger, log := plog.TestLogger(t)
|
||||
auditLogger, actualAuditLog := plog.TestAuditLogger(t)
|
||||
|
||||
subject := NewHandler(
|
||||
test.idps.BuildFederationDomainIdentityProvidersListerFinder(),
|
||||
@@ -1861,7 +1861,7 @@ func TestCallbackEndpoint(t *testing.T) {
|
||||
happyStateCodec,
|
||||
happyCookieCodec,
|
||||
happyUpstreamRedirectURI,
|
||||
logger,
|
||||
auditLogger,
|
||||
)
|
||||
|
||||
reqContext := context.WithValue(context.Background(), struct{ name string }{name: "test"}, "request-context")
|
||||
@@ -1959,7 +1959,7 @@ func TestCallbackEndpoint(t *testing.T) {
|
||||
if test.wantAuditLogs != nil {
|
||||
wantAuditLogs := test.wantAuditLogs(testutil.GetStateParam(t, test.path), sessionID)
|
||||
testutil.WantAuditIDOnEveryAuditLog(wantAuditLogs, "fake-audit-id")
|
||||
testutil.CompareAuditLogs(t, wantAuditLogs, log.String())
|
||||
testutil.CompareAuditLogs(t, wantAuditLogs, actualAuditLog.String())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user