# Security in Object Storage

Who may do what (IAM), what is audited, how objects are encrypted at rest, and who can reach a bucket.

## IAM actions

Every signed request, through the console, the API or an S3 client, is checked against your IAM
policies and the bucket policy; an unsigned request, against the bucket policy alone.
A bucket's resource name is `rn:ews::<org>:s3:bucket/<name>`, an object's
`rn:ews::<org>:s3:bucket/<name>/object/<key>`; object storage has no region segment.

(The table of IAM actions is generated on the web page.)
- `s3:GetObject` and `s3:GetObjectVersion` are **sensitive** reads: the generated ReadOnly policy
  leaves them out, and an allowed read through the API is recorded in the audit log.
- Some operations check more than their own action: restoring a version also needs
  `s3:GetObjectVersion`; replication needs `s3:PutObject` on the destination; a KMS key needs
  `kms:Encrypt` on it; reading all public-access settings at once
  (`GET /s3/api/buckets/{name}/public-access`) needs `s3:GetBucketPolicy`,
  `s3:GetBucketPublicAccessBlock` and `s3:GetBucketWebsite`.
- Removing CORS rules, lifecycle rules or the KMS key needs the setting's Put action, as on AWS.
- A bucket's policy, Block public access, website and other settings can be changed only by your
  own organization, never through a bucket policy.
- Access keys are IAM access keys: creating one is `iam:CreateAccessKey` (see
  [Create an access key](create-an-access-key.md)). Older S3 keys, made with
  `s3:CreateAccessKey`, keep working; temporary credentials are `s3:CreateTemporaryCredentials`.

How IAM policies, key scopes and bucket policies combine is in
[Access control](access-control.md).

## Audit

Every write through the API is recorded in the audit log with its outcome, and so are sensitive
reads and refused requests. An unsigned request, such as a public read, has nobody to record.

## Encryption at rest

Every object is encrypted under its bucket's own data key, which is wrapped by the platform key or
a KMS key of yours. See [Encryption](encryption.md).

## Encryption in transit

The endpoint, the bucket addresses and the website addresses answer over HTTPS.

## Network exposure

A bucket is private: nothing in it can be read without a key while **Block public access** is on,
which it is for every new bucket. A bucket policy can make objects public (see
[Make objects public](make-objects-public.md)), and a website serves only those public objects.

## Related

- [Access control](access-control.md)
- [IAM](/docs/iam)
- [Audit log](/docs/audit-log)
