GCP
certificate error
SSL
troubleshooting
cloud computing

Error certificate signed by unknown authority after switching GCP project

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Causes and Implications of the "Certificate Signed by Unknown Authority" Error

Switching between Google Cloud Platform (GCP) projects sometimes triggers the "certificate signed by unknown authority" error, especially when using tools like gcloud, Kubernetes, Docker, or any application within GCP infrastructure. This error often frustrates users by disrupting workflow and requiring immediate resolution to continue operations.

Understanding this issue requires a comprehensive analysis of its origins and potential impacts, which this article seeks to provide.

Technical Background

SSL/TLS Certificates

SSL/TLS certificates ensure secure communications over networks. These certificates establish trust between two entities by verifying identity through digital signatures provided by trusted Certificate Authorities (CAs). When a certificate issued does not have this chain of trust, it might prompt an error like "certificate signed by unknown authority."

Why the Error Occurs

Typically, this error appears due to one of the following reasons:

  1. Improper Configuration: When switching GCP projects, the associated services might still be referencing SSL/TLS certificates configured for another project.
  2. Outdated Root Certificates: Systems might not recognize a CA if their root certificates are outdated or missing.
  3. Self-signed Certificates: In development or testing scenarios, self-signed certificates are common. These aren’t linked to a trusted CA, hence triggering the error.
  4. Intermediate CA Issues: Missing or misconfigured intermediate certificates could prevent the SSL/TLS handshake from correctly validating the certificate chain.

Identifying the Problem

Before resolving this error, identifying which system component is causing the issue is essential. Key areas to inspect include:

  • Kubernetes: Check if cluster configuration references certificates from another project.
  • Docker: Ensure Docker daemon trusts the SSL/TLS certificates provided by the external registry.
  • gcloud CLI: Validate that the CLI's configurations, such as core/project or SSL settings, match the intended project.

Solutions and Workarounds

Resolving a "certificate signed by unknown authority" error varies depending on the root cause. Here are common solutions:

  1. Update Trusted Certificates: Ensure updated CA certificates on all systems where the error manifests.
    • Use tools such as openssl to analyze the certificate and its chain:
    • List installed root certificates on Linux:
    • Logs may provide insights into specific certificate errors:

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.