Item 8: Enforce TLS by default for daemon communication - #38
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TLS is now required by default for
wbabd serve. Previously TLS was fully optional — ifWBABD_TLS_CERT_FILEandWBABD_TLS_KEY_FILEwere not set, the daemon started with plain HTTP. Now it fails closed. AddsWBABD_TLS_DISABLE=1as an explicit opt-out for development environments.Changes
tools/wbabd: TLS enforcement check in theservehandler — fail-closed with clear error message when no TLS configuredscripts/security/daemon-preflight.sh:validate_tls()respectsWBABD_TLS_DISABLEopt-outtests/shell/test_wbabd_serve_tls_limits_config.sh: 2 new tests (TLS required by default, TLS opt-out bypass), existing tests useWBABD_TLS_DISABLE=1for env-validation teststests/policy/daemon_security.sh: VerifyWBABD_TLS_DISABLEandTLS is required by defaultstrings in daemon sourcedocs/CONTRACTS.md: DocumentedWBABD_TLS_DISABLEenv vardocs/DAEMON_API_SECURITY_PLAN.md: Updated TLS section for default-enforcement policyTesting
tests/contract/run.sh— all contract tests passtests/shell/run.sh— all shell tests passwbabd servestress tests require Linux (fcntl module) — run in CICloses #34