← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1161778] Re: inconsistent response of authentication with tenant, tenantID and tenantName

 

The only example here that is working properly is tenantName --
"tenantID" should in fact be "tenantId" and "tenant" is simply not
supported (nor has it ever.. is that documented somewhere?).

> According to current keystone document, tenantId is documented as the
example. However the tenantId doesn't work.

The documentation is correct. In your case "tenantID" is simply being
ignored as it's a non-contract attribute and you're getting a 401 when
you specify "admin" as "tenantId" because "admin" is a user-assigned
name, not an ID.

I don't see any bugs here, unless "tenant" is documented as a working
example somewhere.

** Changed in: keystone
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1161778

Title:
  inconsistent response of authentication with tenant, tenantID and
  tenantName

Status in OpenStack Identity (Keystone):
  Invalid

Bug description:
  You will got two different formatted results by using tenant, tenantID or tenantName in keystone authentication.
  According to current keystone document,  tenantId is documented as the example.  However the tenantId doesn't work.
  you should use tenantID (upper case).

  The format of Resp1  is aligned with Resp2, but different from Resp3 which will include additional information such as 
  tenant and serviceCatalog.

  And when you use the token id in Resp1 or Resp2 to access nova api, it will always reported "401 Unauthorized"
  "This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required."

  ==================================================================
  Req1 :  Request by tenant
  curl -d '{"auth":{"passwordCredentials": {"username": "admin", "password": "openstack"}, "tenant": "admin"}}' -H "Content-type: application/json" http://9.123.125.189:5000/v2.0/tokens

  Resp1:
  {"access": {"token": {"issued_at": "2013-03-29T09:31:37.654475", "expires": "2013-03-30T09:31:37Z", "id": "MIICbgYJKoZIhvcNAQcCoIICXzCCAlsCAQExCTAHBgUrDgMCGjCCAUcGCSqGSIb3DQEHAaCCATgEggE0eyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wMy0yOVQwOTozMTozNy42NTQ0NzUiLCAiZXhwaXJlcyI6ICIyMDEzLTAzLTMwVDA5OjMxOjM3WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiBbXSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJlODdlMWI2ZmMwMTg0Y2M0YjM3ZjliOGU1OTE0OTgyZiIsICJyb2xlcyI6IFtdLCAibmFtZSI6ICJhZG1pbiJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogW119fX0xgf8wgfwCAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECBMFVW5zZXQxDjAMBgNVBAcTBVVuc2V0MQ4wDAYDVQQKEwVVbnNldDEYMBYGA1UEAxMPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIGAvLYiEz3f8aMezYlXZdUCKo7umoLcNIarvQOqOqCzBgW7dG+6W5UCizJCmVJ+I1gcWMFzB776xg9gBxLTimAcEi943GHURgaiL4MoCvjB6NK2Iq51vA7Z-ooiYwcVWZMzBtndCYOhO9OTMsjd8SUG1v6GyIdy5j3O8ruaD0fdmL8="}, "serviceCatalog": [], "user": {"username": "admin", "roles_links": [], "id": "e87e1b6fc0184cc4b37f9b8e5914982f", "roles": [], "name": "admin"}, "metadata": {"is_admin": 0, "roles": []}}}

  Req2  : Request by tenantID
  curl -d '{"auth":{"passwordCredentials": {"username": "admin", "password": "openstack"}, "tenantID": "admin"}}' -H "Content-type: application/json" http://9.123.125.189:5000/v2.0/tokens

  Resp2 :
  {"access": {"token": {"issued_at": "2013-03-29T09:32:24.546528", "expires": "2013-03-30T09:32:24Z", "id": "MIICbgYJKoZIhvcNAQcCoIICXzCCAlsCAQExCTAHBgUrDgMCGjCCAUcGCSqGSIb3DQEHAaCCATgEggE0eyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wMy0yOVQwOTozMjoyNC41NDY1MjgiLCAiZXhwaXJlcyI6ICIyMDEzLTAzLTMwVDA5OjMyOjI0WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiBbXSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJlODdlMWI2ZmMwMTg0Y2M0YjM3ZjliOGU1OTE0OTgyZiIsICJyb2xlcyI6IFtdLCAibmFtZSI6ICJhZG1pbiJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogW119fX0xgf8wgfwCAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECBMFVW5zZXQxDjAMBgNVBAcTBVVuc2V0MQ4wDAYDVQQKEwVVbnNldDEYMBYGA1UEAxMPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIGAVYkW93AQ1sEgYpn9NMWIeugXC+fzWmRzR4NagBU7cBf9cIBmfrxoWL2NbwgrWvLz34dUNGhVMCqa-+H4kMKRfsXB-K2ZbruelLfyYd8gQQJ0ArT3YU+vckEvZa1u-hYjQsz9-x22OHfIHAeCerQvCUs9Fm5iYC0iK2jHpTN8U5U="}, "serviceCatalog": [], "user": {"username": "admin", "roles_links": [], "id": "e87e1b6fc0184cc4b37f9b8e5914982f", "roles": [], "name": "admin"}, "metadata": {"is_admin": 0, "roles": []}}}

  Req3 :  Request by tenantName
  curl -d '{"auth":{"passwordCredentials": {"username": "admin", "password": "openstack"}, "tenantName": "admin"}}' -H "Content-type: application/json" http://9.123.125.189:5000/v2.0/tokens

  Resp3:
  {"access": {"token": {"issued_at": "2013-03-29T09:36:23.673473", "expires": "2013-03-30T09:36:23Z", "id": "MIIM4QYJKoZIhvcNAQcCoIIM0jCCDM4CAQExCTAHBgUrDgMCGjCCC7oGCSqGSIb3DQEHAaCCC6sEgguneyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1Z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tQ48OEADfVi-halhHqbu5I-e5VleZFjA==", "tenant": {"description": null, "enabled": true, "id": "3eba50d363494d5a91f3ee902f525cd3", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://9.123.125.189:8774/v2/3eba50d363494d5a91f3ee902f525cd3";, "region": "RegionOne", "internalURL": "http://9.123.125.189:8774/v2/3eba50d363494d5a91f3ee902f525cd3";, "id": "02d1be5d81ba4181a7c04124176c8077", "publicURL": "http://9.123.125.189:8774/v2/3eba50d363494d5a91f3ee902f525cd3"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://9.123.125.189:9696/";, "region": "RegionOne", "internalURL": "http://9.123.125.189:9696/";, "id": "3a40cd7332cf452a8e73f8db4c3fbbd1", "publicURL": "http://9.123.125.189:9696/"}], "endpoints_links": [], "type": "network", "name": "quantum"}, {"endpoints": [{"adminURL": "http://9.123.125.189:3333";, "region": "RegionOne", "internalURL": "http://9.123.125.189:3333";, "id": "2dc88c291f62488c9c61adcc6d25ff15", "publicURL": "http://9.123.125.189:3333"}], "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": "http://9.123.125.189:9292";, "region": "RegionOne", "internalURL": "http://9.123.125.189:9292";, "id": "7aa7eb10e4654e7a913b9de6432f5120", "publicURL": "http://9.123.125.189:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://9.123.125.189:8776/v1/3eba50d363494d5a91f3ee902f525cd3";, "region": "RegionOne", "internalURL": "http://9.123.125.189:8776/v1/3eba50d363494d5a91f3ee902f525cd3";, "id": "22edc89a89e242a19f82f99fadf82299", "publicURL": "http://9.123.125.189:8776/v1/3eba50d363494d5a91f3ee902f525cd3"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://9.123.125.189:8773/services/Admin";, "region": "RegionOne", "internalURL": "http://9.123.125.189:8773/services/Cloud";, "id": "2dbf7ffab3a740f98b44f611edfd25b8", "publicURL": "http://9.123.125.189:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://9.123.125.189:8080";, "region": "RegionOne", "internalURL": "http://9.123.125.189:8080/v1/AUTH_3eba50d363494d5a91f3ee902f525cd3";, "id": "1221441b8a724dcf83bf567f72e03ef2", "publicURL": "http://9.123.125.189:8080/v1/AUTH_3eba50d363494d5a91f3ee902f525cd3"}], "endpoints_links": [], "type": "object-store", "name": "swift"}, {"endpoints": [{"adminURL": "http://9.123.125.189:35357/v2.0";, "region": "RegionOne", "internalURL": "http://9.123.125.189:5000/v2.0";, "id": "9f4626a65b3d4e6095d98e447613957f", "publicURL": "http://9.123.125.189:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "e87e1b6fc0184cc4b37f9b8e5914982f", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["b35c718d319b4f63a3e07909c274e89d"]}}}
  ===============================================================

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1161778/+subscriptions