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

AvatarCache does not support authenticated scm access

    XMLWordPrintable

Details

    • scm-api 2.6.4

    Description

      PR Provided: https://github.com/jenkinsci/scm-api-plugin/pull/79

      Not sure if this is a bug, request for feature or just need for education but either way I am hoping you can help...

      I was troubleshooting a plugin based on scm-api-plugin (bitbucket-branch-source-plugin) and discovered something odd. The plugin uses AvatarCache to manage "Org" images, but that was not working. Upon digging into it, I discovered that since our SCM requires authentication, the image URL requires authentication too. But as far as I can see, AvatarCache does not have any support for getting urls with authentication. So my questions are:

      1. Am I seeing this correct? Or am I missing something?
      2. Was this intentional or an oversight? I am guessing most SCM repos that are not OSS projects will require authentication, so how can this work for most SCMs?
      3. Is the expectation for those plugins that use authenticated access to SCM to not use AvatarCache, but to implement it internally? Or is there another mechanism in scm-api-plugin?
      4. Assuming the answer is that each plugin must implement its own avatar handling, are there recommended approaches/patterns for those of us not familiar with Jenkins internals?

      Thank you so much

       

      Attachments

        Issue Links

          Activity

            I have submitted a PR for partial resolution of this - allowing plugins to provide their own fetch implementation without having to replace the entire AvatarCache functionality: https://github.com/jenkinsci/scm-api-plugin/pull/79

            mlasevich Michael Lasevich added a comment - I have submitted a PR for partial resolution of this - allowing plugins to provide their own fetch implementation without having to replace the entire AvatarCache functionality:  https://github.com/jenkinsci/scm-api-plugin/pull/79

            How do we get the PR reviewed/accepted?

            mlasevich Michael Lasevich added a comment - How do we get the PR reviewed/accepted?

            This PR allows child plugins to work around the issue without rewriting the whole AvatarCache functionality

            mlasevich Michael Lasevich added a comment - This PR allows child plugins to work around the issue without rewriting the whole AvatarCache functionality
            bitwiseman Liam Newman added a comment -

            Thanks for your contribution!

            bitwiseman Liam Newman added a comment - Thanks for your contribution!

            Any thought as to when it may be released?

            mlasevich Michael Lasevich added a comment - Any thought as to when it may be released?
            dnusbaum Devin Nusbaum added a comment -

            The PR was just released in SCM API plugin version 2.6.4.

            dnusbaum Devin Nusbaum added a comment - The PR was just released in SCM API plugin version 2.6.4.

            People

              Unassigned Unassigned
              mlasevich Michael Lasevich
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: