For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/en/guides/storage-and-backup/object-storage/s3-identity-and-access-management.md.
Skip to content

Object Storage - Identity and access management

View as Markdown

The purpose of this guide is to show you how to manage your identities and access your Object Storage resources

Objective

This guide explains how to manage identities and access to your Object Storage resources.

Requirements


OVHcloud Console Access

  • Direct link:
  • Navigation path: Public Cloud > Select your project > Storage > Object Storage

Instructions

In the left-hand menu of your Public Cloud project, click Object Storage under Storage, then open the Users tab.

Creating a user

Click Create a user, enter a name for the user and click Create. The new user gets the Object Storage Operator role and its S31 credentials.

Once your user has been created, its credentials are displayed. Save them: the secret key is shown only once.

If you already have OpenStack users, they are listed in the Users tab. To give one of them access to Object Storage, click the ... button on its row, then Enable Object Storage (S3): its S3 credentials are generated.

Info

If you choose an existing user, ensure that the user has an Object Storage Operator or Administrator role.

Info

By clicking on the ... button at the end of a user's line, you can also import or download the user's policy, download an rclone configuration, show the secret key or delete the user's S3 credentials.

Manage access to a bucket via a profile

You can define access to your buckets via predefined profiles.

In the Containers tab, click the ... button at the end of your bucket line, then Add S3 user.

Select the user to add to your bucket, choose their Role (Administrator, Read and write, Read-only or Deny), then click Add.

Advanced resource access management

Overview

By default, all resources (buckets, objects) and sub-resources (lifecycle configuration, website configuration, etc.) are private in Object Storage. Only the resource owner, i.e., the user account that creates it, has full control.

Access to private resources can be granted via access policies. Access policies can be categorized broadly into two types:

  • user-based: access policies attached to a specific user are called user policies. A user policy is evaluated using Object Storage IAM permissions and applies only to the specific user it is attached to.
  • resource-based: bucket policies and ACLs are policies that are attached directly to specific resources.
Info

Bucket policies are a feature that is not yet available for Object Storage. This article is about user policies.

You can refine your permissions by importing a JSON configuration file. To do this, open the Users tab.

Click the ... button at the end of your user's line, then Import a policy. Select your JSON file and click Import. The imported policy replaces the user's current policy.

Info

If you want to change a user's rights, you may need to download the JSON configuration file in advance by selecting Download the policy.

Understanding the user policy evaluation process

At the moment, user permissions are evaluated as follows:

  1. if exists, evaluate user policy else fallback to ACLs
    1. check for an explicit deny: if there is an explicit deny, then deny permission, else, check for an explicit allow
    2. check for an explicit allow: if there is an explicit allow, then allow permission
    3. if there is no explicit deny nor explicit allow, then fallback to ACLs
  2. fallback to ACLs
Info

This evaluation process will be subject to change with the upcoming implementation of bucket policies.

Some examples of JSON configuration files:

Read/write access to a bucket and its objects

{
  "Statement":[{
    "Sid": "RWContainer",
    "Effect": "Allow",
    "Action":["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads", "s3:AbortMultipartUpload", "s3:GetBucketLocation"],
    "Resource":["arn:aws:s3:::<bucket_name>", "arn:aws:s3:::<bucket_name>/*"]
  }]
}

Read-only access to a bucket and its objects

{
  "Statement":[{
    "Sid": "ROContainer",
    "Effect": "Allow",
    "Action":["s3:GetObject", "s3:ListBucket", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads"],
    "Resource":["arn:aws:s3:::<bucket_name>", "arn:aws:s3:::<bucket_name>/*"]
  }]
}

Deny listing of all buckets owned by the parent account

Info

The (s3:ListAllMyBuckets) action is allowed by default for a given user. Add the Deny effect if you want to explicitly refuse the use of the ListBuckets API operation.

{
  "Statement":[{
    "Sid": "DenyListBucket",
    "Effect": "Deny",
    "Action":["s3:ListAllMyBuckets"],
    "Resource":["*"]
  }]
}

Allow all operations on all project resources

{
  "Statement":[{
    "Sid": "FullAccess",
    "Effect": "Allow",
    "Action":["s3:*"],
    "Resource":["*"]
  }]
}

Read/write access to all objects in a specific folder (/home/user2) in a specific bucket (<bucket_name>)

{
  "Statement":[{
    "Sid": "RWContainer",
    "Effect": "Allow",
    "Action":["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads", "s3:AbortMultipartUpload", "s3:GetBucketLocation"],
    "Resource":["arn:aws:s3:::<bucket_name>", "arn:aws:s3:::<bucket_name>/home/user2/*"]
  }]
}

Allow all operations to specific IPs by whitelisting authorized IPs

{
  "Statement": [{
    "Sid": "ExampleStatement01",
    "Effect": "Allow",
    "Action": "s3:*",
    "Resource": [
      "arn:aws:s3:::<bucket_name>",
      "arn:aws:s3:::<bucket_name>/*"
    ],
    "Condition": {
      "IpAddress": {
        "aws:SourceIp": "10.0.0.5/16"
      }
    }
  }]
} 
Info

As a consequence of the current authorization process, implicit deny is not supported by OVHcloud Object Storage if the user is the bucket owner i.e., since ACLs are evaluated by default and since the bucket owner has FULL_CONTROL ACL, if the user is the bucket owner and even if there is no explicit allow in the policy file, the user will be authorized.

The following policy to attempt to allow read access to objects only to specific IPs will not work under current conditions if attached to the bucket owner i.e., even if the bucket owner makes requests from IPs that are not in the specified range, the bucket owner will be authorized.

{
  "Statement": [{
    "Sid": "ExampleStatement01",
    "Effect": "Allow",
    "Action": [
      "s3:GetObject",
      "s3:ListBucket",
      "s3:ListBucketVersions"
    ],
    "Resource": [
      "arn:aws:s3:::<bucket_name>/*"
    ],
    "Condition": {
      "IpAddress": {
        "aws:SourceIp": "10.0.0.5/16"
      }
    }
  }]
}

The following policy to attempt to deny read access to objects to specific IPs by blacklisting unauthorized IPs will not work under current conditions if attached to the bucket owner because there is no explicit deny and requests from the specified IPs will not match the allow, therefore, we fall back to the ACLs.

{
  "Statement": [{
    "Sid": "ExampleStatement01",
    "Effect": "Allow",
    "Action": [
      "s3:GetObject",
      "s3:ListBucket",
      "s3:ListBucketVersions"
    ],
    "Resource": [
      "arn:aws:s3:::<bucket_name>/*"
    ],
    "Condition": {
      "NotIpAddress": {
        "aws:SourceIp": "10.0.0.5/16"
      }
    }
  }]
}

List of supported actions

ActionScope
s3:AbortMultipartUploadObject
s3:BypassGovernanceRetentionObject
s3:CreateBucketBucket
s3:DeleteBucketBucket
s3:DeleteObjectObject
s3:DeleteBucketTaggingBucket
s3:DeleteBucketWebsiteBucket
s3:DeleteObjectObject
s3:DeleteObjectTaggingObject
s3:GetBucketAclBucket
s3:GetBucketCORSBucket
s3:GetBucketLocationBucket
s3:GetBucketLogging"Bucket
s3:GetBucketObjectLockConfigurationBucket
s3:GetBucketTaggingBucket
s3:GetBucketVersioningBucket
s3:GetBucketWebsiteBucket
s3:GetEncryptionConfigurationBucket
s3:GetIntelligentTieringConfigurationBucket
s3:GetLifecycleConfigurationBucket
s3:GetObjectObject
s3:GetObjectAclObject
s3:GetObjectAttributesObject
s3:GetObjectLegalHoldObject
s3:GetObjectRetentionObject
s3:GetObjectTaggingObject
s3:GetReplicationConfigurationBucket
s3:ListAllMyBucketsBucket
s3:ListBucketBucket
s3:ListBucketMultipartUploadsBucket
s3:ListMultipartUploadPartsObject
s3:ListBucketMultipartUploadsBucket
s3:ListBucketVersionsBucket
s3:ListMultipartUploadPartsObject
s3:PutBucketAclBucket
s3:PutBucketCORSBucket
s3:PutBucketLoggingBucket
s3:PutBucketObjectLockConfigurationBucket
s3:PutBucketTaggingBucket
s3:PutBucketVersioningBucket
s3:PutBucketWebsiteBucket
s3:PutEncryptionConfigurationBucket
s3:PutIntelligentTieringConfigurationBucket
s3:PutLifecycleConfigurationBucket
s3:PutObjectObject
s3:PutObjectAclObject
s3:PutObjectLegalHoldObject
s3:PutObjectRetentionObject
s3:PutObjectTaggingObject
s3:PutReplicationConfigurationObject

Go further

For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.

Join our community of users.

1: S3 is a trademark of Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.

Was this page helpful?