Skip to content
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

fix: enabling npm artifacts repo process update (rhdevdocs-5035) #2640

Merged
merged 18 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ apiVersion: v1
metadata:
name: tls-cer
annotations:
controller.devfile.io/mount-path: /home/user/certs
controller.devfile.io/mount-path: /public-certs
controller.devfile.io/mount-as: file
labels:
controller.devfile.io/mount-to-devworkspace: 'true'
controller.devfile.io/watch-secret: 'true'
data:
tls.cer: >-
__<Base64_encoded_content_of_public_cert>__ <1>
nexus.cer: >-
<Base64_encoded_content_of_public_cert>__ <1>
----
<1> Base64 encoding with disabled line wrapping.

Expand All @@ -51,7 +51,9 @@ metadata:
controller.devfile.io/mount-to-devworkspace: 'true'
controller.devfile.io/watch-configmap: 'true'
data:
NODE_EXTRA_CA_CERTS: /home/user/certs/tls.cer
NPM_CONFIG_REGISTRY: >-
https://__<npm_artifact_repository_route>__/repository/npm-all/
----

include::partial$proc_disabling-self-signed-certificate-validation.adoc[leveloffset=+1]
include::partial$proc_restoring-node-extra-ca-certs-variable-value.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[id="disabling-self-signed-certificate-validation"]
= Disabling self-signed certificate validation

Run the command below to disable SSL/TLS, bypassing the validation of your self-signed certificates. Note that this is a potential security risk. For a better solution, configure a self-signed certificate you trust with `NODE_EXTRA_CA_CERTS`.

.Procedure

* Run the following command in the terminal:
+
[source, yaml]
----
npm config set strict-ssl false
----
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[id="restoring-node-extra-ca-certs-variable-value"]
= Configuring NODE_EXTRA_CA_CERTS to use a certificate

Use the command below to set NODE_EXTRA_CA_CERTS to point to where you have your SSL/TLS certificate.

.Procedure

* Run the following command in the terminal:
+
[source, bash]
----
`export NODE_EXTRA_CA_CERTS=/public-certs/nexus.cer` <1>
deerskindoll marked this conversation as resolved.
Show resolved Hide resolved
`npm install`
----
<1> `/public-certs/nexus.cer` is the path to self-signed SSL/TLS certificate of Nexus artifactory.