Support: 1-800-961-4454
Sales Chat
1-800-961-2888

How To Add Extra Users To Your Rackspace Cloud Account With The Identity API

6

EDITOR’S NOTE (December 27, 2012): This feature is temporarily unavailable. We will update you once it becomes available again.

It’s been one of the most requested features of Rackspace Cloud: the ability to have multiple control panel logins for one account. And now with our open cloud platform and the Identity Service API, we’ve made that possible.

Rackspace cloud customers can add separate accounts using the Identity Service API documented here:

http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/QuickStart-000.html

To add a user to your account, you need your “master” username and API key, and curl. You will also need to be a customer of the new open Rackspace Cloud platform. The first step is to authenticate against the Identity API and get an authentication token to use for subsequent commands:

curl -X POST https://identity.api.rackspacecloud.com/v2.0/tokens -d '{ "auth":{ "RAX-KSKEY:apiKeyCredentials":{ "username":"$USERNAME", "apiKey":"$APIKEY" } } }' -H "Content-type: application/json"

You’re looking for the “token ID” in the response. Once you have it, you can create users for the control panel by using it to replace the username, email, password and token in this command:

curl –X POST https://identity.api.rackspacecloud.com/v2.0/users -d '{"user": {"username": "$USERNAME", "email":"email@domain.com", "enabled": true, "OS-KSADM:password":"$PASSWORD"}}' -H "Content-type: application/json" -H "X-Auth-Token: $TOKEN"

If you decide that you want to revoke access to your account, you can delete the user. To do that, authenticate again using your master account, then delete the user using the ID:

curl -X DELETE https://identity.api.rackspacecloud.com/v2.0/users/12345 -H "X-Auth-Token: "$TOKEN""

To get a listing of users (and their IDs) on your account, perform a GET request:

curl https://identity.api.rackspacecloud.com/v2.0/users -H "X-Auth-Token: "$TOKEN""

That is just one of the new capabilities available on the Rackspace open cloud platform. Be sure to check back for more ways to leverage the open Rackspace Cloud.

About the Author

This is a post written and contributed by Hart Hoover.

Hart Hoover is a Cloud Strategist at Rackspace Hosting. Hoover started his career as a Racker in 2007 as a Linux Systems Administrator, providing technical support for dedicated servers. He moved to the cloud in 2009 to help design the Managed Cloud Servers support model. He has presented at various technical conferences, maintains and contributes to the Rackspace DevOps Blog, and advises Rackspace customers on best practices for cloud computing.


More
6 Comments

This is awesome! Great job!

avatar Jordan Callicoat on July 29, 2012 | Reply

A minor point but the dash in the “curl –X POST” for the create user curl command is actually an em dash (at least that’s how it is with Google Chrome on a Mac). If you copy and paste this command into the terminal directly, you’ll see the errors:

curl: (6) Could not resolve host: –X; nodename nor servname provided, or not known
curl: (6) Could not resolve host: POST; nodename nor servname provided, or not known

The command actually still works but it could be misleading to some. Hope this helps someone.

avatar Everett Toews on August 1, 2012 | Reply

Is there any timeline on when sub-users will become available again?

avatar jim culbreath on February 14, 2013 | Reply

Hello Jim!

Rackspace is definitely working on it. We hope to have this feature in the first half of this year.

avatar Hart Hoover [Racker] on February 14, 2013

Hi,

just played with the users api but it seems this still is in progress. any update on that? we feel a bit insecure using the same api key for all the people and apps using the account.

Alexandre

avatar Alexandre Bernard on August 22, 2013 | Reply

Hi, I just wanted to follow up. I this feature available now?

avatar Kg on September 16, 2013 | Reply

Leave a New Comment

(Required)


Racker Powered
©2014 Rackspace, US Inc.