Add read-only NPM certificate discovery

This commit is contained in:
Lyncoln
2026-09-19 15:05:54 -04:00
parent e2cf88f161
commit 9d571ada24
5 changed files with 171 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
from dataclasses import dataclass
from datetime import datetime
@dataclass(frozen=True)
class CertificateIdentity:
"""
Cluster identity for a certificate.
NPM numeric IDs are intentionally excluded because they are node-local.
"""
domains: tuple[str, ...]
@property
def key(self) -> str:
return ",".join(self.domains)
@dataclass(frozen=True)
class CertificateState:
"""
Non-secret certificate state suitable for discovery, comparison, and logs.
"""
identity: CertificateIdentity
local_id: int
provider: str
nice_name: str
valid_from: datetime | None
expires_on: datetime | None
cluster_managed: bool
acme_renew: bool
dns_challenge: bool
source: str