concourse / concourse-chart

Helm chart to install Concourse
Apache License 2.0
145 stars 176 forks source link

GitHub Resource through TLS MITM proxy #293

Closed rrileyca closed 2 years ago

rrileyca commented 2 years ago

Question: How can you use a Git Resource through a TLS MITM/proxy?

We have a corporate firewall that does TLS inspection (github.com is effectively signed by a custom CA). Any task with a git-resource fails with the error (redacted repo/project name):

fatal: unable to access 'https://github.com/myrepo/myproject': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

I have tried:

I have verified the certificate signature I am adding is valid with using the CA bundle from the log and also the certificate as a standalone:

Curiously, without specifiying a -CAfile the openssl s_client -connect fails with Verify return code: 21 (unable to verify the first certificate) error.

Additionally, if I look inside the /concourse-work-dir/volumes/live/${UUID}/volume/etc/ssl/certs/ folders, none of my certs are in here including the ones provided in the secrets.workerAdditionalCerts value.

rrileyca commented 2 years ago

I have resolved this.

As per Concourse documentation, certificate propagation is done by default in the BOSH deployment but not in the helm chart.

The helm chart must include (assuming the worker.certsPath is /etc/ssl/certs):

worker:
  certsPath: /etc/ssl/certs
  env:
    - name: CONCOURSE_CERTS_DIR
      value: /etc/ssl/certs

Edit: Added link to documentation