Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67113

Excessive SEVERE error logging in basic permission checks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • github-oauth-plugin
    • None

      We have found a large amount of logs (millions of lines per day) being generated by this plugin, caused by this code:

      https://github.com/jenkinsci/github-oauth-plugin/blob/0c673863922335cbfe3ba007931793f4cf65d5cc/src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java#L547-L552

      It seems like incorrect error handling - I would expect this function to quietly return `false` as part of the hasPermission check, rather than log a `SEVERE` exception with stack trace.

      The `WARNING` on the next line, indicates that the Jenkins user may simply not have access to the repo (e.g it is private and they only have the `public_repo` oauth scope).

      I believe that this is generated when a user visits the main page of Jenkins, and their browser renders the list of active builds (on the left). Each of those are wrapped in a `hasPermission` condition, so if there are any private repos being built, the server will generate SEVERE logs.

            sag47 Sam Gleske
            scurvy Andreas Nygard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: