Custom Certificates
You can upload a custom certificate that you have issued from a third-party certificate authority to the Secret Manager. To do this, you need:
- the primary certificate for the domain;
- private key;
- optional: one or more intermediate certificates. Intermediate certificates bind the final TLS certificate to the root certificate authority, it is used by the browser to verify the authenticity of the issued TLS certificate;
- optional: root certificate — part of the key that certificate authorities use to sign a TLS certificate. May be required when using self-signed certificates.
Add a custom certificate
Control panel
Terraform
-
A user certificate is valid only in the project to which it was added. Make sure that you are in the right project. To do this, open the projects menu (name of the current project) and select the project.
-
In the Control Panel, on the top menu, click Products and select Secrets Manager.
-
In the Secrets Manager section, open the Certificates tab.
-
Click Add Certificate.
-
Select Custom Certificate.
-
Enter the name of the certificate.
-
Insert the primary certificate for the domain. It must start with
-----BEGIN CERTIFICATE-----
and end with-----END CERTIFICATE-----
. -
Insert the private key. It must start with
-----BEGIN PRIVATE KEY-----
and end with-----END PRIVATE KEY-----
. -
Optional: To add an intermediate certificate, check the Add intermediate certificate checkbox and in the Intermediate certificate field, paste the certificate. It must start with
-----BEGIN CERTIFICATE-----
and end with-----END CERTIFICATE-----
.If you want to add multiple intermediate certificates, make sure that all certificates (the primary certificate for the domain, the intermediate certificates, and the root certificate) create a complete chain. The
Issuer
value of the primary certificate must match theSubject
value of the first intermediate certificate, theIssuer
value of the first intermediate certificate must match theSubject of
the second intermediate certificate, and so on.Intermediate certificates can be added to the Intermediate Certificate field in any order, it is important to use the full chain.
-
Optional: To add a root certificate, check the Add Root Certificate checkbox and in the Root Certificate field, paste the certificate. It must start with
-----BEGIN CERTIFICATE-----
and end with-----END CERTIFICATE-----
. -
Click Add.
Use the Add Certificate instructions in the Terraform documentation.
Update the user certificate
-
In the Control Panel, go to Cloud Platform → Secrets Manager.
-
Open the Certificates tab.
-
From the menu of the certificate, select Refresh.
-
Insert the primary certificate for the domain. It must start with
-----BEGIN CERTIFICATE-----
and end with-----END CERTIFICATE-----
. -
Insert the private key. It must start with
-----BEGIN PRIVATE KEY-----
and end with-----END PRIVATE KEY-----
. -
Optional: To add an intermediate certificate, check the Add intermediate certificate checkbox and in the Intermediate certificate field, paste the certificate. It must start with
-----BEGIN CERTIFICATE-----
and end with-----END CERTIFICATE-----
.If you want to add multiple intermediate certificates, make sure that all certificates (the primary certificate for the domain, the intermediate certificates, and the root certificate) create a complete chain. The
Issuer
value of the primary certificate must match theSubject
value of the first intermediate certificate, theIssuer
value of the first intermediate certificate must match theSubject of
the second intermediate certificate, and so on.Intermediate certificates can be added to the Intermediate Certificate field in any order, it is important to use the full chain.
-
Optional: To add a root certificate, check the Add Root Certificate checkbox and in the Root Certificate field, paste the certificate. It must start with
-----BEGIN CERTIFICATE-----
and end with-----END CERTIFICATE-----
. -
Click Refresh.