An access key signs S3 requests. It acts as its owner, a user or a bot, with the owner’s access across the whole organization. A key has no permissions of its own: its access is checked on every request and changes when its owner’s does. To give code less access than you have, create a bot with only the policies it needs, and a key for the bot.
| Property | Value |
|---|---|
| Access key ID | oak_ followed by 12 characters |
| Secret | 40 letters and digits, shown once, when the key is created |
| Listed in | The project it was created in, where S3’s CreateBucket also puts new buckets |
| Description | Up to 256 characters |
Create an access key
Creating a key needs objects.accessKeys.create. A key for a bot also needs bots.createApiKey on
the bot.
- In the console, open Object Storage and select Access keys.
- Select Create access key, add a description if you want one, and create the key.
- Copy the access key ID and the secret. The secret isn’t shown again.
The console creates keys for you. To create one for a bot, set bot in
CreateAccessKey.
ezgh objects keys create --print-credentials prints a complete AWS CLI profile, including the
secret, for ~/.aws/config. ezgh objects credentials <key> prints the same profile later, with a
comment where the secret goes.
Revoke an access key
Revoking needs objects.accessKeys.revoke. In the Access keys list, select Revoke on the
key’s row. Requests signed with the key, and presigned URLs
it signed, stop working at once. A revoked key can’t be restored.
Permissions
Actions are in the objects namespace. Access is granted with policies, attached
directly or through groups.
| Policy | Grants |
|---|---|
ObjectsFullAccess |
Manage buckets, objects and access keys |
ObjectsReadWriteAccess |
Upload, download and delete objects; view buckets and access keys |
ObjectsReadOnlyAccess |
View buckets, access keys and object listings. No downloads |
ReadOnlyAccess has every list and view action here, and doesn’t include downloads.
AdministratorAccess has everything.
| Action | Allows | Checked against |
|---|---|---|
objects.buckets.list |
List buckets | Project |
objects.buckets.create |
Create buckets | Project |
objects.buckets.get |
View buckets and their settings | Bucket |
objects.buckets.update |
Change bucket settings | Bucket |
objects.buckets.delete |
Delete buckets | Bucket |
objects.objects.list |
List objects and multipart uploads | Bucket |
objects.objects.upload |
Upload and copy objects into a bucket | Bucket |
objects.objects.download |
Download objects and copy them out of a bucket | Bucket |
objects.objects.delete |
Delete objects and abort multipart uploads | Bucket |
objects.accessKeys.list |
List access keys | Project |
objects.accessKeys.create |
Create access keys | Project |
objects.accessKeys.get |
View access keys | Access key |
objects.accessKeys.revoke |
Revoke access keys | Access key |
The object actions cover an object’s versions too.
A bucket’s resource name has this form:
ezgh:us-west-1:org_k3f9a0x2m7qp:prj_g7h8i9j0k1l2:bkt_4k2m9x0a7qpeResource names hold the bucket’s ID, not its name, so a pattern can’t select buckets by name. Permissions apply to whole buckets, not to prefixes or objects.