Closed Bug 443210 Opened 16 years ago Closed 13 years ago

Implement Bugzilla.parameters to access parameters used in Bugzilla

Categories

(Bugzilla :: WebService, enhancement)

3.1.4
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: mkanat, Assigned: LpSolit)

References

Details

Attachments

(1 file, 3 obsolete files)

In bug 428659, we throw an error if ssl is "authenticated sessions" and User.login is called without SSL. However, there's no way for a client to know if Bugzilla requires SSL for login or not, or even if it supports ssl!

So we have to include some way to get the ssl parameter.
Flags: blocking3.2+
Attached patch v1 for 3.2 (obsolete) — Splinter Review
Okay, here's the only two parameters that I think are very important to have for 3.2.
Assignee: webservice → mkanat
Status: NEW → ASSIGNED
Attachment #327823 - Flags: review?(dkl)
Attached patch WIP for HEAD (obsolete) — Splinter Review
And this is more what it will look like on HEAD, although I'm not done yet.
Keywords: relnote
IMO, the information listed in "WIP for HEAD" should not be disclosed if requirelogin = 1 and you are not logged in, because you cannot normally access this data from the web and there is no reason to bypass it using the API. The patch for 3.2 seems fine though as this information is already available when accessing the login page.
Comment on attachment 327823 [details] [diff] [review]
v1 for 3.2

I dont see that the Bugzilla::WebService::type function is available under the 3.2 branch, only on HEAD. So you should use type() instead.
Attachment #327823 - Flags: review?(dkl) → review-
Since we got the ssl redirect working, this isn't a 3.2 blocker anymore, and in fact won't even go into 3.2 anymore.
Flags: blocking3.2+ → blocking3.2-
Target Milestone: Bugzilla 3.2 → Bugzilla 4.0
Attached patch patch, V3 (obsolete) — Splinter Review
If you think that we need some more parameters, please tell me what parameter you mean.
Attachment #437087 - Flags: review?(mkanat)
Comment on attachment 437087 [details] [diff] [review]
patch, V3

All parameters should be accessible as long as I'm in the tweakparams group.
Attachment #437087 - Flags: review?(mkanat) → review-
(In reply to comment #7)
> (From update of attachment 437087 [details] [diff] [review])
> All parameters should be accessible as long as I'm in the tweakparams group.

What should a user see who is not in he tweakparams group? 
* Nothing or some selected(which)
Attached patch patch, v4Splinter Review
I really need this for our QA tests, so taking!
Assignee: mkanat → LpSolit
Attachment #327823 - Attachment is obsolete: true
Attachment #327826 - Attachment is obsolete: true
Attachment #437087 - Attachment is obsolete: true
Attachment #585617 - Flags: review?(mkanat)
Summary: WebServices need access to some params → Implement Bugzilla.parameters to access parameters used in Bugzilla
Comment on attachment 585617 [details] [diff] [review]
patch, v4

Review of attachment 585617 [details] [diff] [review]:
-----------------------------------------------------------------

Awesome!

::: Bugzilla/WebService/Bugzilla.pm
@@ +42,5 @@
>      version
>  );
>  
> +# Logged-out users do not need to know more than that.
> +use constant PARAMETERS_WHITELIST => qw(

Let's call this PARAMETERS_LOGGED_OUT.

@@ +48,5 @@
> +    requirelogin
> +);
> +
> +# These parameters are guessable from the web UI when the user
> +# is logged in. So it's safe to access them.

The only problem is that you're also providing these values to third-party sites who *can't* log in, via JSONP. But I suppose that's true for all our APIs, so it's not like this would be a new security issue.

@@ +49,5 @@
> +);
> +
> +# These parameters are guessable from the web UI when the user
> +# is logged in. So it's safe to access them.
> +use constant PARAMETERS_WHITELIST_EXTENDED => qw(

And this PARAMETERS_LOGGED_IN.

@@ +387,5 @@
> +    C<useqacontact>,
> +    C<usestatuswhiteboard>,
> +    C<usetargetmilestone>.
> +
> +A user being in the tweakparams group can access all existing parameters.

Remove "being".

Right after this sentence, add:

The list of parameters returned by this method is not stable and will never be stable.
Attachment #585617 - Flags: review?(mkanat) → review+
Flags: approval+
I fixed everything you said on checkin. Thanks! :)

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/WebService/Bugzilla.pm
Committed revision 8066.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Flags: testcase?
Added to relnotes for 4.4.
Keywords: relnote
Blocks: 1157405
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: