Cloud Enterprise Object Storage REST API

Search (SHIFT+S)




Create New Key For User

POST /object/user-secret-keys/{uid}

Creates a secret key for the specified user. If the user belongs to a namespace, the namespace must be supplied. When creating a new secret key, you may pass in an expiration time in minutes for the old key. During the expiration interval, both keys will be accepted for requests. This gives you a grace period where you can update applications to use the new key.

uidValid user identifier to create a key for

Required Roles

Requires one of the following roles:

  • SYSTEM_ADMIN

  • NAMESPACE_ADMIN


Request Payload

All parameters are required unless otherwise stated.

Field Description Type Notes
user_secret_key_create
existing_key_expiry_time_mins Expiry time in minutes for the secret key. Note that nodes may cache secret keys for up to two minutes so old keys may not expire immediately. String
namespace Namespace for User qualifier if User Scope is NAMESPACE String
secretkey Secret key associated with this user. If not provided, system will generate one String

Response Body

Representation of the secret keys that is created including the timestamps of its creation

Field Description Type Notes
user_secret_key
secret_key Secret key String
key_timestamp Secret key creation timestamp in ISO-8601 format String Valid Values:
  •  yyyy-MM-dd'T'HH:mm'Z'
key_expiry_timestamp Secret key expiry timestamp in ISO-8601 format String Valid Values:
  •  yyyy-MM-dd'T'HH:mm'Z'
link A link for this resource

Examples

Request
POST https://192.168.0.0:4443/object/user-secret-keys/testlogin HTTP/1.1

Content-Type: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>

<?xml version="1.0" encoding="UTF-8"?>
<user_secret_key_create>
   <existing_key_expiry_time_mins null="true"/>
   <namespace>s3</namespace>
   <secretkey>R6JUtI6hK2rDxY2fKuaQ51OL2tfyoHjPp8xL2y3T</secretkey>
</user_secret_key_create>
Response
HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<user_secret_key>
   <secret_key>R6JUtI6hK2rDxY2fKuaQ51OL2tfyoHjPp8xL2y3T</secret_key>
   <key_timestamp>2013-09-30 20:27:25.946</key_timestamp>
   <key_expiry_timestamp>2013-10-30 20:27:25.946</key_expiry_timestamp>
   <link href="/object/user-secret-keys/testlogin" rel="self"/>
</user_secret_key>