| Summary: | prompt for Bugzilla authentication credentials as needed | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Robert Elves <robert.elves> | ||||||
| Component: | Mylyn | Assignee: | 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
Robert Elves
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. This will have to wait until 3.1 (In reply to comment #2) > This will have to wait until 3.1 Rob, Steffen, what is here left? Can I help out here? 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). 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.
Created attachment 121364 [details]
mylyn/context/zip
(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. *** Bug 243138 has been marked as a duplicate of this bug. *** 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. Agreed, I'll raise this during Mylyn 3.4 planning. Any improvement in this issue? This is not working for me in Eclipse 4.4 No, the Bugzilla connector does not support this. As an interim work around, maybe add a "Repository Properties" entry to the context menu of the "Task List" view. That entry is already present when right clicking a query. 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 |