Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 208839

Summary: prompt for Bugzilla authentication credentials as needed
Product: z_Archived Reporter: Robert Elves <robert.elves>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P2 CC: eclipse, mjmeijer, robert.elves, ronw.mrmx, steffen.pingel, taciano.tres
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 289174, 320923    
Bug Blocks: 192984, 227015, 359210    
Attachments:
Description Flags
patch
none
mylyn/context/zip none

Description Robert Elves CLA 2007-11-05 20:50:58 EST
Adopt the new AbstractWebLocation api throughout the Bugzilla Connector in order to support prompting for non-saved passwords.

ref: bug#200634
Comment 1 Steffen Pingel CLA 2007-11-05 23:09:08 EST
Here is a quick outline of the required changes:

- Currently BugzillaClient gets username/password/proxy etc. passed as parameters in the constructor. That needs to be replaced by an instances of AbstractWebLocation and the credentials need to be obtained from that object. The location object also needs to be passed to WebClientUtil.setupHttpClient() to initialize the proxy etc.
- On failed authentication BugzillaClient needs to invoke AbstractWebLocation.requestCredentials() and resubmit the request with updated credentials.
- BugzillaClientManager needs to create instances of AbstractWebLocation using a TaskRepositoryLocationFactory and pass those to BugzillaClientFactory. The factory needs to be injected by BugzillaUiPlugin since it is coupled to the UI (to prompt for the credentials using a dialog) and not accessible from core.

The patch attached to bug 207531 shows the changes that were required to convert the Trac connector to the new API. This could be an even more involved change for Bugzilla and some attention should be paid to keep the Bugzilla core API backwards compatible if feasible.
Comment 2 Robert Elves CLA 2008-06-12 15:36:23 EDT
This will have to wait until 3.1
Comment 3 Frank Becker CLA 2008-12-26 16:55:11 EST
(In reply to comment #2)
> This will have to wait until 3.1
Rob,
Steffen,

what is here left? Can I help out here?
Comment 4 Steffen Pingel CLA 2008-12-28 18:14:37 EST
BugzillaClient needs to be modified to invoke the password prompting callback on authentication exceptions. I think this may require a larger refactoring, e.g. wrapping all calls in a request object (see JiraSoapClient or TracWebClient.Request for an example).
Comment 5 Frank Becker CLA 2008-12-30 15:15:48 EST
Created attachment 121363 [details]
patch

To get BugzillaRepositoryConnectorTest.testContextAttachFailure ported I need to set the user and password.

I found that we should use the AuthenticationCredentials from the location and not the fields from the BugzillaClient.
Comment 6 Frank Becker CLA 2008-12-30 15:15:51 EST
Created attachment 121364 [details]
mylyn/context/zip
Comment 7 Robert Elves CLA 2009-01-12 18:39:35 EST
(In reply to comment #5)
> Created an attachment (id=121363)
> patch
> 
> To get BugzillaRepositoryConnectorTest.testContextAttachFailure ported I need to
> set the user and password.
> 
> I found that we should use the AuthenticationCredentials from the location and
> not the fields from the BugzillaClient.
Patch applied, ip log updated.
Comment 8 Steffen Pingel CLA 2009-08-13 03:21:24 EDT
*** Bug 243138 has been marked as a duplicate of this bug. ***
Comment 9 Taciano Tres CLA 2009-08-31 08:44:41 EDT
My two cents about this issue:
At work, we need to change our password every 90 days (at least). This means that saving the password at the keyring is ok for a while (bug 200634). But if the user doesn't do this, then he should, every time he starts Eclipse, go into connector config and type the password again. This is not user friendly.

Would be awesome if the Mylyn connector asks for credentials if the connection fails for authentication reasons.
Comment 10 Robert Elves CLA 2009-12-22 21:29:51 EST
Agreed, I'll raise this during Mylyn 3.4 planning.
Comment 11 Taciano Tres CLA 2011-04-01 12:45:12 EDT
Any improvement in this issue?
Comment 12 Ron W CLA 2015-05-12 19:41:58 EDT
This is not working for me in Eclipse 4.4
Comment 13 Sam Davis CLA 2015-05-13 12:06:07 EDT
No, the Bugzilla connector does not support this.
Comment 14 Ron W CLA 2015-06-02 14:55:30 EDT
As an interim work around, maybe add a "Repository Properties" entry to the context menu of the "Task List" view.
Comment 15 Sam Davis CLA 2015-06-02 15:14:27 EDT
That entry is already present when right clicking a query.
Comment 16 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn