-
Notifications
You must be signed in to change notification settings - Fork 167
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
unsupported cipher algorithm (rc4) breaks winrm and anything using it on Windows (test-kitchen, kitchen-azurerm, kitchen-vagrant, ...) #148
Comments
Hi I am also my testing environment on my local virtualbox that is running Openshift platform and a defined my github account a webhook and to communicate both them configure ultrahook but there is a redirect traffic from payload url to private unsecure (https.//private_network/8443/oapi/v1/names paces/third/buildconfigs/php/webhooks/4f940a9e-6281-4f08-9386-a1ccfeb12bca/githu b) but i have get a ruby openssl issue as below D:/Ruby24-x64/lib/ruby/2.4.0/openssl/buffering.rb:182:in There is any workaroud solution on ruby ? Thank you |
#50 is about the default configuration used by OpenSSL::SSL::SSLContext#set_params and has nothing to do with OpenSSL::Cipher. To my best knowledge, the error "unsupported cipher algorithm" indicates the OpenSSL library linked in has no RC4 support. What does running @emre141 Please open a new issue for separate problems. |
|
It seems that running openssl on a terminal has no effect on what is used by rubyntlm (via Ruby), since it is using a different version of openssl.so which has the RC4 cipher disabled in it. |
Hi mirogta Thanks for your answer.What is your suggestion there is any workaround to using rubyntlm? to using RC4 There is anything to doing on openshift server side or rubyntlm side ? Thanks |
|
Currently we have no workaround, because we've moved to Puppet 5/Ruby 2.4. We have only little knowledge of NTLM to try to re-implement rubyntlm with another cipher - we've just tried to change the hard-coded RC4 to something else and it didn't work. If a cipher is removed from openssl, it would be great to give backwards compatible support by some kind of configuration override. Puppet 1.10 / Ruby 2.3.3
Puppet 5.1 / Ruby 2.4.1
|
rhenium so could you clarify how can i use any workaround or it is not any workaround? I have not enough knowledge about ruby/openssl could you show me step by step that i would be applied if it is a solution? Thanks |
@rhenium - Thank you for the update. I have found openssl.so in Ruby folder, but can't find libcrypto.so. Any clue on how to "inject" RC4 support back to it? We've found out that there is a list of ciphers in We've even tried to add this piece of code to it:
So that However that has no effect during runtime. When we run
|
Hi After i have changed it below mentioned do i recompile ruby or if it is require any recompile? if it is ok how can i recomple it? And also if it not just when i restart my shell is enough? |
Yes i changed it and i have got the same error. |
It looks like the OpenSSL library used by Ruby/OpenSSL has no RC4 support -- it is likely disabled at compile-time. I guess you have to recompile OpenSSL with RC4 support (i.e., remove
As I said in my first comment, it is only effective for OpenSSL::SSL::SSLContext#set_params which Ruby/NTLM does not use. |
@emre141 I can't help you without more information. The Errno::ECONNRESET error usually indicates that the HTTP server forcibly closed the TCP connection without sending a close_notify alert. Anyway, it's an irrelevant topic. Please open a new issue at https://github.com/ruby/openssl/issues/new, preferably with a script so I can reproduce myself. |
@mirogta @rhenium |
@glennsarti - thank you, this is very useful. I've ask Puppet to look into that on that changeset. |
@mirogta FYI - https://tickets.puppetlabs.com/browse/PA-1712 . That's to re-enable RC4 |
@mirogta A little more context. At the time one of our (Puppets) security engineers removed RC4 from our custom OpenSSL build in Puppet 5, it was during a security audit for insecure cipher support. Since RC4 is considered weak and is not recommended any longer, it was removed. It wasn't realized that RC4 was in use for NTLM connectivity over WinRM / HTTP as there isn't anything natively in Puppet or its tools that builds NTLM messages directly. We recently discovered this ourselves given our new task running tool, Bolt, consumes the same As @glennsarti mentioned, we're re-adding to our custom OpenSSL / Ruby stack and should have it addressed in upcoming Z releases of Puppet. Sorry we didn't catch this sooner! |
@Iristyle Thank you for the update |
Since this will be fixed in one of the upcoming Puppet releases and it's in a custom OpenSSL build only, this issue can be closed. |
Looks like the issue has been fixed in puppet-agent 5.3.4 (released on 2018/02/05) |
Hi,
I appreciate removal of the unsecure cipher RC4 as part of #50 - Remove RC4.
Unfortunately it has dire consequences, because it broke heaps of workflows since usage of RC4 cipher is hard-coded in
https://github.com/WinRb/rubyntlm/blob/master/lib/net/ntlm/client/session.rb
...and even if we change it to something "sane" like "aes-128-gcm" it just doesn't work.
It took us tremendous effort to get to the bottom of this, because of red herring errors leading nowhere and if you google "unsecure cipher algorithm (RC4)" you don't really get useful answers. Finally I've found the message is triggered here:
https://github.com/ruby/openssl/blob/b3825945d11dd2f18f9f3b07a7a2b61b7b752591/ext/openssl/ossl_cipher.c
Please, can you help? Since the rubyntlm project looks dead, I was wondering if you could add a backward compatible support to re-enable RC4 cipher when specified, so that it stays disabled by default but we can enable it when we actually need to use it? Otherwise we can throw away years of development on Test-Kitchen with WinRM.
Since this would be used only to connect from a local development box to another local development box running in e.g. Vagrant VM, we don't really care if we use unsecure RC4 algorithm, but we do care that our code and workflows we've developed over the years keeps working.
Unfortunately our team is in no way ready to start hacking openssl, rubyntlm or winrm gems to make it work by ourselves.
Thank you
The text was updated successfully, but these errors were encountered: