Certificate Authority 🔐
The project operates its own Certificate Authority (CA) to simplify secure communications while maintaining high security standards.
Security Considerations
- 🔒 HTTPS encryption is mandatory for all communications
- 🌍 Public CA certificates can't validate private IPs
- ⚠️ User-provided certificate installation creates security risks
Supported Certificate Types 📜
- 🌐 Private Webhook Certificate - Secure local network webhook endpoints
- 🖥️ Private Server Certificate - Encrypt private server communications
How to Use 🛠️
Method Comparison
Feature | CLI Method 🖥️ | API Method 🌐 |
---|---|---|
Difficulty | Easy | Medium |
Customization | No | Available |
Automation | Full | Manual |
Recommended For | Most users ✅ | CI/CD pipelines 🤖 |
-
📥 Download Tool
Getsmsgate-ca
for your OS -
🔧 Generate Certificate
--out
and--keyout
are optional with defaultserver.crt
andserver.key
-
🔐 Install Certificates
-
🔑 Generate Key Pair
-
📝 Create Config
server.cnf[req] distinguished_name = req_distinguished_name x509_extensions = v3_req prompt = no [req_distinguished_name] CN = 192.168.1.10 # (1)! [v3_req] keyUsage = nonRepudiation, digitalSignature, keyEncipherment extendedKeyUsage = serverAuth subjectAltName = @alt_names [alt_names] IP.0 = 192.168.1.10
- Replace
192.168.1.10
with your private IP
- Replace
-
📋 Generate CSR
-
📨 Submit CSR
jq -n --arg content "$(cat server.csr)" '{content: $content}' | \ curl -X POST \ -H "Content-Type: application/json" \ -d @- \ https://ca.sms-gate.app/api/v1/csr
You will receive a Request ID in the response.
-
🕒 Check Status
- Replace
REQ_12345
with your Request ID
- Replace
-
📥 Save Certificate
When the request is approved, the certificate content will be provided in thecertificate
field of the response. Save the certificate content to the fileserver.crt
. -
🔐 Install Certificate
Install theserver.crt
andserver.key
(from step 1) files to the server.
Full API documentation is available here.
Limitations ⚠️
The Certificate Authority service has the following limitations:
- 🔐 Only issues certificates for private IP ranges:
- ⏳ Certificate validity: 1 year
- 📛 Maximum 1
POST
request per minute
Migration Notice 🚨
Self-signed certificates will be deprecated after v2.0 release. It is recommended to use the project's CA instead.
Migration checklist:
- Replace self-signed certs before v2.0 release
- Update automation scripts to use CLI tool or API
- Rotate certificates every 1 year
FAQ ❓
Why don't I need to install CA on devices?
The root CA certificate is already embedded in the app ( 1.31+)
Certificate issuance failed?
Ensure your IP matches private ranges and hasn't exceeded quota