I'm runnig Bazel remote cache from https://github.com/buchgr/bazel-remote inside docker, by runnig the following commands to start the http and grpc server:
docker pull buchgr/bazel-remote-cache
docker run -u 1000:1000 -v /path/to/cache/dir:/data -p 9093:8080 -p 9094:9092 buchgr/bazel-remote-cache
So far I can run some tests from my client by running one of the following commands:
bazelisk test --remote_cache=http://<SERVER_IP>:<SERVER_PORT> <TEST_TARGET>
bazelisk test --remote_cache=grpc://<SERVER_IP>:<SERVER_PORT> <TEST_TARGET>
But when I put my server to run over TLS by adding the following flags to the server invocation:
-v /path/to/certificate_authority:/etc/bazel-remote/ca_cert
-v /path/to/server_cert:/etc/bazel-remote/server_cert
-v /path/to/server_key:/etc/bazel-remote/server_key
--tls_ca_file=/etc/bazel-remote/ca_cert
--tls_cert_file=/etc/bazel-remote/server_cert
--tls_key_file=/etc/bazel-remote/server_key
Although I created a root CA certificate to sign both my server's and clients' certificates, I'm not able to access my server via https or grpcs. The following errors are being raised for https:
avax.net.ssl.SSLHandshakeException: General OpenSslEngine problem
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
And the following for grpcs:
javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem
java.security.cert.CertificateException: No subject alternative names present
ERROR: Failed to query remote execution capabilities: General OpenSslEngine problem
Is this problem related to the fact the root CA certificate is self signed itself or am I doing something else stupid?
I used the very same commands from the following link: https://github.com/bazelbuild/bazel/blob/master/src/test/testdata/test_tls_certificate/README.md