cyberark / conjur-authn-k8s-client

Authentication sidecar for Conjur Kubernetes integration.
https://www.conjur.org
Apache License 2.0
11 stars 14 forks source link

Fix Docker-based builds to work on CyberArk NG laptops #437

Closed diverdane closed 2 years ago

diverdane commented 2 years ago

Background: On CyberArk dev laptops, golang module dependencies are downloaded with a corporate proxy in the middle. For these connections to succeed we need to configure the proxy CA certificate in build containers.)

Desired Outcome

Docker-based build of the conjur-authn-k8s images (using ./bin/build) works on a CyberArk NG laptop.

Currently, this build fails when Go modules (new dependencies) are being loaded on CyberArk dev laptops, since this is done with a corporate proxy at the corporate network edge. The Docker containers used for this build do not natively have the CyberArk CA certificate loaded in their trusted certificate store, so the connection fails with an unknown certificate error.

Implemented Changes

When builds are run on CyberArk NG laptops, the corporate CA cert is downloaded using the security find-certificate ... command. The Dockerfile has been changed to load the directory where the certificate is copied (this will be an empty directory on non-CyberArk laptops, but the CA cert isn't needed there), and build any certificates from that directory into the build containers CA cert trust.

Connected Issue/Story

N/A

Definition of Done

Changelog

Test coverage

Documentation

Behavior

Security