canfar/vos — pull request #45 by edwardchapin (2014-11-04 17:47:57+00:00)
Title: S1689: Add scope cookie support to VOS clients

This pull request adds a "--cookie" option to the VOS clients. The cookie is a string generated by the new delegation login page and offers an alternative method for gaining authenticated access to VOSpace. This method differs from using X509 certs in two main regards: (i) http instead of https is used; and (ii) a cookie may be scoped to a subtree of VOSpace (i.e., the scope).

All of the v* and mountvofs scripts have had the command-line parser refactored so that there is a new base class vos/commonparser.py.

The actual changes to vos/vos.py are qute minimal: the cookie is simply added to HTTP headers. Note that if both --cookie and --certfile are specified, --cookie will take precedence. Does this make sense? Maybe the Client/Connection constructors should complain if you are trying to authenticate using both methods.

Also added new unit tests, fixed up some old ones that I broke, and added an integration test.