salt icon indicating copy to clipboard operation
salt copied to clipboard

[2015.5.3-2] salt-winrepo.git/salt-minion.sls fails certificate '*.wpengine.com' or 'wpengine.com'

Open getabc opened this issue 11 years ago • 24 comments

Trying to upgrade my test minion with the following command,

salt '*.ktm.*' pkg.install 'salt-minion' version=2015.8.0rc2

and system reported

MinionError: Error: The certificate was invalid. Error returned was: CertificateError("hostname 'docs.saltstack.com' doesn't match either of '*.wpengine.com', 'wpengine.com'",)

changed salt-winrepo.git/salt-minion.sls links from https to http

salt-minion:
  2015.8.0rc2:
    installer: 'http://docs.saltstack.com/downloads/Salt-Minion-2015.8.0rc2-AMD64-Setup.exe'
    full_name: 'Salt Minion v2015.8.0rc2'
    reboot: False
    install_flags: '/S'
    uninstaller: 'C:\salt\uninst.exe'
    uninstall_flags: '/S'
    refresh: true

and works - any reason https is failing? -AC

getabc avatar Aug 03 '15 08:08 getabc

@getabc, thanks for the report. @jacobhammons, @TheBigBear, @twangboy, any ideas on this?

jfindlay avatar Aug 03 '15 18:08 jfindlay

@jfindlay @getabc this sounds like a network or client problem. Some sort of https proxy that re-wrote the link and/or intercepted traffic. I just checked the https for the docs.saltstack.com site and is perfectly ok.

Some AV or firewall or Internet security software do this. What do you get as the sls certificate info from that minion, when you look at the details of the https padlock?

But the other point is, the salt-minion update for windows doesn't work. I shoul get around to fixing it. For now you have to use some additional magic around it. Have a look at issue #24594 https://github.com/saltstack/salt/issues/24594

TheBigBear avatar Aug 03 '15 20:08 TheBigBear

@getabc does this link give you any hints? http://wpengine.com/support/why-am-i-seeing-a-certificate-error-for-wpengine-com/ Are you loading the salt-minion installer from your own Wordpress site?

TheBigBear avatar Aug 03 '15 21:08 TheBigBear

Is this related to the fact that Salt bundles Python 2.7.8 for Windows (see #25440), but TLS SNI is only 'natively' supported by requests in Python >= 2.7.9 (without adding a bunch of 3rd-party dependencies) (see https://www.python.org/dev/peps/pep-0466/) ?

cheers, Tim

tbaker57 avatar Aug 04 '15 01:08 tbaker57

@TheBigBear no, using the docs.saltstack.com as per sls file

getabc avatar Aug 04 '15 02:08 getabc

@getabc try changing to the following url: https:/saltstackdocs.wpengine.com/downloads/Salt-Minion-2015.8.0rc2-AMD64-Setup.exe

twangboy avatar Aug 04 '15 02:08 twangboy

@twangboy yip, that worked perfectly.

getabc avatar Aug 04 '15 05:08 getabc

@getabc It's a problem on our end. We're in the process of migrating to another location.

twangboy avatar Aug 04 '15 15:08 twangboy

Related: https://github.com/saltstack/salt/issues/25567

twangboy avatar Aug 04 '15 19:08 twangboy

For now I have swapped out the DL URLs of salt-minion for windows see PR https://github.com/saltstack/salt-winrepo/pull/380 see also #25961 #25567 #25440

TheBigBear avatar Aug 05 '15 08:08 TheBigBear

Possibly related to #24317.

jfindlay avatar Aug 05 '15 16:08 jfindlay

@TheBigBear We've started migrating everything over to repo.saltstack.com/windows We've created an archive folder for everything older than 2014.7. I know you just changed a bunch of sls files to point to the wpengine site. Sorry.

twangboy avatar Aug 05 '15 17:08 twangboy

@twangboy no problem. I will create a new PR to move them to that new location. ;-) Should I merge it right away, or let it sit ready for you or somebody else to merge it, when you are ready?

TheBigBear avatar Aug 05 '15 18:08 TheBigBear

@TheBigBear You can merge right away.

twangboy avatar Aug 05 '15 18:08 twangboy

@twangboy, OK done. ;-)

I had a comment on the now merged and closed PR https://github.com/saltstack/salt-winrepo/pull/383

So I repeat the two questions here.

@twangboy @UtahDave ok the old salt-minion sls files are all ported over to the new site and all URLs have been tested. This PR is ready for merging whenever you guys want to switch over to the new repo site.

Comments: However the 2015.5.3 release did not appear on the new site, even though it was on the old docs.saltstack.com/downloads, so I removed it, especially seeing that 2015.5.3-2 is still there anyway, is that OK?

At a quick glance I think there are more files in the new repo in the 'archive' section than used to be on the old site.

I have not bothered to add every single one of them to the new salt-minion files, but can do that if needed/wanted?

TheBigBear avatar Aug 05 '15 19:08 TheBigBear

@twangboy @UtahDave ok, I think the SSL setup/config on repo.saltstack.com needs some further tweaking.

wget reports:

wget -v -m -r -l 1 -i new-salt-minion-files.txt 1>/dev/null 
--2015-08-05 20:52:28--  https://repo.saltstack.com/windows/
Resolving repo.saltstack.com (repo.saltstack.com)... 162.242.171.9
Connecting to repo.saltstack.com (repo.saltstack.com)|162.242.171.9|:443... connected.
GnuTLS: A TLS warning alert has been received.
GnuTLS: received alert [112]: The server name sent was not recognized
ERROR: The certificate of ‘repo.saltstack.com’ is not trusted.
ERROR: The certificate of ‘repo.saltstack.com’ hasn't got a known issuer.

I think the wget errors are caused by the fact that the server's certificate chain is incomplete, the issuer part is missing so the trust path is not complete.

And SSL Labs testing only gives it a poor 'C' rating. https://www.ssllabs.com/ssltest/analyze.html?d=repo.saltstack.com by comparison the old wordpress site achieved a 'A-' https://www.ssllabs.com/ssltest/analyze.html?d=docs.saltstack.com

ssl report - repo saltstack com 162 242 171 9 summary ssl report - docs saltstack com 45 33 31 154 summary

Here are the full archives of the current status of the SSL config & setup: https://drive.google.com/folderview?id=0B3RwjIf1K0a5fnU2OTY5SGN0MU9sZXBFTWYwdU5DTFB1U3BqQ3oxZi1JWnhHWDZLVkVzTmc&usp=sharing

I have not done any testing using the windows winrepo python 2.7.8, as yet.

TheBigBear avatar Aug 05 '15 20:08 TheBigBear

@TheBigBear There was a problem with the 2015.5.3 build, so it was rebuilt (same tag) with the desired behavior and a -2 was added. The original build 2015.5.3 should not have been up there. I removed it.

Regarding the archive folder, I did not delete or add anything. I moved everything that is no longer supported into that folder, anything below 2014.7.

I also would recommend removing anything older than 2014.1 from the software definition (.sls) file as well.

twangboy avatar Aug 05 '15 20:08 twangboy

OK, done in merged PR https://github.com/saltstack/salt-winrepo/pull/384

TheBigBear avatar Aug 05 '15 20:08 TheBigBear

@twangboy is anybody going to look at https://github.com/saltstack/salt/issues/25961#issuecomment-128131435 by myself above? Who is the webmaster or responsible for the SSL setup & config on the repo.saltstack.com machine? Maybe I can ping them on the issue? Or should I create a new issue for it?

TheBigBear avatar Aug 05 '15 20:08 TheBigBear

@TheBigBear @UtahDave will have to address those issues.

twangboy avatar Aug 05 '15 20:08 twangboy