[openstack-dev] [horizon] Project Switcher not working

Rahul Sharma rsharma at contrailsystems.com
Fri Nov 30 00:49:22 UTC 2012


Hi,
I recently updated my complete setup using devstack. With this keystone was also updated. Subsequently, I noticed that the project switcher is not working.

Somehow the authorised_tenants from openstack_auth/users.py is not populated with tenant_list giving an exception. It seems that the token is not accepted by keystone.

tenant_list does work from projects page though.

Mimicking what happens in authorised_tenants list setter:

curl -d '{"auth":{"passwordCredentials":{"username": "admin", "password": "admins"}}}' -H "Content-type: application/json" http://localhost:35357/v2.0/tokens

{"access": {"token": {"issued_at": "00:39:08.647947", "expires": "2012-12-01T00:39:08Z", "id": "MIICOAYJKoZIhvcNAQcCoIICKTCCAiUCAQExCTAHBgUrDgMCGjCCAREGCSqGSIb3DQEHAaCCAQIEgf97ImFjY2VzcyI6IHsidG9rZW4iOiB7Imlzc3VlZF9hdCI6ICIwMDozOTowOC42NDc5NDciLCAiZXhwaXJlcyI6ICIyMDEyLTEyLTAxVDAwOjM5OjA4WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiB7fSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICIzNzY4NjJkMjI1NWE0NjVjYmY3YzI1YjljN2ZlYjA2NSIsICJyb2xlcyI6IFtdLCAibmFtZSI6ICJhZG1pbiJ9fX0xgf8wgfwCAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECBMFVW5zZXQxDjAMBgNVBAcTBVVuc2V0MQ4wDAYDVQQKEwVVbnNldDEYMBYGA1UEAxMPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIGAG86SH5VMuHo-v0sPEuAjdQvZQquEzxrdMeRdykiMdR1mhISm9D2F+fkLOi+Y3Owt6oI3vsdeZmGP6BMF21w5KJmDIeatKroGJ-nsCoZHnycQZSOOtsqoV4ux8h5PIWuEvvKX3XUmffUuSyHtkA+9w8oWYZSz-7qhD57GSyAHurQ="}, "serviceCatalog": {}, "user": {"username": "admin", "roles_links": [], "id": "376862d2255a465cbf7c25b9c7feb065", "roles": [], "name": "admin"}}}


curl -H  "X-Auth-Token:MIICOAYJKoZIhvcNAQcCoIICKTCCAiUCAQExCTAHBgUrDgMCGjCCAREGCSqGSIb3DQEHAaCCAQIEgf97ImFjY2VzcyI6IHsidG9rZW4iOiB7Imlzc3VlZF9hdCI6ICIwMDozOTowOC42NDc5NDciLCAiZXhwaXJlcyI6ICIyMDEyLTEyLTAxVDAwOjM5OjA4WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiB7fSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICIzNzY4NjJkMjI1NWE0NjVjYmY3YzI1YjljN2ZlYjA2NSIsICJyb2xlcyI6IFtdLCAibmFtZSI6ICJhZG1pbiJ9fX0xgf8wgfwCAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECBMFVW5zZXQxDjAMBgNVBAcTBVVuc2V0MQ4wDAYDVQQKEwVVbnNldDEYMBYGA1UEAxMPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIGAG86SH5VMuHo-v0sPEuAjdQvZQquEzxrdMeRdykiMdR1mhISm9D2F+fkLOi+Y3Owt6oI3vsdeZmGP6BMF21w5KJmDIeatKroGJ-nsCoZHnycQZSOOtsqoV4ux8h5PIWuEvvKX3XUmffUuSyHtkA+9w8oWYZSz-7qhD57GSyAHurQ=" http://localhost:35357/v2.0/tenants
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Not Authorized"}}


While if I pick up token id from Horizon logs and use it for keystone, then it works from shell and also horizon itself.

-
Rahul
















More information about the OpenStack-dev mailing list