HabrSeptember 4, 2026🇷🇺Translated from Russian

Secure Custom Domain Setup for Client Status Pages Using CNAME, Certbot and Go Instead of ACME On-Demand

A monitoring service needed to offer public status pages on customer domains for white-label use by web studios. Clients add a CNAME record pointing their subdomain to the service endpoint, after which the platform must serve the page over HTTPS with a valid certificate.

The team rejected ACME on-demand solutions such as Caddy or OpenResty auto-SSL for three reasons. Private keys would reside inside the application process or require an additional stateful component. Any attacker could point arbitrary domains at the IP and trigger Let's Encrypt issuance, exhausting the 300-order rate limit per account. Issuing certificates during the TLS handshake also imposes latency on the first visitor and risks connection drops if the CA is unreachable.

Instead, domains are stored in the database when users enter them in settings. A four-stage pipeline handles the rest: input normalization and validation in Go, periodic DNS verification by a background goroutine, certificate issuance and nginx configuration by a privileged helper script, and request routing inside the application.

Validation rejects empty strings only when removing a domain, blocks the service's own domains to prevent takeover of internal pages, and requires Punycode for internationalized names so users see exactly what they must configure at their registrar. After saving, the domain enters pending status.

The DNS verifier runs every five minutes. It first checks for a matching CNAME and falls back to comparing A records for apex domains where CNAME is prohibited by RFC. Temporary DNS failures do not downgrade an already verified or active domain; only a warning is recorded. This hysteresis avoids random outages for customers whose pages are already live.

A systemd-timer script running as root queries the application over loopback, runs certbot with the webroot challenge, writes per-domain nginx server blocks from a template, and notifies the application when a domain becomes active. Certificates for removed domains are left untouched and simply expire naturally. The script always validates input with a regex and runs nginx -t before reloading.

Inside the Go application a HostRouter middleware maps verified custom hosts to the corresponding status page while returning 404 for all other paths, preventing exposure of dashboards or APIs. Internal endpoints used by the helper are protected by checking for the absence of X-Forwarded-For and X-Real-IP headers in addition to loopback address validation.

The scheme works well for hundreds of domains on a single server. It avoids rate-limit exhaustion because issuance occurs only after confirmed DNS ownership, keeps certificate handling outside the application, and ensures that failure of any single component does not affect already-active customer pages.

Related articles

AntiMalwareOther

VK Tech Rolls Out Unified AI Assistant Across VK WorkSpace Corporate Tools

VK Tech is preparing a unified AI Assistant for its VK WorkSpace platform, along with semantic search and an MCP server to connect autonomous agents. The features target small and medium businesses as well as large corporations by automating routine tasks in messaging, email, and calendar services. Semantic search will allow users to locate documents, emails, and messages by meaning rather than exact titles or phrasing. Meeting recordings will be automatically transcribed with extraction of key topics, decisions, and action items. The AI Assistant launches first in the Messenger module of the On-Premise version, with cloud SaaS availability scheduled for October and later expansion to Mail, Disk, and Calendar. Access remains strictly limited by user permissions and company policies. An MCP server will also be introduced, enabling AI agents to query data, prepare meeting materials, and perform actions inside the platform services, initially supporting Messenger and extending to other modules by year-end.

AntiMalwareOther

Russia Weighs Passenger Fees of Up to 1000 Rubles to Fund Domestic Aircraft Leasing

Russian authorities are discussing a new surcharge on air tickets to cover leasing and operating costs of locally produced planes. The proposed fees range from 500 rubles on domestic flights to 1000 rubles on international routes, with some sources mentioning higher figures of 700 and 2000 rubles respectively. The initiative involves the Ministry of Transport, the Ministry of Industry and Trade, and Rostec, though no final decisions on amounts or collection methods have been made. Revenue estimates suggest the measure could generate 68 to 84 billion rubles annually based on 2025 passenger volumes, with total collections targeted at 200-250 billion rubles between 2027 and 2030. Funds would subsidize the gap between high production costs of models such as the MC-21 and SJ-100 and the discounted prices offered to airlines, while also addressing elevated maintenance and fuel expenses. Officials expect serial production after 2030 to lower costs and eliminate the need for the surcharge, yet experts caution that added fees risk raising ticket prices and reducing overall passenger traffic.

HabrOther

EVTX Record Recovery: Advanced Carving Techniques for Damaged Windows Event Logs

Positive Technologies researchers detail methods for carving EVTX records directly from raw disk images, memory dumps, and virtual machine snapshots when standard file system access fails. The approach bypasses corrupted MFT structures or wiped partitions by scanning for ElfChnk and record signatures. Their Go-based library parses both intact and damaged EVTX files, recovering events even when checksums mismatch. The article explains the three-layer EVTX structure including file headers, 64 KB chunks, and BinXML records with template substitution for space efficiency. Two carving strategies are presented: chunk-level recovery that restores full field names via per-chunk caches, and record-level extraction that pulls values without templates. The work supports faster incident reconstruction in ransomware cases where attackers encrypt entire VDI or VHDX images.

AntiMalwareOther

Google Testing Optional Google Account Unlock for Forgotten Android PINs

Google is developing a backup unlock method that lets Android users regain access to their devices through a linked Google Account instead of performing a full factory reset. The feature, discovered in Android 17 QPR2 Beta 5, appears under the name Unlock with Google Account and would be disabled by default. Users would need to enable it manually in the Device unlock settings before forgetting their PIN, password, or pattern. The change aims to prevent permanent loss of local data such as photos and documents that lack cloud backups. The mechanism revives a capability removed after Android 4.4, when forgotten patterns could be cleared using Google Account credentials. Factory Reset Protection would remain in place after any reset. The code reference is not yet functional, carries no official announcement, and may be altered or dropped before release.