Ticket #876 (closed task: fixed)

Opened 12 years ago

Last modified 11 years ago

[WG][S][DS] Pylons session object is lost in call to WCS

Reported by: pjkersha Owned by: pjkersha
Priority: blocker Milestone: PROD Final
Component: ndg2 Version:
Keywords: Delivery Cc: domlowe, spascoe, lawrence

Description

This follows from Dom's initial report:

 http://proj.badc.rl.ac.uk/ndg/ticket/845#comment:5

To reproduce:

  1. login
  2. Select wcs URL e.g.  http://127.0.0.1:8080/wcs/badc.nerc.ac.uk__NDG-A0__ReMryRVA?SERVICE=WCS&REQUEST=GetCoverage&IDENTIFIER=TuMYrRQ4&VERSION=1.1.0&BOUNDINGBOX=-180,-90,180,90&TIMESEQUENCE=2792-06-01T00:00:00.0&FORMAT=application/netcdf
  • Error indicates the user is not logged in.
  • Go to another page such as view or discovery. These will display user logged in
  • Checking the controllers CsmlWcsController, OwsController and BaseController, when the WCS is invoked a different session object is retrieved. This is empty:
session = {}

Hence all security info is lost (and anything else held in the session)

Sessions can be compared by looking at id attributes:

session._current_obj()._sess.id

The session referenced in the WCS (on entry into BaseController.__call__) has a different ID to the session object referenced elsewhere in discovery.

Possible cause:

  • something to do with the way session is imported into csml_wcs.py?

Change History

comment:1 Changed 12 years ago by pjkersha

  • Status changed from new to assigned

comment:2 Changed 12 years ago by domlowe

  • Status changed from assigned to closed
  • Resolution set to fixed

Closed:

Calls to "127.0.0.1" and "localhost" do not share the same session object. This was the root of the problem. Shouldn't impact production but may be an issue if we want to use multiple aliases in the future.

comment:3 Changed 11 years ago by lawrence

  • Keywords Delivery added; Security, pylons, session removed
  • Component changed from T05_Delivery to ndg2

moved to component ndg2 (obsolete) as part of ndg2 cleanup

Note: See TracTickets for help on using tickets.