Skip to content

fix(server): preserve secure auth and honor standalone configuration - #97

Merged
igorls merged 5 commits into
mainfrom
codex/propose-fix-for-tcp-service-vulnerability
Oct 3, 2026
Merged

igorls merged 5 commits into
mainfrom
codex/propose-fix-for-tcp-service-vulnerability

Conversation

@igorls

@igorls igorls commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Load standalone settings from JSON and apply only explicitly supplied CLI overrides. Preserve TCP AUTH, configured verification keys, gateway authentication and replication trust checks while reconciling the original patch with current main.

Pass the complete store configuration through, including WAL size and compaction settings. Resolve relative WAL and snapshot paths under the effective data directory and retain absolute paths. If an older durable file would be skipped by honoring configured paths or data, reject startup with a migration message instead of silently reopening without it.

Accept --backend threadpool and reject unsupported standalone backends before creating storage or starting listeners. Epoll and io_uring remain engine APIs without TCP AUTH handling. Document supported options and authentication opt-outs.

Validation

  • zig build test: 321 tests passed on Windows and Linux after integrating fix(wasm): harden allowlist checks and validate browser builds #99; this now includes main configuration tests and the WASM checker.
  • ReleaseSmall standalone builds passed on both platforms.
  • 22 live regressions passed on both platforms: config-only startup, full/snapshot recovery, CLI precedence, backend rejection, legacy storage detection, authenticated/scoped access, opt-outs, replication-preface rejection and connection limits.
  • The live suite now runs in both engine CI jobs, alongside WASM smoke tests and the existing client/secret checks.

Compatibility

Default snapshots now live under data. For LegacySnapshotPath or LegacyWalPath, migrate the old file or set the corresponding store path to its absolute existing location. The checks cover custom configured filenames and changed data directories. If LegacyWalMode is reported, recover in full mode first, save any needed snapshot, and migrate or archive the old WAL before changing the configured mode. Authentication remains enabled by default; keyless protected listeners remain locked.

Copilot AI lite review requested due to automatic review settings September 23, 2026 17:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T14:42:39.635892Z 0801e66 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved storage-path and backend-configuration issues block approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Updates standalone server startup to load configuration, apply CLI overrides, and enforce TCP authentication defaults.

Changes:

  • Adds config, bind, data, port, and authentication CLI options.
  • Applies configured binding and TCP authentication to the server.
  • Adds argument-parsing and override tests.

Review findings:

  • Critical (1 vote): Configured WAL and snapshot paths are ignored.
  • Moderate (3 votes): Backend configuration and CLI override are unsupported.
  • Nit (1 vote): CLI reference documentation omits the new security flags.
File Summary
src/​main.zig Loads configuration, applies overrides, configures binding and authentication, and adds tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/main.zig Resolved
Comment thread src/main.zig Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 729f717cac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.zig Resolved
Comment thread src/main.zig Resolved
@igorls igorls changed the title fix(security): enforce TCP auth in standalone server fix(server): preserve secure auth and honor standalone configuration Oct 3, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a08d3d5b04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.zig Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 605d7db480

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.zig Resolved
@igorls
igorls merged commit cce170e into main Oct 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants