cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shanker Balan <shanker.ba...@shapeblue.com>
Subject CloudMonkey and URL Encoded password string
Date Thu, 05 Dec 2013 11:19:13 GMT
Helo,

I having a bit of a bother with this command:

[root@csman1-1 ~]# cloudmonkey add host zoneid=1d2b7f7e-8a44-4c2f-840c-41b8eab715ff
clusterid=fe96dd24-ba3d-4a3f-be2a-f0792113200b hypervisor=XenServer
podid=55d1abca-8094-434d-81e7-ead9ac32faf6 url=http://vxen1-1.lan username=root
password=pass*word
^^^^^^^^^^^^^^^^^^
Unauthorized: None

2013-12-05 16:40:19,369 INFO  [cloud.api.ApiServer] (catalina-exec-3:null)
0:0:0:0:0:0:0:1 -- GET apiKey=22Bj8f2SE4GCIrUexHLD3fvaRgbiQ4wWhp6zr2Ac1s-6v5q_u1dOSiwxlPL1_IvkqsWebYn86UoZLYgOb6EeUQ&clusterid=fe96dd24-ba3d-4a3f-be2a-
f0792113200b&command=addHost&hypervisor=XenServer&password=pass%2Aword&podid=
55d1abca-8094-434d-81e7-ead9ac32faf6&response=json&url=http%3A%2F%2Fvxen1-1.lan&username=root&zoneid=1d2b7f7e-8a44-4c2f-840c-41b8eab715ff&signature=m8j0nnQQ%2B%2BhCnsHmPRx2UdpN46I%3D
401 unable to verify user credentials and/or request signature

It seems that CloudMonkey URL encoding the password field is breaking
the sig - pass*word is being encoded as "password=pass%2Aword”. %2A being
the HTML escape code for “*” char.

cloudmonkey/requester.py:
    request_url = "&".join(["=".join([r[0], urllib.quote_plus(str(r[1]))])
                           for r in request])

Any suggestions as to how I can get CloudMonkey to not the encode
the password field?

Regards.

--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560
055

This email and any attachments to it may be confidential and are intended solely for the use
of the individual to whom it is addressed. Any views or opinions expressed are solely those
of the author and do not necessarily represent those of Shape Blue Ltd or related companies.
If you are not the intended recipient of this email, you must neither take any action based
upon its contents, nor copy or show it to anyone. Please contact the sender if you believe
you have received this email in error. Shape Blue Ltd is a company incorporated in England
& Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated
under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated
in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Mime
View raw message