Build support for 'additional' CA certs #748
Replies: 4 comments 2 replies
-
If I understand you correctly, maybe using the mTLS options would work for you? https://docs.npmjs.com/cli/v10/configuring-npm/npmrc#auth-related-configuration |
Beta Was this translation helpful? Give feedback.
-
These certs aren't used for authentication but SSL signing of web traffic through an NTLM proxy that requires a trusted root certificate (and intermediaries) in order to work. The problem is that you either have to inject an environment variable which requires tweaking all automated or manual runtime commands or manage the full NPM CA cert which we really don't want to have to take on. Our registry actually used AWS certs so ironically, we literally need the un-scoped CA cert to be updated instead. |
Beta Was this translation helpful? Give feedback.
-
Is NTLM a windows thing? That is what google is telling me, just making sure I understand the issue. I have no opposition to your request, but am guessing if you really need this you will need to find a workaround on the short to medium term. |
Beta Was this translation helpful? Give feedback.
-
Sorry, yes locally it's a windows system-level proxy but even in our build agents which are Linux based we have the same issue. Our proxies handle traffic with a rewritten cert so they can inspect HTTPS traffic so we need a single new CA added but this isn't doable unless you use the environment variable or have a setup where you can associate a CA cert with a specific registry. The workaround for now is to continue to ignore SSL verification but it's really far from ideal. We can't be alone - there are many corporate proxies out there and many large companies insist on internally-hosted repository proxies which handle security scanning, usage attribution and alerting when there's a violation. |
Beta Was this translation helpful? Give feedback.
-
NPM has a really handy CLI option - NODE_EXTRA_CA_CERTS but no matching option in .npmrc. We need to add additional certificates to the chain so we can secure our internal registry lookups but this isn't possible without one of the following:
We have numerous projects and all kinds of manual and automated workflows where individually adding this configuration is really not viable. If the CLI tool can append additional CA certificates temporarily to the runtime, why can't that be done in a way that can be stored just as part of the project?
Beta Was this translation helpful? Give feedback.
All reactions