Added permission flags and unit tests.
authorTim Pierce <twp@curoverse.com>
Tue, 6 May 2014 21:40:28 +0000 (17:40 -0400)
committerTim Pierce <twp@curoverse.com>
Tue, 6 May 2014 21:40:28 +0000 (17:40 -0400)
commit2b8857f631f58df2baa93077185fb7a5a29c6aad
tree94c30e4314764a1255a74722ae20f025aac52dcb
parentbdc9139d17c184a58e5088270f2ce6ba361fb8a7
Added permission flags and unit tests.

New flags:
  --enforce-permissions enables permission checking for GET requests.
  --permission-ttl sets the expiration time on signed locators returned
    by PUT.
  --data-manager-token defines a privileged token for the Data Manager
    to issue DELETE and "GET /index" requests.

PUT now responds with a signed locator if a permission key has been
set.

Unit test TestGetHandler tests the GetBlockHandler both when permission
checking is off, and tests signed, unsigned and expired requests when
permission checking is enabled.

Refs #2328
services/keep/src/keep/keep.go
services/keep/src/keep/keep_test.go
services/keep/src/keep/perms.go