Skip to content

Commit

Permalink
added logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Facchetti committed Jul 4, 2023
1 parent c9f7490 commit a5808b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/portal/middleware/intAAD.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ func (a IntAAD) AAD(h http.Handler) http.Handler {
case IntUsernameKey:
userInfo := userinfo{}
json.Unmarshal([]byte(v.Value), &userInfo)
a.log.Infof("username is %s", userInfo.Username)
a.log.Infof("groups are %s", userInfo.Groups)
if string(userInfo.Password) != string(a.sessionKey) {
a.log.Debug("password did not match")
h.ServeHTTP(w, r)
Expand Down
2 changes: 1 addition & 1 deletion pkg/portal/portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (p *portal) setupRouter(kconfig *kubeconfig.Kubeconfig, prom *prometheus.Pr
// we get the env var from within the function because it is not meant to be configurable
disableOauthOption := os.Getenv("DISABLE_OAUTH")
if disableOauthOption == "true" || env.IsLocalDevelopmentMode() || env.IsCI() {
p.aad, err = middleware.NewIntAAD(p.sessionKey, p.log)
p.aad, err = middleware.NewIntAAD(p.sessionKey, p.audit)
} else {
p.aad, err = middleware.NewAAD(p.log, p.audit, p.env, p.baseAccessLog, p.hostname, p.sessionKey, p.clientID, p.clientKey, p.clientCerts, allGroups,
p.verifier)
Expand Down

0 comments on commit a5808b7

Please sign in to comment.