core: fix custom CA certs in modules + add integ test coverage #7356
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A recent commit that changed client IDs to be random again accidentally made it so that commands run to update CA certificates (when a custom engine has those installed) hit errors about client tokens not matching when the exec being run was nested, which includes module function calls.
This was due to the fact that those commands run in the same container with the same client ID but the secret token was generated by the client each time it ran, which resulted in mismatches.
The fix here just updates those extra CA commands to never be nested execs since there's no purpose in that anyways and it's nothing but overhead.
This was missed because I forgot to include integ tests that invoke module functions amongst all the other many tests that were added for custom CA support. Those have been added now for go, python and typescript.
When adding the test for typescript functions, I also learned that nodejs will by default only use a CA bundle compiled into the node binary. So this also updates the typescript SDK to tell nodejs to use the system CAs instead (while also making sure they include the default Mozilla CA set, which is what nodejs is compiled with anyways).