feat: guard certificate orders for custom domains and explain the setup
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / test (pull_request) Successful in 8m21s
ci / lint (pull_request) Successful in 11m0s
ci / build (pull_request) Canceled after 8m49s
ci / image (pull_request) Canceled after 0s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / test (pull_request) Successful in 8m21s
ci / lint (pull_request) Successful in 11m0s
ci / build (pull_request) Canceled after 8m49s
ci / image (pull_request) Canceled after 0s
Status page servers order certificates on demand. Verified domains were already the only ones they would order for, but nothing bounded how many: an organization switching domains, or many organizations at once, could use up the CA's rate limits that all servers sharing an ACME account depend on, and every handshake or request for a made-up name was passed on to the API. - Before a new order (not a renewal) the server asks the API (POST /agent/v1/certificates). It allows verified domains of pages that server serves, within limits per domain and day, per organization and day, and per ACME account owner and hour (UPTIME_CERTS_*), counted across all instances. - An organization can set a new custom domain at most 10 times a day. - The server remembers names without a page for a minute and passes at most 20 unknown names a second on to the API; pages the sync cached are not affected. Only real pages are recorded as visited. - The page editor explains the three steps: the TXT record, the CNAME record with the platform's status page host as its target (or the organization's own servers), apex domains, and when HTTPS follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
7509b8c429
commit
db36d918fe
18 files changed
+787
-161
No files matched your search
@@ -104,7 +104,25 @@ type API struct {
|
||||
// RegionAlertAfter is how long a region with monitors may have no live
|
||||
// checker before its admins or owners are told; 0 disables it.
|
||||
RegionAlertAfter time.Duration `env:"UPTIME_REGION_ALERT_AFTER" envDefault:"5m"`
|
||||
Retention Retention
|
||||
// Certificates bounds the certificates status page servers may order
|
||||
// for custom domains.
|
||||
Certificates Certificates
|
||||
Retention Retention
|
||||
}
|
||||
|
||||
// Certificates limits new ACME orders for custom domains, so neither one
|
||||
// organization nor a flood of names uses up the CA's rate limits, which
|
||||
// apply per ACME account and so to all servers of an owner together.
|
||||
// Renewals are not counted.
|
||||
type Certificates struct {
|
||||
// PerOrgPerDay is for the domains of one organization.
|
||||
PerOrgPerDay int `env:"UPTIME_CERTS_PER_ORG_PER_DAY" envDefault:"20"`
|
||||
// PerOwnerPerHour is for all servers of the platform, or of one
|
||||
// organization, together.
|
||||
PerOwnerPerHour int `env:"UPTIME_CERTS_PER_HOUR" envDefault:"30"`
|
||||
// PerNamePerDay stops a domain whose orders keep failing from using
|
||||
// up the rest.
|
||||
PerNamePerDay int `env:"UPTIME_CERTS_PER_NAME_PER_DAY" envDefault:"5"`
|
||||
}
|
||||
|
||||
// Retention sets how long data is kept. Zero keeps it forever.
|
||||
|
||||
Reference in new issue
Block a user