Allow WebService clients to authenticate using Bugzilla_login and Bugzilla_password

RESOLVED FIXED in Bugzilla 3.6

Status

()

Bugzilla
WebService
--
enhancement
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

unspecified
Bugzilla 3.6
Bug Flags:
approval +

Details

(Whiteboard: [es-ita] [relnote input_params?])

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
There are certain hooks that run inside of Bugzilla's internal code that have no idea whether they're being called in a normal CGI environment, a WebService call, or possibly even from the command line! And yet, often these hooks need to know more information than they're passed--in particular they need to get information about data that was passed to the script or webservice method.

So, we should have a Bugzilla.pm function that allows hooks (and possibly other parts of Bugzilla) to access the input parameters of the script/WebService method being called.
(Assignee)

Comment 1

9 years ago
Actually, I found a really great internal use in Bugzilla for this! Once we implement this, we can modify Auth::Login::CGI to use it, and that will allow people to specify Bugzilla_login and Bugzilla_password as WebService arguments, for very simple login during a single method call.
Assignee: general → webservice
Component: Bugzilla-General → WebService
Summary: Allow hooks to access "input parameters" (CGI variables or WebService arguments) → Allow WebService clients to authenticate using Bugzilla_login and Bugzilla_password
(Assignee)

Comment 2

9 years ago
Created attachment 409599 [details] [diff] [review]
v1

Hurrah, this works really nicely. :-)
Assignee: webservice → mkanat
Status: NEW → ASSIGNED
Attachment #409599 - Flags: review?(dkl)
(Assignee)

Comment 3

9 years ago
The attached patch depends on the patch for bug 513593.
Depends on: 513593
Whiteboard: [es-ita]
Comment on attachment 409599 [details] [diff] [review]
v1

Code looks good and works as expected in my testing. r=dkl
Attachment #409599 - Flags: review?(dkl) → review+
(Assignee)

Updated

9 years ago
Flags: approval+
(Assignee)

Comment 5

9 years ago
Checking in Bugzilla.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v  <--  Bugzilla.pm
new revision: 1.81; previous revision: 1.80
done
Checking in Bugzilla/CGI.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/CGI.pm,v  <--  CGI.pm
new revision: 1.51; previous revision: 1.50
done
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v  <--  Hook.pm
new revision: 1.33; previous revision: 1.32
done
Checking in Bugzilla/WebService.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService.pm,v  <--  WebService.pm
new revision: 1.20; previous revision: 1.19
done
Checking in Bugzilla/Auth/Login/CGI.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Auth/Login/CGI.pm,v  <--  CGI.pm
new revision: 1.14; previous revision: 1.13
done
Checking in Bugzilla/Auth/Persist/Cookie.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Auth/Persist/Cookie.pm,v  <--  Cookie.pm
new revision: 1.12; previous revision: 1.11
done
Checking in Bugzilla/WebService/Server.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Server.pm,v  <--  Server.pm
new revision: 1.3; previous revision: 1.2
done
Checking in Bugzilla/WebService/User.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/User.pm,v  <--  User.pm
new revision: 1.16; previous revision: 1.15
done
Checking in Bugzilla/WebService/Server/JSONRPC.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/JSONRPC.pm,v  <--  JSONRPC.pm
new revision: 1.3; previous revision: 1.2
done
Checking in Bugzilla/WebService/Server/XMLRPC.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/XMLRPC.pm,v  <--  XMLRPC.pm
new revision: 1.8; previous revision: 1.7
done
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Keywords: relnote
Resolution: --- → FIXED
Whiteboard: [es-ita] → [es-ita] [relnote input_params?]
(Assignee)

Comment 6

8 years ago
Added to the release notes in bug 547466.
Keywords: relnote
I don't suppose there's any chance of a backport of this to 3.4? It makes a significant performance difference for the BzAPI...

Gerv

Comment 8

8 years ago
(In reply to comment #7)
> I don't suppose there's any chance of a backport of this to 3.4?

No. Bugzilla 3.4 is restricted to security bugs only, and this is not a minor backport.
You need to log in before you can comment on or make changes to this bug.