marcel/aws-s3 — Issue #39: "Invalid group: uri" while setting :authenticated_read
Author: mislav
Created: 2011-10-14 15:59:43+00:00
State: open

My object was private and I wanted to grant the READ permission to authenticated users:

~~~ ruby
policy = S3Object.acl(name, bucket)
policy.grants << ACL::Grant.grant(:authenticated_read)
# persist it:
S3Object.acl(name, bucket, policy) # BOOM! doesn't work
~~~

The exception is from the server: "Invalid group uri". This is what it was trying to send (for the offending grant):

~~~ xml

http://acs.amazonaws.com/groups/global/Authenticated

~~~

I think it Amazon choked because it wanted this URI instead:

~~~
http://acs.amazonaws.com/groups/global/AuthenticatedUsers
~~~