Ask Your Question
0

unable to get auth token in openstack tripleO

asked 2017-07-30 21:36:56 -0600

Hi,

I am trying to obtain auth token on an OpenStack tripleO deployment. I have been following the guide here: https://developer.openstack.org/api-guide/quick-start/api-quick-start.html (https://developer.openstack.org/api-g...)

However, the response header returned shows me "data not shown". I am not sure what must the cause of it. Can somebody guide me on how to obtain the auth token?

   $ curl -s -v -X POST $OS_AUTH_URL/tokens -H "Content-Type: application/json" -d '{"auth": {"tenantName": "'"$OS_PROJECT_NAME"'", "passwordCredentials": {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' | python -m json.tool

* About to connect() to x.x.x.x port 5000 (#0)
*   Trying x.x.x.x...
* Connected to x.x.x.x (x.x.x.x) port 5000 (#0)
> POST /v2.0/tokens HTTP/1.1
> User-Agent: curl/7.29.0
> Host: x.x.x.x:5000
> Accept: */*
> Content-Type: application/json
> Content-Length: 115
> 
} [data not shown]
* upload completely sent off: 115 out of 115 bytes
< HTTP/1.1 200 OK
< Date: Mon, 31 Jul 2017 02:28:08 GMT
< Server: Apache/2.4.6 (Red Hat Enterprise Linux)
< Vary: X-Auth-Token,Accept-Encoding
< x-openstack-request-id: req-d8c6aeb9-1e40-4ecd-9928-9d14b3649d04
< Content-Length: 371
< Content-Type: application/json
< 
{ [data not shown]
* Connection #0 to host x.x.x.x left intact
{
    "access": {
        "metadata": {
            "is_admin": 0,
            "roles": []
        },
        "serviceCatalog": [],
        "token": {
            "audit_ids": [
                "2dDjqfTOQIi0tCcUfxXsgQ"
            ],
            "expires": "2017-08-01T02:28:08Z",
            "id": "a343965ff84d49f2ad810b72a69ab906",
            "issued_at": "2017-07-31T02:28:08.146157Z"
        },
        "user": {
            "id": "d5cfb2b27dff4f848b0f5dbb6ebabd1b",
            "name": "admin",
            "roles": [],
            "roles_links": [],
            "username": "admin"
        }
    }
}
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-30 23:36:15 -0600

Here is your token:

"token": {
    "audit_ids": [
        "2dDjqfTOQIi0tCcUfxXsgQ"
    ],
    "expires": "2017-08-01T02:28:08Z",
    "id": "a343965ff84d49f2ad810b72a69ab906",
    "issued_at": "2017-07-31T02:28:08.146157Z"
},

I believe that the line "data not shown" is due to the curl -v option. If you are curious what this data is, try the --trace-ascii or --trace options (I learned this from google).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-07-30 21:36:56 -0600

Seen: 39 times

Last updated: Jul 30 '17