From a7f8261d32fe775f67621e2123a9ac17190dcc0f Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Fri, 30 Oct 2020 16:15:10 -0400 Subject: [PATCH 1/3] Add GET Object ACL --- openapi.yaml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 52e8658e5..bd4deb97b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11246,6 +11246,70 @@ paths: "acl": "private" }' \ https://api.linode.com/v4/object-storage/buckets/us-east-1/example-bucket/access + /object-storage/buckets/{clusterId}/{bucket}/object-acl: + parameters: + - name: clusterId + in: path + description: The ID of the cluster this bucket exists in. + required: true + schema: + type: string + - name: bucket + in: path + description: The bucket name. + required: true + schema: + type: string + get: + operationId: viewObjectStorageBucketAccess + x-linode-cli-skip: true + servers: + - url: https://api.linode.com/v4 + summary: Object Storage Object ACL Config View + description: | + This Object Storage bucket's currently configured Access Control List (ACL). + ACLs define who can access your buckets and objects and specify the level of access + granted to those users. + + + This endpoint is available for convenience. It is recommended that instead you + use the more more [fully-featured S3 API](https://docs.ceph.com/docs/mimic/radosgw/s3/bucketops/#put-bucket-acl) directly. + tags: + - Object Storage + security: + - personalAccessToken: [] + - oauth: + - object_storage:read_only + responses: + '200': + description: The Object's canned ACL and policy. + content: + application/json: + schema: + type: object + properties: + acl: + type: string + enum: + - private + - public-read + - authenticated-read + description: > + The Access Control Level of the bucket, as a canned ACL string. + For more fine-grained control of ACLs, use the S3 API directly. + example: public-read + acl_xml: + type: string + description: > + The full XML of the object's ACL policy. + example: "..." + default: + $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl -H "Authorization: Bearer $TOKEN" \ + https://api.linode.com/v4/object-storage/buckets/us-east-1/example-bucket/object-acl /object-storage/buckets/{clusterId}/{bucket}/object-list: parameters: - name: clusterId From f748af45035a00c48a34745627a194fad1324dc2 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Tue, 3 Nov 2020 10:43:25 -0500 Subject: [PATCH 2/3] Add name query parameter --- openapi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index bd4deb97b..c43c708c5 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11280,6 +11280,16 @@ paths: - personalAccessToken: [] - oauth: - object_storage:read_only + parameters: + - name: name + in: query + required: true + description: > + The `name` of the object for which to retrieve its Access Control List (ACL). + Use the [Object Storage Bucket Contents List](/docs/api/object-storage/#object-storage-bucket-contents-list) + endpoint to access all object names in a bucket. + schema: + type: string responses: '200': description: The Object's canned ACL and policy. @@ -11309,7 +11319,7 @@ paths: - lang: Shell source: > curl -H "Authorization: Bearer $TOKEN" \ - https://api.linode.com/v4/object-storage/buckets/us-east-1/example-bucket/object-acl + https://api.linode.com/v4/object-storage/buckets/us-east-1/example-bucket/object-acl?name=example.txt /object-storage/buckets/{clusterId}/{bucket}/object-list: parameters: - name: clusterId From 77e8d6881ec357ef7be1a88baa9d7bd2e6d93bde Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Tue, 3 Nov 2020 17:18:02 -0500 Subject: [PATCH 3/3] Add missing ACL options --- openapi.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index c43c708c5..2e8ceb160 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11161,6 +11161,8 @@ paths: - private - public-read - authenticated-read + - public-read-write + - custom description: > The Access Control Level of the bucket, as a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly. @@ -11223,6 +11225,8 @@ paths: - private - public-read - authenticated-read + - public-read-write + - custom description: > The Access Control Level of the bucket, as a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly. @@ -11304,6 +11308,8 @@ paths: - private - public-read - authenticated-read + - public-read-write + - custom description: > The Access Control Level of the bucket, as a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly.