Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions service/authorization/v2/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ func NewRegistration() *serviceregistry.Service[authzV2Connect.AuthorizationServ
}
l.Debug("authorization service config", slog.Any("config", authZCfg.LogValue()))

if authZCfg.AllowDirectEntitlements {
l.Debug("direct entitlements are enabled for authorization service")
}

Comment on lines +85 to +88
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This log statement is redundant because the allow_direct_entitlements configuration is now included in the structured log on line 83, thanks to the changes in service/authorization/v2/config.go. To avoid duplicate log entries and keep the code concise, this block can be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda agree with this - it is in the line above (as config.allow_direct_entitlements). Is there a need to call it out explicitly now?

if !authZCfg.Cache.Enabled {
l.Debug("entitlement policy cache is disabled")
return as, nil
Expand Down Expand Up @@ -110,10 +114,6 @@ func NewRegistration() *serviceregistry.Service[authzV2Connect.AuthorizationServ
// logger.Error("failed to register authorization readiness check", slog.String("error", err.Error()))
// }

if authZCfg.AllowDirectEntitlements {
l.Info("direct entitlements are enabled for authorization service")
}

return as, nil
},
},
Expand Down
1 change: 1 addition & 0 deletions service/authorization/v2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ func (c *Config) LogValue() slog.Value {
slog.String("refresh_interval", c.Cache.RefreshInterval),
),
),
slog.Any("allow_direct_entitlements", c.AllowDirectEntitlements),
)
}
Loading