Decouple certificate CN from device_id
- ca.sign_csr's identity parameter renamed to `common_name`, fully decoupled from device_id. - New resolve_common_name(): CN comes from the device's own CSR: falls back to device_id only if the CSR has no CN (malformed request). - Renewal unaffected: a renewed cert always keeps the CN of the device's current, still-valid cert, regardless of what the renewal CSR claims (verified against an adversarial CSR asserting a different CN). - device_id remains the sole storage key (pending/issued/revoked) and MQTT topic routing key, and must still be unique per physical device even when CN is deliberately shared across many. - /api/pending and /api/issued now also expose the CSR-resolved CN for display, without changing what's actually stored. No topic structure changes. No new MQTT payload fields.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: "MQTT Certificate Manager"
|
||||
version: "0.4.1"
|
||||
version: "0.4.2"
|
||||
slug: "mqtt_cert_manager"
|
||||
description: "Local CA that issues and manages TLS client certificates for MQTT nodes"
|
||||
url: "https://gitea.viratak.com/bitopa/mqtt-cert-manager"
|
||||
@@ -42,7 +42,7 @@ options:
|
||||
mqtt_password: ""
|
||||
request_topic_prefix: "cert/enroll"
|
||||
cert_validity_days: 825
|
||||
broker_hostnames: "homeassistant.local,192.168.1.80"
|
||||
broker_hostnames: "homeassistant.local,192.168.1.80,core-mosquitto,localhost"
|
||||
renewal_window_days: 30
|
||||
cert_organization: "Viratak Telecommunications"
|
||||
cert_organizational_unit: "Cloudihome"
|
||||
|
||||
Reference in New Issue
Block a user