You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(autotls): add support for custom DNS resolver and include Pebble… (#572)
* feat: add new flags
* fix(k8s): ensure p2p-wss service port is created when configured
* chore: add comments to local.yaml
* fix(config): update autotls-registration-endpoint
* feat(autotls): add autotls support with pebble and p2p-forge (#559)
* feat(autotls): add auto tls support in init containers and configuration options
* fix(k8s): fix EnvVar handling by adding hasValues method and improving toK8S conversion
* feat(config): add p2p-wss support and update autotls registration endpoint in configuration files
* chore(config): remove unneeded p2p-wss settings
* feat(autotls): implement autotls check functionality (#560)
* feat(autotls): implement autotls check functionality
* feat(autotls): enhance WSS connectivity checks and update configuration
* feat(autotls): add autotls check in config.yaml
* feat(config): add WSS configuration for local setup
* fix(autotls): ensure context cancellation is handled correctly during WSS connection tests
* fix(autotls): update WSS connectivity test to disconnect everything before connecting
* fix(autotls): add WSS group option and enhance error handling for WSS connectivity
* feat(autotls): add certificate renewal testing options and enhance configuration
* refactor(autotls): simplify certificate renewal options and update related configurations
* fix(autotls): increase certificate renewal wait time to 500 seconds for improved testing
* fix(autotls): extend timeout for certificate renewal to 15 minutes
* feat(autotls): add ultralight group support and connectivity testing
* feat(config): update local.yaml for ultralight configuration and enhance autotls checks
* fix(autotls): re-enable certificate renewal test
* feat(config): add local-dns-autotls and local-light-autotls configura… (#562)
* feat(config): add local-dns-autotls and local-light-autotls configurations
ons.
* chore(config): comment out ultralight configuration
* fix(config): update autotls configs
* fix(autotls): simplify config
* fix: use test cert from constant
* fix(autotls): handle context cancellation during sleep intervals in c… (#566)
* fix(autotls): handle context cancellation during sleep intervals in checks
* feat(autotls): add UnderlayPollInterval option and enhance WSS underlay checks
* refactor(config): reorder struct fields for clarity in check options
* refactor(autotls): simplify options structure and improve WSS underlay checks
* feat(config): add light node configuration for autotls support in local.yaml
* fix: git conflicts
* chore: fix lint issue
* feat(autotls): add support for custom DNS resolver and include Pebble CA certificate
* lint forge test file
* feat(autotls): enhance Pebble CA certificate fetching and direct DNS queries
* chore: update forge DNS address in local configuration
* chore: update forgeDNSAddr in check.go
* chore: enhance DNS resolution handling with custom DNS server support
* chore: remove unnecessary changes related to pebble
* chore: update package imports
* chore: rename ForgeDNSAddr
* feat(autotls): add Forge TLS host address and Pebble management URL support
* fix(autotls): increase certificate renewal wait time to accommodate expiry and check interval
* fix(autotls): extend timeout for certificate renewal process
* fix(autotls): adjust certificate renewal logic and improve logging for clarity
* fix(autotls): refine certificate renewal process with enhanced retry logic and improved snapshot handling
* refator: rm test forge
* feat(autotls): introduce support for multiple AutoTLS groups and add P2P WSS node port configuration
* refactor(autotls): consolidate HTTP client configuration for Pebble management API calls
* fix: lint check.go
* refactor(autotls): encapsulate Pebble management API interactions in a dedicated service
* fix(autotls): enhance logging for certificate snapshot dialing errors
* refactor(autotls): move certificate renewal logic to a dedicated function and improve structure
* docs(autotls): add README for AutoTLS check detailing functionality, configuration, and package layout
* docs(autotls): add sequence diagram to README for better visualization of AutoTLS check process
* chore(config): update local.yaml with new addresses for forge DNS and Pebble management URL
* chore(config): add local usage notes for forge DNS and Pebble management URL in local.yaml
* fix: set timeout for insecure Pebble HTTP client
* chore(config): update local.yaml with valid values for CI
* chore(deps): update go.mod to include new dependencies and indirect packages
---------
Co-authored-by: Ljubisa Gacevic <ljubisa.rs@gmail.com>
Beekeeper check that validates **p2p-forge** style AutoTLS setup: WSS underlays, forge hostnames, DNS, TLS on forge endpoints, connectivity, and (when possible) **certificate renewal** by comparing cert serials over time.
4
+
5
+
## What it runs (order)
6
+
7
+
1. Load API clients for nodes in the configured AutoTLS node groups.
8
+
2.**WSS underlays** — confirm nodes expose WebSocket secure underlays (optionally skip a group such as ultra-light).
9
+
3.**Forge domain + CA** — read `AutoTLSDomain` (and Pebble CA handling) from the first matching node config.
10
+
4.**Forge address format** — parse WSS multiaddrs and check forge hostname / peer id consistency.
11
+
5.**DNS** — resolve forge hostnames when `forge-dns-address` is set.
12
+
6.**TLS** — dial forge endpoints and verify certificates (SANs, retries for expired certs).
13
+
7.**WSS connectivity** — disconnect/reconnect between nodes over WSS underlays.
14
+
8.**Ultra-light** (optional) — same connectivity from ultra-light nodes if configured.
15
+
9.**Renewal** — snapshot leaf cert serials, wait until near expiry (or trigger dials if already expired), snapshot again, compare serials; then run WSS connectivity again.
16
+
17
+
If any step fails, the check fails.
18
+
19
+
## Config (beekeeper)
20
+
21
+
Check type: `autotls`. Options map to `Options` in `autotls.go`:
22
+
23
+
| YAML key | Purpose |
24
+
|----------|---------|
25
+
|`autotls-groups`| Node groups that run AutoTLS (default in code: `bee-autotls`). |
26
+
|`ultra-light-group`| Group name for nodes without listen addrs; excluded from WSS underlay collection, used for ultra-light connectivity test. Default: `ultra-light`. Set empty to skip ultra-light tests. |
27
+
|`forge-dns-address`| Resolver host:port used to verify DNS resolution of forge hostnames. |
28
+
|`forge-tls-host-address`| Optional `host:port` to dial the **first** sorted node’s forge TLS check from this host (e.g. in-cluster DNS). Other nodes still use IP:port from the multiaddr. |
29
+
|`pebble-mgmt-url`| Override Pebble **management** URL for fetching the live root CA PEM (see below). |
30
+
31
+
Defaults: `autotls.NewDefaultOptions()` in `autotls.go`.
32
+
33
+
## Pebble (local ACME)
34
+
35
+
When a node’s `AutoTLSCAEndpoint` contains `pebble`, the check fetches the **current** root CA from Pebble’s management API (Pebble rotates its CA on restart). The ACME directory URL in config is turned into a management URL with `pebbleMgmtURL()` (ACME port `14000` → management `15000`, path `/roots/0`). `pebble-mgmt-url` overrides that derived URL.
36
+
37
+
The HTTP client uses **TLS insecure skip verify** only for that management HTTPS call (self-signed Pebble). Implementation: `internal/service.go` (`Pebble.FetchRootCA`), client wired in `autotls.go`.
|`internal/service.go`| Small HTTP client wrapper for Pebble management `GET` (root CA PEM). |
47
+
48
+
Renewal **orchestration** lives in `renewal.go`; TLS dialing and address selection for snapshots and renewal triggers stay in `forge.go` next to other forge TLS code.
0 commit comments