Skip to content

Item 8: Enforce TLS by default for daemon communication - #38

Merged
mark-e-deyoung merged 1 commit into
mainfrom
feat/tls-by-default-34
Jul 6, 2026
Merged

mark-e-deyoung merged 1 commit into
mainfrom
feat/tls-by-default-34

Conversation

@mark-e-deyoung

Copy link
Copy Markdown
Contributor

Summary

TLS is now required by default for wbabd serve. Previously TLS was fully optional — if WBABD_TLS_CERT_FILE and WBABD_TLS_KEY_FILE were not set, the daemon started with plain HTTP. Now it fails closed. Adds WBABD_TLS_DISABLE=1 as an explicit opt-out for development environments.

Changes

  • tools/wbabd: TLS enforcement check in the serve handler — fail-closed with clear error message when no TLS configured
  • scripts/security/daemon-preflight.sh: validate_tls() respects WBABD_TLS_DISABLE opt-out
  • tests/shell/test_wbabd_serve_tls_limits_config.sh: 2 new tests (TLS required by default, TLS opt-out bypass), existing tests use WBABD_TLS_DISABLE=1 for env-validation tests
  • tests/policy/daemon_security.sh: Verify WBABD_TLS_DISABLE and TLS is required by default strings in daemon source
  • docs/CONTRACTS.md: Documented WBABD_TLS_DISABLE env var
  • docs/DAEMON_API_SECURITY_PLAN.md: Updated TLS section for default-enforcement policy

Testing

  • Preflight: verified TLS enforcement, opt-out, and configured-TLS paths all behave correctly
  • tests/contract/run.sh — all contract tests pass
  • tests/shell/run.sh — all shell tests pass
  • Policy grep checks pass
  • Note: daemon-pki tests and wbabd serve stress tests require Linux (fcntl module) — run in CI

Closes #34

TLS is now required by default when starting wbabd serve. Add
WBABD_TLS_DISABLE=1 as an explicit opt-out for development use.

Changes:
- tools/wbabd: TLS enforcement check before server start; fail-closed
  when no TLS cert/key configured and WBABD_TLS_DISABLE not set
- scripts/security/daemon-preflight.sh: validate_tls() respects
  WBABD_TLS_DISABLE opt-out
- tests/shell/test_wbabd_serve_tls_limits_config.sh: Added TLS
  enforcement test (required by default) and opt-out test; updated
  existing tests to use WBABD_TLS_DISABLE=1
- tests/policy/daemon_security.sh: Verify WBABD_TLS_DISABLE and
  'TLS is required by default' message in daemon source
- docs/CONTRACTS.md: Document WBABD_TLS_DISABLE env var
- docs/DAEMON_API_SECURITY_PLAN.md: Update TLS section for
  default-enforcement policy

Closes #34
@mark-e-deyoung
mark-e-deyoung merged commit 58c57d4 into main Jul 6, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Item 8: Enforce TLS by default for daemon communication

1 participant