Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit de619d8

Browse files
committed
Use correct log.Infof format for webhook sink audit output and fix var
naming Signed-off-by: JoshVanL <[email protected]>
1 parent 318a9c4 commit de619d8

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

cmd/app/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func buildRunCommand(stopCh <-chan struct{}, opts *options.Options) *cobra.Comma
7272
return err
7373
}
7474

75-
proxyOptions := &proxy.Config{
75+
proxyConfig := &proxy.Config{
7676
TokenReview: opts.App.TokenPassthrough.Enabled,
7777
DisableImpersonation: opts.App.DisableImpersonation,
7878

@@ -85,7 +85,7 @@ func buildRunCommand(stopCh <-chan struct{}, opts *options.Options) *cobra.Comma
8585

8686
// Initialise proxy with OIDC token authenticator
8787
p, err := proxy.New(restConfig, opts.OIDCAuthentication, opts.Audit,
88-
tokenReviewer, secureServingInfo, proxyOptions)
88+
tokenReviewer, secureServingInfo, proxyConfig)
8989
if err != nil {
9090
return err
9191
}

pkg/proxy/handlers.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ func (p *Proxy) newErrorHandler() func(rw http.ResponseWriter, r *http.Request,
181181

182182
// Failed auth
183183
case errUnauthorized:
184-
klog.V(2).Infof("unauthenticated user request %s", r.RemoteAddr)
185184
// If Unauthorized then error and report to audit
186185
unauthedHandler.ServeHTTP(rw, r)
187186
return

test/tools/audit-webhook/pkg/sink/sink.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (s *Sink) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
9393
http.Error(rw, err.Error(), http.StatusBadRequest)
9494
return
9595
}
96-
log.Infof("%s: got events: %s", r.RemoteAddr, events)
96+
log.Infof("%s: got events: %v", r.RemoteAddr, events)
9797

9898
s.mu.Lock()
9999
defer s.mu.Unlock()

0 commit comments

Comments
 (0)