Coturn Client Certificate with Extended Key Usage (EKU)¶
This section is about how to perform a specific task. If you want to understand how a certain component works, please see Reference
This guide explains how to create and deploy a coturn client certificate with Extended Key Usage (EKU) support for federation DTLS connections. When coturn needs to authenticate with federation partner servers over DTLS on port 9191, the certificate must include both server and client authentication capabilities.
Overview¶
Coturn federation DTLS connections (port 9191) require mutual TLS authentication. Your coturn certificate must be signed by a Certificate Authority (CA) that Wire Cloud trusts. The certificate must include both serverAuth and clientAuth Extended Key Usage (EKU) extensions.
Prerequisites¶
- Coturn deployment via Helm in Kubernetes
- Access to the coturn Helm values configuration
opensslcommand-line tool installed locallykubectlaccess to your cluster- FQDN for your coturn deployment (e.g.,
coturn.example.com) - CA certificate and CA private key — create one in Step 1 if you don't have one yet; once your federation partner (e.g. Wire Cloud) trusts your CA you can reuse it for all future renewals
Deployment Model¶
The typical workflow for a self-managed coturn deployment:
- Select issuing CA (create self-signed or use existing private CA)
- Send your CA to Wire Cloud to add to their federation trust store
- Generate a coturn certificate signed by that CA with serverAuth+clientAuth EKU
- Deploy coturn with the certificate in Helm values
- Renew annually by signing a new certificate with the same CA — no need to contact your federation partner again
Step 1: Create a Self-Signed CA (skip if you already have one)¶
If your organization already has a CA and your federation partners already trusts it, skip to Step 2.
Otherwise, create a self-signed CA. You do this once — the CA is long-lived (10 years) and is reused for all future coturn certificate renewals without needing to contact your federation partners again.
Result: - my-ca.pem — CA certificate; send this to Wire Cloud to add to their federation trust store - my-ca-key.pem — CA private key; keep this secure, it is needed for all future renewals - my-ca.csr — can be deleted
Important: Wait until your federation partner confirms your CA is in their trust store before proceeding.
Step 2: Create a Certificate Signing Request (CSR)¶
First, generate a private key and create a signing request for your coturn certificate.
Verify the CSR:
Step 3: Sign the Certificate with Your CA¶
Using your CA certificate and private key, sign the coturn certificate. This certificate will be valid for 365 days.
Verify the signed certificate:
Step 4: Verify Certificate Has Correct EKU¶
Before deploying, verify that your certificate includes both serverAuth and clientAuth extensions, and is signed by your CA:
Expected output:
Verify the certificate issuer:
Verify the validity dates:
Step 5: Prepare Certificate Files¶
Display the PEM content of your certificate and private key, ready to copy into the Helm values file. The Helm chart encodes them automatically — paste the raw PEM including the -----BEGIN/-----END headers.
Copy both PEM strings for the next step.
Step 6: Update Coturn Helm Values¶
Update your coturn Helm values file (values/coturn/values.yaml) with the PEM certificate and key. Use YAML block scalars (|) to preserve the multi-line PEM format:
Monitor the rollout:
The Helm chart will automatically: 1. Create a Kubernetes Secret with the certificate and key data 2. Mount the certificate in each coturn pod 3. Restart all coturn pods to pick up the new certificate 4. Update Helm release history for tracking and potential rollbacks
Step 8: Verify Certificate is Deployed¶
After the Helm upgrade completes, verify that the certificate is properly mounted in the coturn pods:
Expected output showing both serverAuth and clientAuth:
Step 9: Test Federation DTLS Connection¶
To verify that coturn can now authenticate with federation partners, check the coturn logs:
Look for successful DTLS connection messages or client authentication confirmations in the logs.
Check Helm Release History¶
To verify the chart was updated with your changes:
Troubleshooting¶
Common Diagnostics¶
Commands referenced by multiple sections below:
Certificate Not Loaded in Pod¶
Symptom: Pod starts but certificate is missing or stale.
- Check the Helm secret exists and has data (see Common Diagnostics).
- Inspect the certificate in the pod:
- If the pod still has the old certificate, restart it:
Certificate Missing Client EKU¶
Symptom: DTLS authentication fails with federation partners.
Verify both EKU values are present:
Output must show TLS Web Server Authentication and TLS Web Client Authentication. If not, regenerate following Steps 2–3 and redeploy via Steps 5–7.
Pod Fails to Start (CrashLoopBackOff)¶
Symptom: Pod enters CrashLoopBackOff after Helm upgrade.
- Check pod events and logs (see Common Diagnostics).
- Check for YAML syntax errors:
- If issues persist, rollback:
Helm Upgrade Stuck or Slow¶
Symptom: helm upgrade hangs.
- Check pod status:
- Re-run with a longer timeout:
Certificate Signed by Wrong CA¶
Symptom: Certificate looks valid locally but federation partners can't authenticate.
Check the issuer:
If it doesn't match your CA, regenerate following Steps 2–3 with the correct CA and redeploy via Steps 5–7.
Certificate Renewal¶
Renewal follows the same process as initial deployment (Steps 2–8). Your CA is already trusted by Wire Cloud — no need to notify them again. Plan renewal at least 30 days before expiry:
Then follow Steps 2–8 using your existing my-ca.pem and my-ca-key.pem.
Rollback¶
If something goes wrong, rollback to the previous Helm release:
Related Documentation¶
- Coturn Installation - General coturn setup in wire-server-deploy
- Wire-Server TLS Configuration - TLS certificate management
- Federation Configuration - Understanding federation in Wire