All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wido den Hollander <wido@widodh.nl>
To: Tommi Virtanen <tv@inktank.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: URL-safe base64 encoding for keys
Date: Tue, 03 Jul 2012 21:18:51 +0200	[thread overview]
Message-ID: <4FF3459B.1050708@widodh.nl> (raw)
In-Reply-To: <CADvuQRERYhuFiz07Kp_YxOo_ya6-jACJ3X2gNihp=5F83BJQiQ@mail.gmail.com>



On 07/03/2012 05:35 PM, Tommi Virtanen wrote:
> On Tue, Jul 3, 2012 at 5:22 AM, Wido den Hollander <wido@widodh.nl> wrote:
>> CloudStack's API expects a URI to be passed when adding a storage pool,
>> e.g.:
>>
>> addStoragePool?uri=rbd://user:cephxkey@monitor.addr/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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


  reply	other threads:[~2012-07-03 19:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 12:22 URL-safe base64 encoding for keys Wido den Hollander
2012-07-03 15:00 ` Florian Haas
2012-07-03 15:04   ` Yehuda Sadeh
2012-07-03 17:23     ` Florian Haas
2012-07-03 17:25       ` Yehuda Sadeh
2012-07-03 15:35 ` Tommi Virtanen
2012-07-03 19:18   ` Wido den Hollander [this message]
2012-07-04 12:46   ` [PATCH] Generate URL-safe base64 strings " Wido den Hollander
2012-07-04 15:16     ` Sage Weil
2012-07-04 16:10       ` Wido den Hollander
2012-07-04 16:18         ` Sage Weil
2012-07-05 13:31           ` Wido den Hollander
2012-07-05 14:31             ` Sage Weil
2012-07-06  8:48               ` Wido den Hollander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FF3459B.1050708@widodh.nl \
    --to=wido@widodh.nl \
    --cc=ceph-devel@vger.kernel.org \
    --cc=tv@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.