Support concurrent http and https

Bug #621326 reported by Anthony Lenton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Triaged
Low
Unassigned

Bug Description

At the moment lazr.restful has a single setting to determine if the whole of the API should be served under http or https. It would be *great* if we could configure it to have the public part of an API available over plain http, while at the same time keeping the authenticated part safe under https.

Revision history for this message
Gary Poster (gary) wrote :

I talked with Anthony on IRC. This is a "would be nice to have done by end of 2010 (since we can't have it done already via time machine)".

I suspect that this would be a small-to-medium-sized effort, and that we could fit it in along with other goals. I'll run it by Leonard and Benji for implementation ideas soon.

Changed in lazr.restful:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Leonard Richardson (leonardr) wrote :

The lazr.restful portion of this is pretty minimal--mostly having to do with URL construction. The real problem is in Launchpad/Zope/Apache, where the HTTP requests are processed, and I don't know how much work it would be to set that up.

Revision history for this message
Gary Poster (gary) wrote :

In Leonard's previous comment, I believe by "Launchpad/Zope/Apache" he meant "the rest of the application," whether it is Launchpad + Zope + Apache or Django + nginx.

Anthony, am I right that the URL construction bits are exactly what you are talking about from lazr.restful? The rest (security of enforcing HTTPS-only for given content, in particular) would be the responsibility of your application.

Revision history for this message
Anthony Lenton (elachuni) wrote :

Hm, I don't really know what all the LAZR_RESTFUL_USE_HTTPS setting affects. Putting together the urls served for sure, but it would be great if it refused to serve over http some object or method that is configured to be served over https (and possibly vice-versa). I imagine Apache could take care of bouncing you over to https if you try to access https-only resources, but ideally lazr.restful would check too.

At the moment if you try to just access a top level collection within a service root configured for http using an https URL (or vice-versa) it fails with
NotImplementedError: Can't look up definition in another url (http(s)://foo.bar.baz/...)

Revision history for this message
Gary Poster (gary) wrote :

I didn't realize that we already supported something similar. It sounds doable for lazr.restful to be responsible for something like that, then, yes.

Changed in lazr.restful:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.