A newer release of this product is available.
Protocols S3 services svm.uuid users endpoint overview
Contributors
Suggest changes
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
This may take a few minutes. Thanks for your patience.
Your file is ready
Overview
An S3 user account is created on the S3 server. Buckets that are created for the server are associated with that user (as the owner of the buckets). The creation of the user account involves generating a pair of keys "access" and "secret". These keys are shared with clients (by the administrator out of band) who want to access the S3 server. The access_key is sent in the request and it identifies the user performing the operation. The client or server never send the secret_key over the wire. Only the access_key can be retrieved from a GET operation. The secret_key along with the access_key is returned from a POST operation and from a PATCH operation if the administrator needs to regenerate the keys.
Examples
Retrieving S3 user configurations for a particular SVM
# The API: /api/protocols/s3/services/{svm.uuid}/users # The call: curl -X GET "https://<mgmt-ip>/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users?fields=*&return_records=true" -H "accept: application/hal+json" # The response: { "records": [ { "svm": { "uuid": "db2ec036-8375-11e9-99e1-0050568e3ed9", "name": "vs1", "_links": { "self": { "href": "/api/svm/svms/db2ec036-8375-11e9-99e1-0050568e3ed9" } } }, "name": "user-1", "comment": "S3 user", "access_key": "JJJA3240AD5ZTSHXNC35", "key_time_to_live": "PT3H5M", "key_expiry_time": "2023-02-20T10:04:31Z", "_links": { "self": { "href": "/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-1" } } }, { "svm": { "uuid": "db2ec036-8375-11e9-99e1-0050568e3ed9", "name": "vs1", "_links": { "self": { "href": "/api/svm/svms/db2ec036-8375-11e9-99e1-0050568e3ed9" } } }, "name": "user-2", "comment": "s3-user", "access_key": "C87S021Q59JJAAQNJP7R", "_links": { "self": { "href": "/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-2" } } } ], "num_records": 2, "_links": { "self": { "href": "/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users?fields=*&return_records=true" } } }
Retrieving the user configuration of a specific S3 user
# The API: /api/protocols/s3/services/{svm.uuid}/users/{name} # The call: curl -X GET "https://<mgmt-ip>/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-1" -H "accept: application/hal+json" # The response: { "svm": { "uuid": "db2ec036-8375-11e9-99e1-0050568e3ed9", "name": "vs1", "_links": { "self": { "href": "/api/svm/svms/db2ec036-8375-11e9-99e1-0050568e3ed9" } } }, "name": "user-1", "comment": "s3-user", "access_key": "JJJA3240AD5ZTSHXNC35", "key_time_to_live": "P6DT1H5M", "key_expiry_time": "2023-02-20T10:04:31Z", "_links": { "self": { "href": "/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-1" } } }
Creating an S3 user configuration
# The API: /api/protocols/s3/services/{svm.uuid}/users # The call: curl -X POST "https://<mgmt-ip>/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"user-1\"}" # The response: HTTP/1.1 201 Created Date: Fri, 31 May 2019 09:34:25 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Location: /api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-1 Content-Length: 244 Content-Type: application/json { "num_records": 1, "records": [ { "name": "user-1", "access_key": "JJJA3240AD5ZTSHXNC36", "secret_key": "_n8NAqU3A8TN73698j1uJ2YA7oxZ_Va6q4ETMB47" } ] }
Creating an S3 user configuration with key expiration configuration
# The API: /api/protocols/s3/services/{svm.uuid}/users # The call: curl -X POST "https://<mgmt-ip>/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"comment\": \"S3 user3\", \"key_time_to_live\": \"P6DT1H5M\", \"name\": \"user-3\"}" # The response: HTTP/1.1 201 Created Date: Tue, 14 Feb 2023 08:59:31 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors: 'self' Location: /api/protocols/s3/services/6573ac2b-ab66-11ed-b53d-005056bb4b9b/users/user-3 Content-Length: 337 Content-Type: application/hal+json Vary: Origin { "num_records": 1, "records": [ { "name": "user-3", "access_key": "JJJA3240AD5ZTSHXNC35", "secret_key": "OXx6J_GkTc94Xx91cYrNBar_OT3BY6lWOHI_HSR5", "key_expiry_time": "2023-06-16T12:08:38Z", "_links": { "self": { "href": "/api/protocols/s3/services/6573ac2b-ab66-11ed-b53d-005056bb4b9b/users/user-3" } } } ] }
Regenerating keys for a specific S3 user for the specified SVM
# The API: /api/protocols/s3/services/{svm.uuid}/users/{name} # The call: curl -X PATCH "https://<mgmt-ip>/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-2?regenerate_keys=true" -H "accept: application/hal+json" -H "Content-Type: application/json" -d "{ }" # The response: HTTP/1.1 200 OK Date: Fri, 31 May 2019 09:55:45 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Content-Length: 391 Content-Type: application/hal+json { "num_records": 1, "records": [ { "name": "user-2", "access_key": "KEOYV21G156K8AB4ZISH", "secret_key": "au__5oyYSs3c_QtoD5FH9f9rL888rwgD6fQS8chl", "_links": { "self": { "href": "/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-2" } } } ] }
Regenerating keys and setting new expiry configuration for a specific S3 user for the specified SVM
# The API: /api/protocols/s3/services/{svm.uuid}/users/{name} # The call: curl -X PATCH "https://<mgmt-ip>/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-2?regenerate_keys=true" -H "accept: application/hal+json" -H "Content-Type: application/json" -d "{ \"key_time_to_live\": \"PT6H3M\" }" # The response: HTTP/1.1 200 OK Date: Fri, 31 May 2019 09:55:45 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Content-Length: 391 Content-Type: application/hal+json { "num_records": 1, "records": [ { "name": "user-2", "access_key": "KEOYV21G156K8AB4ZISH", "secret_key": "au__5oyYSs3c_QtoD5FH9f9rL888rwgD6fQS8chl", "key_expiry_time": "2023-06-16T16:19:06Z", "_links": { "self": { "href": "/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-2" } } } ] }
Deleting keys for a specific S3 user for a specified SVM
# The API: /api/protocols/s3/services/{svm.uuid}/users/{name} # The call: curl -X PATCH "https://<mgmt-ip>/api/protocols/s3/services/db2ec036-8375-11e9-99e1-0050568e3ed9/users/user-2?delete_keys=true" -H "accept: application/hal+json" -H "Content-Type: application/json" -d "{ }" # The response: HTTP/1.1 200 OK Date: Wed, 08 Feb 2023 13:40:04 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors: 'self' Content-Length: 3 Content-Type: application/hal+json Vary: Origin { }
Deleting the specified S3 user configuration for a specified SVM
# The API: /api/protocols/s3/services/{svm.uuid}/users/{name} # The call: curl -X DELETE "https://<mgmt-ip>/api/protocols/s3/services/03ce5c36-f269-11e8-8852-0050568e5298/users/user-2" -H "accept: application/json"