[JIRA] (JENKINS-59797) AvatarCache does not support authenticated scm access

13 views
Skip to first unread message

max-jenkins@lasevich.net (JIRA)

unread,
Oct 15, 2019, 10:15:02 PM10/15/19
to jenkinsc...@googlegroups.com
Michael Lasevich created an issue
 
Jenkins / New Feature JENKINS-59797
AvatarCache does not support authenticated scm access
Issue Type: New Feature New Feature
Assignee: Unassigned
Components: scm-api-plugin
Created: 2019-10-16 02:14
Priority: Minor Minor
Reporter: Michael Lasevich

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

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

max-jenkins@lasevich.net (JIRA)

unread,
Oct 23, 2019, 11:42:02 AM10/23/19
to jenkinsc...@googlegroups.com
Michael Lasevich commented on New Feature JENKINS-59797
 
Re: AvatarCache does not support authenticated scm access

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

max-jenkins@lasevich.net (JIRA)

unread,
Nov 5, 2019, 3:18:03 PM11/5/19
to jenkinsc...@googlegroups.com

max-jenkins@lasevich.net (JIRA)

unread,
Nov 5, 2019, 3:21:02 PM11/5/19
to jenkinsc...@googlegroups.com
Michael Lasevich updated an issue
 
Jenkins / Improvement JENKINS-59797
Change By: Michael Lasevich
Issue Type: New Feature Improvement

max-jenkins@lasevich.net (JIRA)

unread,
Nov 5, 2019, 3:25:02 PM11/5/19
to jenkinsc...@googlegroups.com
Michael Lasevich updated an issue
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:
# Am I seeing this correct? Or am I missing something?
# 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?
# 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?
# 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

 

max-jenkins@lasevich.net (JIRA)

unread,
Nov 5, 2019, 3:26:02 PM11/5/19
to jenkinsc...@googlegroups.com
Michael Lasevich commented on Improvement JENKINS-59797
 
Re: AvatarCache does not support authenticated scm access

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

bitwiseman@gmail.com (JIRA)

unread,
Feb 10, 2020, 7:19:08 PM2/10/20
to jenkinsc...@googlegroups.com
Liam Newman updated Improvement JENKINS-59797
 

Thanks for your contribution!

Change By: Liam Newman
Status: Open Fixed but Unreleased
Resolution: Fixed

max-jenkins@lasevich.net (JIRA)

unread,
Mar 9, 2020, 11:55:03 PM3/9/20
to jenkinsc...@googlegroups.com
 
Re: AvatarCache does not support authenticated scm access

Any thought as to when it may be released?

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages