ObolNetwork / ObolNetwork/obol-stack
feat(tls): add mkcert-based self-signed TLS for *.obol.stack
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 11
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Add automatic TLS certificate generation using mkcert so the entire Obol Stack runs over HTTPS. This eliminates the need for gateway.controlUi.allowInsecureAuth in OpenClaw and enables full device authentication security.
Problem
OpenClaw's Control UI requires crypto.subtle (Web Crypto API) for device identity authentication. This API is only available in secure contexts (HTTPS or localhost). Since the stack uses custom domains like openclaw-demo.obol.stack over HTTP, the browser cannot provide device identity, forcing us to set allowInsecureAuth: true — a security downgrade that skips device auth entirely.
Browsers check the hostname, not the resolved IP — so http://obol.stack resolving to 127.0.0.1 does NOT qualify as a secure context. Only https:// or literal localhost does.
Solution
Use mkcert (v1.4.4) to generate a local CA and wildcard certificate for *.obol.stack.
Implementation
obolup.sh— Installmkcertas a pinned binary (same pattern as kubectl/helm/k3d)obol stack init— Generate CA + wildcard cert:mkcert -install(trusts CA in OS Keychain + Firefox NSS store)mkcert -cert-file tls.crt -key-file tls.key "*.obol.stack" obol.stack- Save to
~/.config/obol/tls/
obol stack up— Create TLS Secret + enable Traefik HTTPS:kubectl create secret tls obol-stack-tls -n traefik- Enable
websecureGateway listener withtls.mode: Terminate - Add HTTP → HTTPS redirect
- OpenClaw overlay — Remove
allowInsecureAuth: truefrom generated overlays - HTTPRoutes — Update to reference
websecurelistener (or both)
What already exists
| Piece | Status |
|---|---|
k3d port mapping 8443:443 |
Already configured |
Traefik websecure entrypoint (port 8443) |
Exists, tls.enabled: false |
Gateway websecure listener |
Not yet defined |
| mkcert dependency | Not present |
Files to modify
| File | Change |
|---|---|
obolup.sh |
Add MKCERT_VERSION="1.4.4" + install logic |
internal/stack/stack.go |
Generate certs during Init(), create TLS Secret during Up() |
internal/embed/infrastructure/helmfile.yaml |
Enable TLS on websecure, add Gateway websecure listener |
internal/embed/k3d-config.yaml |
Verify port mappings (already done) |
internal/openclaw/openclaw.go |
Remove allowInsecureAuth from overlay generation |
internal/openclaw/chart/values.yaml |
Remove allowInsecureAuth default |
internal/openclaw/chart/templates/_helpers.tpl |
Remove controlUi rendering |
Security impact
With TLS enabled, the full OpenClaw security model works:
- Token/password auth (enforced)
- Device identity (Ed25519 keypair via
crypto.subtle) - Device pairing (approval flow for new devices)
- No
allowInsecureAuthordangerouslyDisableDeviceAuthneeded
Browser considerations
- Chrome/Safari: Trust OS Keychain automatically via
mkcert -install - Firefox: Uses own NSS store —
mkcert -installhandles this ifnss-tools/certutilis installed - WebSocket (
wss://): Works transparently with trusted CA (Firefox silently fails without pre-trusted CA — no exception dialog for WebSocket)
References
- Security audit:
plans/security-audit-controlui.md - trustedProxies analysis:
plans/trustedproxies-analysis.md - mkcert: https://github.com/FiloSottile/mkcert
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/stack/stack.go and the listed infrastructure and OpenClaw files, then review plans/security-audit-controlui.md and plans/trustedproxies-analysis.md. Trace the init and up flows, Helmfile Gateway settings, and overlay generation. Done means mkcert-based certificates are generated and trusted, HTTPS routing works, and insecure OpenClaw authentication settings are no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, helm, kubernetes, shell
- Domain
- devops, infrastructure, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100