Role-Based Bindings and Service Keys (AWS)
Object Store supports creating service credentials with read and write roles. This allows applications to be bound to role-specific service bindings to restrict access per use case.
-
read: This role provides read-only access to the bucket.
-
write: This role provides write-only access to the bucket.
To get role-specific service credentials, provide an additional parameter when creating the service key or binding. If the parameter isn’t provided, the credentials will have all applicable permissions by default.
Permissions Associated with the Read-Only Role
-
The following permissions are granted to a bucket when a service credential with read-only access is requested:
-
ListBucket
-
ListBucketMultipartUploads
-
GetBucketLocation
-
ListBucketVersions
-
GetBucketLogging (Only when server access logging is enabled. See Server Access Logging.)
-
-
The following permissions are granted to an object when a service credential with read-only access is requested:
-
GetObject
-
GetObjectAcl
-
GetObjectAttributes
-
GetObjectTorrent
-
GetObjectTagging
-
GetObjectVersion
-
GetObjectVersionAcl
-
GetObjectVersionTagging
-
GetObjectVersionTorrent
-
ListMultipartUploadParts
-
Permissions Associated with the Write-Only Role
-
No permissions are granted to a bucket when a service credential with write-only access is requested.
-
The following permissions are granted to an object when a service credential with write-only access is requested:
-
AbortMultipartUpload
-
DeleteObject
-
DeleteObjectTagging
-
DeleteObjectVersion
-
DeleteObjectVersionTagging
-
PutObject
-
PutObjectAcl
-
PutObjectTagging
-
PutObjectVersionTagging
-
PutObjectVersionAcl
-
Creating read-only or write-only service bindings and service keys is supported only for the standard plan. If you still have instances of the deprecated plans, then you would need to first update the instances to change the plan. See Updating Service Plan to Standard.
Configuration Parameters to Get Role-Based Service Credentials
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
Role |
String |
No |
To create a role-based binding |
Values Associated with the Role Parameter
|
Value |
Type |
Description |
|---|---|---|
|
Read |
String |
To create a read-based role binding |
|
Write |
String |
To create a write-based role binding |
Examples
-
Read-only role:
cf create-service-key <serviceInstanceName> <keyName> -c '{"role": "read"}' -
Write-only role:
cf create-service-key <serviceInstanceName> <keyName> -c '{"role": "write"}'
Additional Parameter in credentials
An extra parameter is added with the key role in the credentials section of the service key in case of role-based binding or service key. The value of the role parameter will be either read or write based on the role requested.
"credentials": {
"access_key_id": "<some_access_key_id>",
"bucket": "<some_access_key_id>",
"role": "<role>",
"host": "<region_specific_s3_endpoint>",
"region": "<region>",
"secret_access_key": "<some_secret_access_key>",
"uri": "s3://<some_access_key_id>:<some_secret_access_key>@<region_specific_s3_endpoint>/some_bucket_name",
"username": "<some_username>"
}