salt icon indicating copy to clipboard operation
salt copied to clipboard

pyopenssl 0.14 requirement in 2015.5.3 does not work in RHEL6 : ZD-364

Open rickh563 opened this issue 11 years ago • 11 comments

#) Reported by User : ZD-364

In 2015.5.3 there seems to be a dependency change on the tls module which breaks in rhel6. It now requires pyopenssl 0.14 and the only version available to rhel6 is 0.10.

Further, pyopenssl 0.14 breaks the rhel6 client tools.

rickh563 avatar Jul 13 '15 20:07 rickh563

Reference: https://github.com/saltstack/salt/pull/24546#issuecomment-121048255

rickh563 avatar Jul 13 '15 21:07 rickh563

This regressed due to https://github.com/saltstack/salt/pull/24546#issuecomment-121048255. @joejulian is now aware of the issue.

terminalmage avatar Jul 13 '15 21:07 terminalmage

I'll need more information. I see no such dependency and the tests all succeed in Centos 6 with pyOpenSSL 0.10.

[root@344bb180d99b salt]# rpm -q pyOpenSSL
pyOpenSSL-0.10-2.el6.x86_64
[root@344bb180d99b salt]# cat /etc/redhat-release 
CentOS release 6.6 (Final)
[root@344bb180d99b salt]# python tests/runtests.py -n unit.modules.tls_test --run-destructive
  • Transplanting configuration files to '/tmp/salt-tests-tmpdir/config'
  • Current Directory: /salt
  • Test suite is running under PID 904
  • Logging tests on /tmp/salt-runtests.log

Starting unit.modules.tls_test Tests

..................
----------------------------------------------------------------------
Ran 18 tests in 2.070s

OK

========================================  Overall Tests Report  ========================================
***  No Problems Found While Running Tests  ************************************************************
========================================================================================================
OK (total=18, skipped=0, passed=18, failures=0, errors=0) 
========================================  Overall Tests Report  ========================================

joejulian avatar Jul 15 '15 17:07 joejulian

https://github.com/saltstack/salt/blob/v2015.5.3/salt/modules/tls.py#L132-L152

terminalmage avatar Jul 15 '15 18:07 terminalmage

The breakage appears to have been introduced in https://github.com/saltstack/salt/pull/23867, so @gladiatr72 may be better-equipped to fix this.

terminalmage avatar Jul 15 '15 18:07 terminalmage

I see where and why. I'll still fix this.

joejulian avatar Jul 15 '15 18:07 joejulian

OK, just as long as the fix isn't just to modify the __virtual__ function... I believe additional functionality was added having to do with X509 extensions, so rather than making the entire module require pyOpenSSL 0.14, we need to have just the new functionality require that version.

terminalmage avatar Jul 15 '15 18:07 terminalmage

Precisely why.

__virtual__ does have to be modified, though, or we'll never get that far. It needs to require at least 0.10 and checks need to be made when using extensions and errors should be raised at that time if extensions are used.

joejulian avatar Jul 15 '15 18:07 joejulian

Yep, I totally agree. Just wanted to make sure we're on the same page. Thanks for taking a look at this, I'm not as familiar with the code and have a backlog I'm trying to get to as it is, your assistance is much appreciated. :smile:

terminalmage avatar Jul 15 '15 18:07 terminalmage

@terminalmage I didn't see the reference to this ticket til after I commented on #23867.

@joejulian I promise that I'm working on my unittest-fu. No tests accompanied this patch set.

My only comment is that the tls module as it stood before was not quite useless unless one had a piece of software that would accept x509 certs w/out extensions. Browsers won't accept them. nginx, httpd and haproxy won't accept them. Java servers too (e.g. F5)

What is the benefit of providing a module that is guaranteed to give output (certs) that is broken?

If the goal of dumping m2crypto has been withdrawn, I'd agree to dedicate some time porting this module over to m2 but the last thing I read was that m2 was a dead end due to the author having no interest in py3. (sad)

gladiatr72 avatar Jul 15 '15 21:07 gladiatr72

I'm a unittest novice myself. The updated patch will have tests.

I agree with what you're saying about useless certs without extensions, but people often require the use of old broken stuff for years after its useful life has expired so who am I to argue. :smiley:

m2 isn't even keeping up with swig and was broken for months. It's poorly managed with the author pointing all development to https://github.com/M2Crypto/M2Crypto then changing his mind without telling anybody. I don't even know what state the PR I submitted is in over there.

joejulian avatar Jul 15 '15 22:07 joejulian