-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: add custom ca certificate support for pongo image #632
base: master
Are you sure you want to change the base?
Conversation
I've only tested on macOS, should try e.g. WSL2, ubuntu, amzn... |
Oh it's failing all code coverage also |
PONGO_CUSTOM_CA_CERT | ||
set this to the absolute path of a custom CA to add to the | ||
container's truststore | ||
|
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.
Since this is added in the container build, I think this should go in the help-docs of the pongo build
command.
For example: | ||
|
||
```sh | ||
$ PONGO_CUSTOM_CA_CERT="$(pwd)/zscaler-root.crt" pongo up |
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.
this is a bad example I think, though it would probably work if the container image still needs to be build.
So I think the example should have 2 commands;
- the build command including the flag for CA certs
- the run command without the flags (to indicate clearly they are in the image)
msg "custom CA is set: $PONGO_CUSTOM_CA_CERT" | ||
cp "$PONGO_CUSTOM_CA_CERT" "$LOCAL_PATH/custom_ca.crt" | ||
else | ||
echo -n '' > "$LOCAL_PATH/custom_ca.crt" |
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.
can't we add it in some less visisble location?
@tysoekong wdyt; should the cert be added in the build stage (and become part of the created image), or should it be added while doing a pongo run/shell? (eg. upon container instantiation) |
This allows pongo to add a custom CA into the container image's OS truststore during the build/up.
It allows the user to add e.g. their employer's traffic inspection CA.
It makes these all works, when running behind e.g. Zscaler: