Re: URL-safe base64 encoding for keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 07/03/2012 05:35 PM, Tommi Virtanen wrote:
On Tue, Jul 3, 2012 at 5:22 AM, Wido den Hollander <wido@xxxxxxxxx> wrote:
CloudStack's API expects a URI to be passed when adding a storage pool,
e.g.:

addStoragePool?uri=rbd://user:cephxkey@xxxxxxxxxxxx/poolname

If 'cephxkey' contains a / the URI parser in Java fails (java.net.URI) and
splits the URI in the wrong place.

First, I actually agree with you -- urlsafe b64 just makes sense. We'd
have to go through some sort of a transition period, accepting both,
perhaps generating old-style, for some time.


My thoughts exactly.

Second, have you tried quoting the unsafe characters? / is %2f, + is
%2b, % is %25.

Yes, I have thought about that, but it would mean extra docs in the CloudStack API docs.

Warning: Please URL-encode your cephx secret since it may contain invalid characters

In the WebGUI (which talks to the API) I could do a URL-encode in JavaScript and do the decode again in the CloudStack management server, but it's not what you want.

So yes, that has crossed my mind, but for now I took the easy way out and generated myself a new key which doesn't contain slashes.

Wido

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux