Skip to content

Instantly share code, notes, and snippets.

@HugoKuo
Created August 30, 2018 03:09
Show Gist options
  • Save HugoKuo/0dd79fbeba48c01feea2cc0aa4588fa4 to your computer and use it in GitHub Desktop.
Save HugoKuo/0dd79fbeba48c01feea2cc0aa4588fa4 to your computer and use it in GitHub Desktop.
Keystone response JSON body
root@keystone:~/keystone_install# curl -d '{"auth":{"passwordCredentials":{"username": "swiftstack", "password": "password"},"tenantName":"SS"}}' -H "Content-type: application/json" http://localhost:5000/v2.0/tokens | python -mjson.tool
{
"access": {
"metadata": {
"is_admin": 0,
"roles": [
"9fe2ff9ee4384b1894a90878d3e92bab",
"d76174a6eb80428bba3227c9b0ff1da6"
]
},
"serviceCatalog": [
{
"endpoints": [
{
"adminURL": "http://192.168.22.100/v1",
"id": "5cade8d6834041f5b3f05dce5477fc3a",
"internalURL": "http://192.168.56.61/v1/KEY_dc33723072f1497c94ed6ce5496d5676",
"publicURL": "http://192.168.56.61/v1/KEY_dc33723072f1497c94ed6ce5496d5676",
"region": "RegionOne"
},
{
"adminURL": "http://192.168.56.71/v1/KEY_dc33723072f1497c94ed6ce5496d5676",
"id": "a9b8fb9b93334bdcb9cccacce1a048b8",
"internalURL": "http://192.168.56.71/v1/KEY_dc33723072f1497c94ed6ce5496d5676",
"publicURL": "http://192.168.56.71/v1/KEY_dc33723072f1497c94ed6ce5496d5676",
"region": "mbp2"
}
],
"endpoints_links": [],
"name": "swift",
"type": "object-store"
},
{
"endpoints": [
{
"id": "41481be963584108a12a35131dbf197d",
"publicURL": "http://192.168.56.22:9292",
"region": "regionOne"
}
],
"endpoints_links": [],
"name": "glance",
"type": "image"
},
{
"endpoints": [
{
"adminURL": "http://192.168.56.23:35357/v2.0",
"id": "25e270e03b0d426fa83d2e09372c721b",
"internalURL": "http://localhost:35357/v2.0",
"publicURL": "http://192.168.56.23:35357/v2.0",
"region": "RegionOne"
}
],
"endpoints_links": [],
"name": "keystone",
"type": "identity"
}
],
"token": {
"audit_ids": [
"ccAO8v_3SKyP4zMgQEmyyQ"
],
"expires": "2018-08-30T04:08:19.538746Z",
"id": "gAAAAABbh1-jexHsbVxnzbRv6SByN8UR2ZUYlN67XPmArw_gQ3O3txEttKN4vPkQFUtzN90dppu39J9xCeeUeJMJMASP25bDTu6KunG8zulD7V5ZaOXSUhRMsl5R2c8Hqhn-7UewSfERYoXSqBfe2_ILUaUYDEFsuRq-dMBxh2Ac-WXNP80RGmk%3D",
"issued_at": "2018-08-30T03:08:19.000000Z",
"tenant": {
"description": "Test Project SS",
"enabled": true,
"id": "dc33723072f1497c94ed6ce5496d5676",
"name": "SS",
"parent_id": null
}
},
"user": {
"description": "Test User",
"email": "swiftstack@test.com",
"enabled": true,
"id": "cf3c82c70747444e807e80489516c48d",
"name": "swiftstack",
"roles": [
{
"name": "_member_"
},
{
"name": "swift-user"
}
],
"roles_links": [],
"username": "swiftstack"
}
}
}
root@keystone:~/keystone_install# curl -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"domain":{"name":"default"},"name":"swiftstack","password":"password"}}},"scope":{"project":{"domain":{"name":"default"},"name":"SS"}}}}' -H "Content-type: application/json" http://localhost:5000/v3/auth/tokens | python -mjson.tool
{
"token": {
"audit_ids": [
"fO6Z9VtOQdm-_UOvmu-x8A"
],
"catalog": [
{
"endpoints": [
{
"id": "25e270e03b0d426fa83d2e09372c721b",
"interface": "internal",
"region": "RegionOne",
"region_id": "RegionOne",
"url": "http://localhost:35357/v2.0"
},
{
"id": "b45f4a3974654b73a16d34f228d38456",
"interface": "admin",
"region": "RegionOne",
"region_id": "RegionOne",
"url": "http://192.168.56.23:35357/v2.0"
},
{
"id": "d546cb845ba74a52b5b9b7a40cce0a7e",
"interface": "public",
"region": "RegionOne",
"region_id": "RegionOne",
"url": "http://192.168.56.23:35357/v2.0"
}
],
"id": "801f4dac40954ebaa8bdcc0d628a1923",
"name": "keystone",
"type": "identity"
},
{
"endpoints": [
{
"id": "41481be963584108a12a35131dbf197d",
"interface": "public",
"region": "regionOne",
"region_id": "regionOne",
"url": "http://192.168.56.22:9292"
}
],
"id": "d0cc77a284b9405dbc6ba4e178172c3f",
"name": "glance",
"type": "image"
},
{
"endpoints": [
{
"id": "5cade8d6834041f5b3f05dce5477fc3a",
"interface": "admin",
"region": "RegionOne",
"region_id": "RegionOne",
"url": "http://192.168.22.100/v1"
},
{
"id": "a9b8fb9b93334bdcb9cccacce1a048b8",
"interface": "internal",
"region": "mbp2",
"region_id": "mbp2",
"url": "http://192.168.56.71/v1/KEY_dc33723072f1497c94ed6ce5496d5676"
},
{
"id": "bd81ec025d5f44ff80c209886cbe398a",
"interface": "public",
"region": "RegionOne",
"region_id": "RegionOne",
"url": "http://192.168.56.61/v1/KEY_dc33723072f1497c94ed6ce5496d5676"
},
{
"id": "c71a5721de7841ab91d68449dfa2f6f2",
"interface": "admin",
"region": "mbp2",
"region_id": "mbp2",
"url": "http://192.168.56.71/v1/KEY_dc33723072f1497c94ed6ce5496d5676"
},
{
"id": "d42105a0541547d3afdd2e88e04c6a07",
"interface": "internal",
"region": "RegionOne",
"region_id": "RegionOne",
"url": "http://192.168.56.61/v1/KEY_dc33723072f1497c94ed6ce5496d5676"
},
{
"id": "f1607d1271a74c799fc4ed1f5230494a",
"interface": "public",
"region": "mbp2",
"region_id": "mbp2",
"url": "http://192.168.56.71/v1/KEY_dc33723072f1497c94ed6ce5496d5676"
}
],
"id": "eabf0f70950945ce9adc6f59096df7c6",
"name": "swift",
"type": "object-store"
}
],
"expires_at": "2018-08-30T04:07:14.452713Z",
"extras": {},
"issued_at": "2018-08-30T03:07:14.452754Z",
"methods": [
"password"
],
"project": {
"domain": {
"id": "default",
"name": "Default"
},
"id": "dc33723072f1497c94ed6ce5496d5676",
"name": "SS"
},
"roles": [
{
"id": "9fe2ff9ee4384b1894a90878d3e92bab",
"name": "_member_"
},
{
"id": "d76174a6eb80428bba3227c9b0ff1da6",
"name": "swift-user"
}
],
"user": {
"domain": {
"id": "default",
"name": "Default"
},
"id": "cf3c82c70747444e807e80489516c48d",
"name": "swiftstack"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment