🚧 Update certificate management

This commit is contained in:
Jonas Bengtsson
2026-09-19 17:12:58 +02:00
parent 111d6cc390
commit a16a01b1e7
21 changed files with 1128 additions and 37 deletions
+4
View File
@@ -173,6 +173,10 @@ class Certificate(Base):
parent_id: Mapped[uuid.UUID | None] = mapped_column(
ForeignKey("certificates.id", ondelete="SET NULL")
)
# server|client — client certificates are bound to MQTT identities.
cert_type: Mapped[str] = mapped_column(String(20), default="server")
# MQTT client identity this certificate authenticates (client certs).
username: Mapped[str | None] = mapped_column(String(100), index=True)
key_algorithm: Mapped[str] = mapped_column(String(20), default="ecdsa-p256")
serial_number: Mapped[str] = mapped_column(String(64), unique=True, index=True)
dns_sans: Mapped[list] = mapped_column(JSON, default=list)