Skip to content

Conversation

@fsul7o
Copy link
Contributor

@fsul7o fsul7o commented Jul 31, 2025

Description

The log output was being output at the info level, even though the log output was related to Error, so this has been corrected to the Warn level.

2025-07-29 08:08:42     [INFO]: initAuthorizers: added access token authorizer having param: {enable:true verifyCertThumbprint:false certBackdateDur: certOffsetDur: verifyClientID:false authorizedClientIDs:map[]}
2025-07-29 08:08:42     [INFO]: Fetching JWK Set
2025-07-29 08:08:42     [INFO]: Updating athenz pubkey
2025-07-29 08:08:42     [INFO]: Updating ZMS athenz pubkey
2025-07-29 08:08:42     [INFO]: Fetching public key entries
2025-07-29 08:08:42     [INFO]: Updating ZTS athenz pubkey
2025-07-29 08:08:42     [INFO]: Fetching public key entries
2025-07-29 08:08:42     [INFO]: Fetch public key entries success
2025-07-29 08:08:42     [INFO]: Update ZMS athenz pubkey success
2025-07-29 08:08:42     [INFO]: Fetch public key entries success
2025-07-29 08:08:42     [INFO]: Update ZTS athenz pubkey success
2025-07-29 08:08:42     [INFO]: [1753776522] will update policy
2025-07-29 08:08:42     [INFO]: will fetch policy for domain: user.fsul7o.sandbox
2025-07-29 08:08:42     [INFO]: Fetch JWK Set success
2025-07-29 08:08:42     [INFO]: [1753776522] update policy done
2025-07-29 08:08:42     [INFO]: Starting pubkey updater
2025-07-29 08:08:42     [INFO]: Starting policyd updater
2025-07-29 08:08:42     [INFO]: Starting jwk updater
2025-07-29 08:08:42     [INFO]: authorization proxy api server starting
2025-07-29 08:08:42     [INFO]: authorization proxy health check server starting
2025-07-29 08:08:42     [INFO]: authorization proxy metrics server starting
2025-07-29 08:08:44     [INFO]: error parse and validate access token, err: token contains an invalid number of segments

Type of change

  • Bug fix
  • New feature
  • Refactoring (no functional changes, no api changes)
  • Non-code changes (update documentation, pipeline, etc.)

Flags

  • Breaks backward compatibility
  • Requires a documentation update
  • Has untestable code

Related issue/PR

Delete this section if there are no issues or pull requests that relate to this pull request.

  • Fixes #issue
  • Closes #PR

Checklist

  • Followed the guidelines in the CONTRIBUTING document
  • Added prefix [skip ci]/[ci skip]/[no ci]/[skip actions]/[actions skip] in the PR title if necessary
  • Tested and linted the code
  • Commented the code
  • Made corresponding changes to the documentation
  • Passed all pipeline checking

Checklist for maintainer

  • Use Squash and merge
  • Double-confirm the merge message has prefix [skip ci]/[ci skip]/[no ci]/[skip actions]/[actions skip]
  • Delete the branch after merge

Signed-off-by: fsul7o <75571344+fsul7o@users.noreply.github.com>
Copy link

@mlajkim mlajkim left a comment

Choose a reason for hiding this comment

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

lgtm

@mlajkim mlajkim requested a review from Copilot July 31, 2025 04:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the log level from Info to Warn for token authorization errors to improve log output clarity. When authorization fails due to token parsing, validation, or policy check errors, these should be logged as warnings rather than informational messages since they represent error conditions.

  • Changed log level from glg.Infof to glg.Warnf for four authorization error scenarios
  • Affects role token parsing errors, access token parsing errors, translation errors, and policy check errors
  • Improves log categorization by treating authorization failures as warnings rather than informational messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants