Notice

This document is for a development version of Ceph.

Bucket Policies

The Ceph Object Gateway supports a subset of the Amazon S3 policy language applied to buckets.

Creation and Removal

Bucket policies are managed through standard S3 operations rather than radosgw-admin.

For example, one may use s3cmd to set or delete a policy thus:

$ cat > examplepol
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Principal": {"AWS": ["arn:aws:iam::usfolks:user/fred:subuser"]},
    "Action": "s3:PutObjectAcl",
    "Resource": [
      "arn:aws:s3:::happybucket/*"
    ]
  }]
}

$ s3cmd setpolicy examplepol s3://happybucket
$ s3cmd delpolicy s3://happybucket

Limitations

See Principals regarding the interactions between policy Principals and User Accounts.

Bucket policies do not yet support string interpolation.

For all requests, condition keys we support are:

  • aws:CurrentTime

  • aws:EpochTime

  • aws:PrincipalType

  • aws:Referer

  • aws:SecureTransport

  • aws:SourceIp

  • aws:UserAgent

  • aws:username

Request that authenticate with Keystone also include:

  • keystone:role

  • keystone:userid

We support certain S3 condition keys for bucket and object requests.

Support for the following bucket-related operations was added in the Mimic release of Ceph.

Swift

There is no way to set bucket policies under Swift, but bucket policies that have been set govern Swift as well as S3 operations.

Swift credentials are matched against Principals specified in a policy in a way specific to whatever backend is being used.

Brought to you by the Ceph Foundation

The Ceph Documentation is a community resource funded and hosted by the non-profit Ceph Foundation. If you would like to support this and our other efforts, please consider joining now.