Peter Amstutz [Wed, 21 May 2014 02:23:18 +0000 (22:23 -0400)]
2798: Tracks opening and closing of readers, will block closing AsyncStream
until all readers are closed. Additionally, will block if too many readers are
created.
I do not see any code that would directly render these partials;
they're not indirectly referenced in the pane list; and I can remove
the controller code and run all our tests without tripping on a
NoMethodError exception from a nil.
Tim Pierce [Tue, 13 May 2014 15:06:00 +0000 (11:06 -0400)]
2755: Verify permission signatures on create.
Phase 1 of #2755: when creating a new collection, verify any permission
signatures found in the manifest. Unsigned locators in the manifest are
implicitly permitted (to be disabled in Phase 4)
* New "Locator" class to parse, examine and manipulate Keep locators.
* Collections.create checks permission signatures in a manifest.
* Collections.show signs locators in a manifest.
* collections_controller_test.rb: new unit tests to exercise signed
manifests and related features:
- "create collection with signed manifest"
- "create collection with signed manifest and explicit TTL"
- "create fails with invalid signature"
- "create fails with uuid of signed manifest"
- "multiple locators per line"
- "multiple signed locators per line"
* application.yml.example: new configuration variables
- Rails.configuration.blob_signing_key
- Rails.configuration.blob_signing_ttl
Tom Clegg [Mon, 19 May 2014 18:57:37 +0000 (14:57 -0400)]
2352: Reset column information between adding a new serialized
attribute and using the model. Otherwise, Rails (4) fails to validate
the serialized attribute.
Peter Amstutz [Mon, 19 May 2014 18:56:27 +0000 (14:56 -0400)]
2798: Continued refactoring buffer reader into separate buffer package. Made
internal buffer management functions package-internal and added a public API.
Updated keepclient to use buffer package public API. Added HashCheckingReader
to provide transparent checking of checksums. Added more package and API
comments.
Ward Vandewege [Thu, 15 May 2014 20:47:42 +0000 (16:47 -0400)]
CollectionReader can throw exceptions (for example, when passing an
argument that is not a manifest or collection UUID). Trap those and
print an error message, instead blowing up the fuse driver.
Peter Amstutz [Thu, 15 May 2014 20:42:33 +0000 (16:42 -0400)]
2798: Added AuthorizedGet(), Ask() and AuthorizedAsk(). Added BLOCKSIZE
constant and moved errors.New() declarations to the top of the file. Improved
test server runner. Changed some test methods to take copies of KeepClient
instead of pointer.
Peter Amstutz [Thu, 15 May 2014 20:22:33 +0000 (16:22 -0400)]
1885: Renamed DiscoverKeepDisks to DiscoverKeepServers, moved error.New()
declarations to the top, changed some tests to use KeepClient copy instead of
pointer.
Peter Amstutz [Thu, 15 May 2014 19:14:55 +0000 (15:14 -0400)]
1885: First commit of most complete keep proxy, no tests yet. Removed build.sh
in favor of go.sh that wraps 'go' with the desired GOPATH and 'go get'. Added
keepclient.Ask() method which does HTTP HEAD. Added AuthorizedGet() and
AuthorizedAsk() which provide signature and timestamp.
Tim Pierce [Tue, 13 May 2014 15:06:00 +0000 (11:06 -0400)]
2755: Verify permission signatures on create.
Phase 1 of #2755: when creating a new collection, verify any permission
signatures found in the manifest. Unsigned locators in the manifest are
implicitly permitted (to be disabled in Phase 4)
* Collections.create checks permission signatures in a manifest.
* Collections.show signs locators in a manifest.
* Unit test test_create_collection_with_signed_manifest exercises the
'create' and 'show' methods on a signed manifest.
* application.default.yml, application.yml.example: added configuration
variable Rails.configuration.permission_key.
Peter Amstutz [Wed, 14 May 2014 19:32:09 +0000 (15:32 -0400)]
2798: Full integration test with real API server and Keep server succeeds.
Expanded return values a bit to include the URL that a block was actually
downloaded from on GET, and the number of replicas written on PUT.
Peter Amstutz [Wed, 14 May 2014 18:07:06 +0000 (14:07 -0400)]
2798: All PUT tests against stub server pass. Added explict setting of
Content-Length to avoid unnecessary chunked transfer encoding, and is also
necessary so slices can directly WriteTo() the socket.