-
Notifications
You must be signed in to change notification settings - Fork 350
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
Support not publicly trusted certificates in built-in component catalog connectors #2912
Support not publicly trusted certificates in built-in component catalog connectors #2912
Conversation
Thanks for making a pull request to Elyra! To try out this branch on binder, follow this link: |
@shalberd wdyt? |
I think this is looking very good, especially with regards to the assumptions. --> (based on trusting separate CAs). Absolutely OK, if organizations have private public key infrastructure (PKI), even two different connectors could use instance A with a certain CA and instance B with another CA. What's more, I tested this with a .crt file in PEM format that not only had one root CA followed by the intermediate CA, but beforehand and afterwards containing many more CAs and intermediate CAs, and the request worked fine. The only thing that was important was that somewhere in the pem file, a root CA followed by an (optional) intermediate CA was present. So even with trust based on multiple root CAs, this approach you propose here works fine and establishes the trust chain. I also like the fact that in your helper function, you simply use Verify=True if the env variable is not present. regarding wording " in secured environments where authenticity can only be validated using private certificates." rather "This PR intentionally does not impose how the environment variable is defined because the best approach depends on how JupyterLab/Elyra is deployed." Agreed, the calling software that embeds Elyra defines how to bring the env-variable into the system. I'd call the env variable TRUSTED_CA_BUNDLE_PATH, but that is nitpicky maybe. I just says that the issue being handled here is optional trust of certificate authorities. |
Is this going to be used only for catalogs? if so, should we use an env var name that indicates that? NOT A CONTRIBUTION |
elyra/pipeline/airflow/package_catalog_connector/airflow_package_catalog_connector.py
Show resolved
Hide resolved
@lresende well, here, it is used for catalog download urls, but the env variable is not about catalogs in and of themselves, but instead about explicit mention of trusted CA bundles as they are often used in airgapped environments, where public trust of SSL CAs is not important and instead private PKIs are used for issuing SSL certificates. Thus my suggestion TRUSTED_CA_BUNDLE_PATH original reason was https://docs.openshift.com/container-platform/4.8/networking/configuring-a-custom-pki.html centrally defined CAs and intermediate CAs injected into a configmap in a namespace opendatahub-io-contrib/jupyterhub-odh#137 (comment) that file in the configmap is then mapped into the location we define with this env. |
I agree. If I was 100% sure that locally stored trusted CA bundles will only be used in the context of catalog connectors in the future, I probably would have favored an implementation that adds an optional property to the connector configurations to avoid the need to introduce a proprietary environment variable. |
@shalberd can you please review the doc updates I've just added? There are the same for all three connectors, e.g. |
Hi @ptitzler the section regarding CA certificates in the documentation is cool that way, yes. Both to the point and technically accurate. |
I am in discussions with jupyterhub-odh (open data hub) team to get an overlay to the Kustomize / KfDef manifests that allows for definition of the path and adding of that env variable in spawned containers, as well as adding the auto-inject configmap containing them pem file into the namespace. Have already opened a pull request in odh-manifests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR enables administrators/users to utilize the HTTP-based built-in catalog connectors (URL catalog, Apache Airflow package connector, Apache Airflow provider package connector) in in secured environments where SSL server authenticity can only be validated using certificates based on private public key infrastructure (PKI) with root and optionally intermediate certificate authorities (CAs) that are not publicly trusted. To accomplish the goal a new environment variable
TRUSTED_CA_BUNDLE_PATH
is introduced, which the built-in catalog connectors utilize as input. See #2797 for motivation.get_verify_parm
method inelyra/util/url.py
currently only utilizes a proprietary environment variableTRUSTED_CA_BUNDLE_PATH
to obtain the local filesystem location for certificates, the intention is to perhaps extend this in the future to also take into account other inputs that might already be defined. A hypothetical example is a JupyterLab configuration setting that might serve a similar purpose.Closes #2797
What changes were proposed in this pull request?
How was this pull request tested?
pytest -v elyra/tests/util/test_url.py
)make docs
Developer's Certificate of Origin 1.1