Certificates
Certificates
Section titled “Certificates”Brane uses X.509 certificates for mutual TLS authentication between nodes. Each worker domain has its own certificate authority (CA) and issues certificates to verify identity during data transfers.
Certificate Types
Section titled “Certificate Types”| Certificate | Purpose | Generated By |
|---|---|---|
CA certificate (ca.pem) | Root of trust for a domain | branectl generate certs |
Server certificate (server.pem) | Proves domain identity to incoming connections | branectl generate certs server |
Client certificate (client-id.pem) | Proves identity when connecting to another domain | branectl generate certs client |
Generating Server Certificates
Section titled “Generating Server Certificates”Every worker node needs a CA and server certificate. Generate both at once:
branectl generate certs -f -p ./config/certs server <LOCATION_ID> -H <HOSTNAME>Parameters:
<LOCATION_ID>— Your domain’s unique identifier<HOSTNAME>— The hostname other nodes use to reach you
Example:
branectl generate certs -f -p ./config/certs server hospital-a -H hospital-a.example.comThis creates:
./config/certs/ca.pem— Your CA certificate (share with the central node)./config/certs/server.pem— Your server certificate (keep private)
Generating Client Certificates
Section titled “Generating Client Certificates”Client certificates allow one domain to authenticate to another when downloading data. Generate them from the domain that will be receiving the connection:
cd ./config/certsbranectl generate certs client <CLIENT_LOCATION_ID> -H <CLIENT_HOSTNAME> -f -p ./client-certsExample: Domain hospital-a generates a client certificate for hospital-b:
branectl generate certs client hospital-b -H 192.0.2.2 -f -p ./client-certsShare the resulting ca.pem and client-id.pem files with hospital-b.
Distributing Certificates
Section titled “Distributing Certificates”Central Node
Section titled “Central Node”The central node needs each worker’s CA certificate:
- Receive
ca.pemfrom each worker - Create a directory per worker in
./config/certs/ - Place each worker’s
ca.pemin the corresponding directory
mkdir -p ./config/certs/hospital-acp hospital-a-ca.pem ./config/certs/hospital-a/ca.pemWorker Nodes
Section titled “Worker Nodes”Workers that need to exchange data with other workers need client certificates from those domains:
mkdir -p ./config/certs/hospital-bcp hospital-b-ca.pem ./config/certs/hospital-b/ca.pemcp hospital-b-client-id.pem ./config/certs/hospital-b/client-id.pemCertificate Security
Section titled “Certificate Security”- Keep server certificates and private keys secure. Never share them.
- Share only
ca.pemfiles with the central node. - Client certificates grant access. Treat them like passwords. If a client certificate is compromised, revoke the user’s permissions through the policy system rather than regenerating all certificates.
- Rotate certificates periodically for production deployments.
Troubleshooting
Section titled “Troubleshooting”“Certificate verification failed”
- Ensure the
ca.pemin the central node’s cert directory matches the worker’s CA - Verify that the hostname in the certificate matches the actual hostname
“No client certificate found”
- Check that client certificates are in the correct directory under
config/certs/<domain_id>/ - Verify file names are exactly
ca.pemandclient-id.pem