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

Ejson secret base64 encoding issue #196

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

alexcurtin
Copy link

@alexcurtin alexcurtin commented Oct 31, 2017

This PR is to address issue #192 .

As Kubernetes >= 1.8 requires the yaml to no longer have a \n in it, we'll need to utilize Ruby's Base64.strict_encode64() to encode with no new lines. @KnVerey

# irb
:007 > str = "aooajsdjadad"
 => "aooajsdjadad"
 :008 > Base64.encode64(str)
 => "YW9vYWpzZGphZGFk\n"
 :009 > Base64.strict_encode64(str)
 => "YW9vYWpzZGphZGFk"

Docs: http://ruby-doc.org/stdlib-2.4.2/libdoc/base64/rdoc/Base64.html#method-i-strict_encode64

@alexcurtin alexcurtin changed the title ejson secret base64 encoding issue Ejson secret base64 encoding issue Oct 31, 2017
@jshapiro26
Copy link

I've made these changes locally as well and can confirm it has resolved this issue for me.

@KnVerey KnVerey requested a review from stefanmb October 31, 2017 19:26
Copy link
Contributor

@KnVerey KnVerey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Normally I'd request a regression test, but a local run shows several existing tests would fail on v1.8 without this patch (and we'll have 1.8 CI really soon!).

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

Successfully merging this pull request may close these issues.

4 participants