-
Notifications
You must be signed in to change notification settings - Fork 34
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
Use TLS when Cloning Taxonomy Tree if CACert provided #260
Conversation
Signed-off-by: Giulio Frasca <[email protected]>
As the recommended way to add CA bundles in RHOAI is to add them in the DSCInitialization (in .spec.trustedCABundle.customCABundle) and those bundles are already mounted in the pod running the task, I think the ilab pipeline should follow the same pattern and not use a different configmap to store the certificates Update: discussed on slack: there are other pipeline steps that are also using the same mechanism. For this reason, I think it's fine the approach proposed by this PR for consistency. |
sdg/components.py
Outdated
) | ||
|
||
if use_tls: | ||
full_ca_path = os.path.abspath(f"{taxonomy_ca_cert_path}") |
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.
Optional:
full_ca_path = os.path.abspath(f"{taxonomy_ca_cert_path}") | |
full_ca_path = os.path.abspath(taxonomy_ca_cert_path) |
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.
That variable is actually not a string - i believe its an InputParameterChannel or some other Pipelines construct, which abspath doesnt accept as a string-like type. Because of that, we need to expand it, as casting this specific type if it is None actually expands to the string "None" which would incorrectly pass this check
/hold - container_component does not behave similarly to dsl.components when reading pod environments, need to update implementation |
d076d30
to
1246868
Compare
- Mount teacher-server ConfigMap as volume to git clone task - Provide mount path as env var to git clone task - Check if 'taxonomy-ca.crt' exists in mounted vol - Use TLS if cert exists, otherwise use standard git operations Signed-off-by: Giulio Frasca <[email protected]>
/unhold |
cc @tumido / @Shreyanand / @leseb / @MichaelClifford / et al |
TLS-enabled git operations for Taxonomy
Description
If a CA Cert is provided in the form of a 'taxonomy-ca.crt' in the
teacher-server
ConfigMap, use TLS and said CA Cert to clone and fetch the taxonomy tree.How Has This Been Tested?
To test, using a git repo that is accessed using a self-signed CA cert:
teacher-server
ConfigMap does NOT have a key namedtaxonomy-ca.crt
teacher-server
ConfigMap under the keytaxonomy-ca.crt
Merge criteria: