Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do we escape "+" characters in the authorization token? #11

Open
dsboulder opened this issue Jun 15, 2015 · 3 comments
Open

Why do we escape "+" characters in the authorization token? #11

dsboulder opened this issue Jun 15, 2015 · 3 comments

Comments

@dsboulder
Copy link

My company uses vCD server 5.5.3 (with non-ldap local auth) and we're attempting to use this library against it. The server sometimes returns base64 encoded tokens with "+" characters in it, and the library URI encodes them to %2B. But the vCD server rejects those tokens as invalid. If I remove the gsub call the ruby gem works perfectly. I was wondering how this works with vCloudAir and I discovered those tokens are pure hex and never contain a "+". Can someone safely remove the .gsub() call in connection.rb so that this library works with vCD 5.5.3 as configured by us?

Here's the code snippet that's questionable (line 40):

        unless @cookies["vcloud-token"].gsub!("+", "%2B").nil?
@dsboulder
Copy link
Author

@louis-lam represents our IT department. We tried going directly to the vCD server (bypassing the LB) and got the same issue with tokens containing a "+" in them.

@evanchsa
Copy link
Contributor

The SDK isn't following the vCloud API authentication pattern. It's relying on an undocumented cookie. We're going to remove the cookie processing entirely and follow the documented authentication procedure.

@dsboulder
Copy link
Author

That sounds great; but we are broken right now. Is there any timeline you guys have in mind? Can we remove the + in the meantime?

Sent from my iPhone

On Jun 16, 2015, at 9:11 AM, Stephen Evanchik [email protected] wrote:

The SDK isn't following the vCloud API authentication pattern. It's relying on an undocumented cookie. We're going to remove the cookie processing entirely and follow the documented authentication procedure.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants