equinor / ert

ERT - Ensemble based Reservoir Tool - is designed for running ensembles of dynamical models such as reservoir models, in order to do sensitivity analysis and data assimilation. ERT supports data assimilation using the Ensemble Smoother (ES), Ensemble Smoother with Multiple Data Assimilation (ES-MDA) and Iterative Ensemble Smoother (IES).
https://ert.readthedocs.io/en/latest/
GNU General Public License v3.0
103 stars 107 forks source link

Simplify setting of `CONAN_CACERT_PATH` #2401

Closed dafeda closed 2 years ago

dafeda commented 2 years ago

https://github.com/equinor/ert/blob/359872ed722c0cb5c0ee08bdb2af731cd009fe7a/setup.py#L7-L15

Can we simplify this to @dotfloat :

if "CONAN_CACERT_PATH" not in os.environ: 
    os.environ["CONAN_CACERT_PATH"] = "/etc/pki/tls/cert.pem"
pinkwah commented 2 years ago

Ye. It was over-engineered in case we need to add more platforms. In hindsight, very unnecessary.

sondreso commented 2 years ago

I think @lars-petter-hauge experienced this on a managed Mac on the internal network as well, so we might need more platforms.

lars-petter-hauge commented 2 years ago

That is true, I simply worked outside of the internal network for that day (before returning to the dungeon that is home office).

I can dig up the path to the certificates on my managed mac..

I'm not familiar on the topic of certs on a mac, but not sure if it's as easy as pointing to a file path. Typically one would use the keychain manager to access certificates.

pinkwah commented 2 years ago

Oof yeah that could get a bit nasty on a mac... :/

lars-petter-hauge commented 2 years ago

I'll ask and see :)

pinkwah commented 2 years ago

After a cursory glance at the requests library, it seems to just use the certify package, which is provides the Mozilla certificates just like on Linux. The first step should be to check whether other Python packages work.

It is also possible to create your own cacert.pem with security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain ^1

dafeda commented 2 years ago

Can we close this @pinkwah , @lars-petter-hauge ?

pinkwah commented 2 years ago

You opened the issue. You can also close it.