Skip to main content

Certificates

Certificates are used across Otoroshi for TLS termination, mTLS, JWT token signing and verification, and more. All generated and imported certificates are managed in a central store and can be referenced by routes, backends, auth modules, and other entities.

UI page

You can find all certificates here

The available actions from the UI are:

  • Add item: Manually add an existing certificate (e.g., from a PEM file)
  • Let's Encrypt certificate: Request a certificate from Let's Encrypt for a given hostname
  • Create certificate: Issue a new certificate signed by an existing Otoroshi CA
  • Import .p12 file: Load a PKCS#12 file as a certificate

Properties

PropertyTypeDefaultDescription
idstringUnique identifier of the certificate
namestringDisplay name of the certificate
descriptionstringDescription
chainstringPEM-encoded certificate chain (full chain)
privateKeystringPEM-encoded private key (can be empty for trust-only certificates)
caRefstringnullReference to the CA certificate that signed this certificate
domainstring"--"Primary domain of the certificate
selfSignedbooleanfalseWhether the certificate is self-signed
cabooleanfalseWhether this certificate is a Certificate Authority
validbooleanfalseWhether the certificate is currently valid (not expired, not revoked)
exposedbooleanfalseIf true, the public key is exposed on /.well-known/jwks.json
revokedbooleanfalseWhether the certificate has been revoked
autoRenewbooleanfalseAuto-renew the certificate when it expires (requires a known CA and private key)
letsEncryptbooleanfalseCertificate was issued by Let's Encrypt
clientbooleanfalseThis certificate is a client certificate (used for mTLS authentication)
keypairbooleanfalseThis entity is a key pair (public + private key, without a certificate chain)
subjectstring"--"Subject DN of the certificate
fromnumberValidity start date (timestamp in milliseconds)
tonumberValidity end date (timestamp in milliseconds)
sansarray of string[]Subject Alternative Names (additional hostnames/IPs covered by this cert)
passwordstringnullPassword protecting the private key (optional)
tagsarray of string[]Tags
metadataobject{}Key/value metadata

Certificate creation

From Let's Encrypt

PropertyDescription
hostThe hostname to request the certificate for

Let's Encrypt must be enabled in the Global Config with a valid ACME server URL.

From an existing CA

When creating a certificate from an Otoroshi CA:

PropertyDescription
IssuerThe CA certificate used to sign the new certificate
CA certificateIf enabled, the new certificate will be a CA itself
Client certificateIf enabled, the certificate will be used for client authentication
Include A.I.AInclude Authority Information Access URLs in the certificate
Key TypeType of the private key (RSA, EC)
Key SizeSize of the private key (2048, 4096, etc.)
Signature AlgorithmAlgorithm used to sign the certificate
Digest AlgorithmDigest algorithm used
ValidityHow long the certificate will be valid
Subject DNSubject Distinguished Name
HostsHostnames covered by the certificate (added to SAN)

JSON example

{
"id": "cert_api_example_com",
"name": "api.example.com",
"description": "TLS certificate for the public API",
"chain": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"privateKey": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----",
"caRef": "cert_internal_ca",
"domain": "api.example.com",
"selfSigned": false,
"ca": false,
"valid": true,
"exposed": false,
"revoked": false,
"autoRenew": true,
"letsEncrypt": false,
"client": false,
"keypair": false,
"subject": "CN=api.example.com",
"from": 1710000000000,
"to": 1741536000000,
"sans": ["api.example.com", "*.api.example.com"],
"password": null,
"tags": ["production"],
"metadata": {}
}

Admin API

GET    /api/certificates           # List all certificates
POST /api/certificates # Create/import a certificate
GET /api/certificates/:id # Get a certificate
PUT /api/certificates/:id # Update a certificate
DELETE /api/certificates/:id # Delete a certificate
PATCH /api/certificates/:id # Partially update a certificate

Additional endpoints:

GET  /api/certificates/:id/valid   # Check certificate validity
POST /api/certificates/_renew # Trigger certificate renewal
  • Routes - Routes use certificates for TLS termination
  • Backends - Backend targets can use client certificates for mTLS
  • Auth Modules - OIDC/OAuth modules can use certificates for provider communication
  • JWT Verifiers - Key pairs can be used for JWT signing and verification