# How to auth knife openstack with rackspace openstack

**URL:** <https://discourse.chef.io/t/how-to-auth-knife-openstack-with-rackspace-openstack/2805>\
**Category:** Chef Infra (archive)\
**Created:** [May 31, 2012, 4:15am UTC](https://discourse.chef.io/t/how-to-auth-knife-openstack-with-rackspace-openstack/2805 "2012-05-31T04:15:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cooper\_Simmons](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/cooper_simmons/32/141_2.png) [@Cooper\_Simmons](https://discourse.chef.io/u/Cooper_Simmons)\
**Post date:** [May 31, 2012, 4:15am UTC](https://discourse.chef.io/t/how-to-auth-knife-openstack-with-rackspace-openstack/2805/1 "2012-05-31T04:15:29Z")

</div>

Hello all.

I’m a little confused from the README from knife-openstack:

> <https://github.com/chef/knife-openstack/blob/master/README.md>

I’m tripped up on the authentication piece and I’m not sure what auth items  
these refer to:  
knife[:openstack\_access\_key\_id]  
knife[:openstack\_secret\_access\_key]  
knife[:openstack\_api\_endpoint]

This is the data I get back from my auth post to  
[https://identity.api.rackspacecloud.com/v2.0/tokens](https://identity.api.rackspacecloud.com/v2.0/tokens)  
I’ve excerpted what I thought was relevant, and changed the names to  
protect the innocent.

{  
“endpoints”: [  
{  
“publicURL”: “[https://dfw.servers.api.rackspacecloud.com/v2/123456](https://dfw.servers.api.rackspacecloud.com/v2/123456)”,  
“region”: “DFW”,  
“tenantId”: “123456”,  
“versionId”: “2”,  
“versionInfo”: “[https://dfw.servers.api.rackspacecloud.com/v2](https://dfw.servers.api.rackspacecloud.com/v2)”,  
“versionList”: “[https://dfw.servers.api.rackspacecloud.com/](https://dfw.servers.api.rackspacecloud.com/)”  
}  
],  
“name”: “cloudServersOpenStack”,  
“type”: “compute”  
}

“token”: {  
“expires”: “2012-05-31T21:18:57.000-05:00”,  
“id”: “fe8a9999-999a-99b1-9abc-99e9cd95682c”,  
“tenant”: {  
“id”: “id9999”,  
“name”: “name99”  
}  
},  
“user”: {  
“id”: “654321”,  
“name”: “myname”,  
“roles”: [  
{  
“description”: “User Admin Role.”,  
“id”: “3”,  
“name”: “identity:user-admin”  
}  
]  
}

This is the data I think is relevant but I’ve tried various combinations of  
these and always get:  
ERROR: Excon::Errors::Unauthorized: Expected(200) \<=\> Actual(401  
Unauthorized)

I’m assuming  
knife[:openstack\_api\_endpoint] = "  
[https://dfw.servers.api.rackspacecloud.com/v2/123456](https://dfw.servers.api.rackspacecloud.com/v2/123456)"  
I was also assuming openstack\_secret\_access\_key is my API key which is not  
listed above.

Any info appreciated.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Matt\_Ray\_OPSCODE](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_ray_opscode/32/459_2.png) [@Matt\_Ray\_OPSCODE](https://discourse.chef.io/u/Matt_Ray_OPSCODE)\
**Post date:** [May 31, 2012, 3:26pm UTC](https://discourse.chef.io/t/how-to-auth-knife-openstack-with-rackspace-openstack/2805/2 "2012-05-31T15:26:16Z")

</div>

I've done a bit of work on the new Rackspace API (and a lot on  
knife-openstack), it's a little bit different from the OpenStack API.  
I was waiting on one of your fellow Rackers to help me on adding the  
v2 Rackspace API to fog, but I haven't heard back. If you're  
interested in working on this, contact me off list and we'll start a  
conversation about building this.

Thanks,  
Matt Ray  
Senior Technical Evangelist | Opscode Inc.  
[matt@opscode.com](mailto:matt@opscode.com) | (512) 731-2218  
Twitter, IRC, GitHub: mattray

On Wed, May 30, 2012 at 11:15 PM, Cooper Simmons  
[cooper.simmons@gmail.com](mailto:cooper.simmons@gmail.com) wrote:

> Hello all.
> 
> I'm a little confused from the README from  
> knife-openstack: [knife-openstack/README.md at main · chef/knife-openstack · GitHub](https://github.com/opscode/knife-openstack/blob/master/README.md)
> 
> I'm tripped up on the authentication piece and I'm not sure what auth items  
> these refer to:  
> knife[:openstack\_access\_key\_id]  
> knife[:openstack\_secret\_access\_key]  
> knife[:openstack\_api\_endpoint]
> 
> This is the data I get back from my auth post to  
> [https://identity.api.rackspacecloud.com/v2.0/tokens](https://identity.api.rackspacecloud.com/v2.0/tokens)  
> I've excerpted what I thought was relevant, and changed the names to protect  
> the innocent.
> 
> {  
> "endpoints": [  
> {  
> "publicURL": "[https://dfw.servers.api.rackspacecloud.com/v2/123456](https://dfw.servers.api.rackspacecloud.com/v2/123456)",  
> "region": "DFW",  
> "tenantId": "123456",  
> "versionId": "2",  
> "versionInfo": "[https://dfw.servers.api.rackspacecloud.com/v2](https://dfw.servers.api.rackspacecloud.com/v2)",  
> "versionList": "[https://dfw.servers.api.rackspacecloud.com/](https://dfw.servers.api.rackspacecloud.com/)"  
> }  
> ],  
> "name": "cloudServersOpenStack",  
> "type": "compute"  
> }
> 
> "token": {  
> "expires": "2012-05-31T21:18:57.000-05:00",  
> "id": "fe8a9999-999a-99b1-9abc-99e9cd95682c",  
> "tenant": {  
> "id": "id9999",  
> "name": "name99"  
> }  
> },  
> "user": {  
> "id": "654321",  
> "name": "myname",  
> "roles": [  
> {  
> "description": "User Admin Role.",  
> "id": "3",  
> "name": "identity:user-admin"  
> }  
> ]  
> }
> 
> This is the data I think is relevant but I've tried various combinations of  
> these and always get:  
> ERROR: Excon::Errors::Unauthorized: Expected(200) \<=\> Actual(401  
> Unauthorized)
> 
> I'm assuming  
> knife[:openstack\_api\_endpoint] =  
> "[https://dfw.servers.api.rackspacecloud.com/v2/123456](https://dfw.servers.api.rackspacecloud.com/v2/123456)"  
> I was also assuming openstack\_secret\_access\_key is my API key which is not  
> listed above.
> 
> Any info appreciated.  
> Thanks!
