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

AvatarCache does not support authenticated scm access

    Details

    • Type: Improvement
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: scm-api-plugin
    • Labels:
      None
    • Similar Issues:

      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

            Hide
            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

            Show
            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
            Hide
            mlasevich Michael Lasevich added a comment -

            How do we get the PR reviewed/accepted?

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

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

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

            Thanks for your contribution!

            Show
            bitwiseman Liam Newman added a comment - Thanks for your contribution!
            Hide
            mlasevich Michael Lasevich added a comment -

            Any thought as to when it may be released?

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

              People

              • Assignee:
                Unassigned
                Reporter:
                mlasevich Michael Lasevich
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: