2.9 KiB
| title | weight |
|---|---|
| Configure Internal TLS communication between Harbor Component | 30 |
By default, The internal communication between Harbor's component (harbor-core,harbor-jobservice,proxy,harbor-portal,registry,registryctl,trivy_adapter,clair_adapter,chartmuseum) use HTTP protocol which might not be secure enough for some production environment. Since Harbor v2.0, TLS can be used for this internal network. In production environments, always use HTTPS is a recommended best practice.
This functionality is introduced via the internal_tls in harbor.yml file. To enabled internal TLS, set enabled to true and set the dir value to the path of directory that contains the internal cert files.
All certs can be automatically generated by prepare tool.
docker run -v /:/hostfs goharbor/prepare:v2.0 gencert -p /path/to/internal/tls/cert
User also can provide their own CA to generate the other certs. Just put certificate and key of the CA on internal tls cert directory and name them as harbor_internal_ca.key and harbor_internal_ca.crt.
Besides, a user can also provide the certs for all components. However, there are some constraints for the certs:
- First, all certs must be signed by a single unique CA
- Second, the filename of the internal cert and
CNfield on cert file must follow the convention listed below'name usage CN harbor_internal_ca.keyca's key file for internal TLS N/A harbor_internal_ca.crtca's certificate file for internal TLS N/A core.keycore's key file N/A core.crtcore's certificate file corejob_service.keyjob_service's key file N/A job_service.crtjob_service's certificate file jobserviceproxy.keyproxy's key file N/A proxy.crtproxy's certificate file proxyportal.keyportal's key file N/A portal.crtportal's certificate file portalregistry.keyregistry's key file N/A registry.crtregistry's certificate file registryregistryctl.keyregistryctl's key file N/A registryctl.crtregistryctl's certificate file registryctlnotary_server.keynotary_server's key file N/A notary_server.crtnotary_server's certificate file notary-servernotary_signer.keynotary_signer's key file N/A notary_signer.crtnotary_signer's certificate file notary-signertrivy_adapter.keytrivy_adapter.'s key file N/A trivy_adapter.crttrivy_adapter.'s certificate file trivy-adapterclair.keyclair's key file N/A clair.crtclair's certificate file clairclair_adapter.keyclair_adapter's key file N/A clair_adapter.crtclair_adapter's certificate file clair-adapterchartmuseum.keychartmuseum's key file N/A chartmuseum.crtchartmuseum's certificate file chartmuseum