Skip to content

fix: make stateless launcher authentication optional - #65

Merged
eXPerience83 merged 29 commits into
mainfrom
fix/optional-launcher-auth
Aug 2, 2026
Merged

fix: make stateless launcher authentication optional#65
eXPerience83 merged 29 commits into
mainfrom
fix/optional-launcher-auth

Conversation

@eXPerience83

@eXPerience83 eXPerience83 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

What changed

  • makes the stateless launcher unauthenticated by default in generic Compose and the normal TrueNAS example;
  • removes the launcher password secret/file and its extra TrueNAS dataset requirement from normal deployments;
  • keeps the normal TrueNAS launcher free of username/password variables, secrets and mounts;
  • keeps origin checking and no-new-privileges enabled;
  • keeps the Codex terminal independently authenticated and unchanged;
  • retains optional launcher Basic authentication for advanced generic Compose deployments through the separate file-backed compose/launcher-auth.yml override;
  • prevents the optional launcher password value from appearing in rendered Compose service environment output;
  • updates .env.example, structural Compose tests and the repository/issue contracts.

Why

The implemented launcher is navigation only: it does not proxy terminal traffic, mount agent state, receive an agent password by default, or expose a privileged operation. Requiring a second Basic-auth challenge added friction without protecting the actual Codex endpoint, which already authenticates independently.

Security boundary

  • launcher port 7680 reveals only the installed service link and image identity;
  • Codex port 7681 remains protected by its own password;
  • launcher still receives no workspace, Codex/GitHub/Git/SSH state, Docker/Podman socket, or agent credential;
  • origin checking, CSP, Host/path validation, method restrictions, no-new-privileges and mount separation remain enforced;
  • neither port should be published directly to the Internet;
  • advanced generic Compose deployments may explicitly add one distinct file-backed launcher secret.

Validation

  • both normal Compose files resolve to exactly launcher + Codex using one image;
  • launcher has no required credential source or agent-state mounts;
  • the normal TrueNAS launcher contains no username/password variable, password file, secret, dataset or mount;
  • Codex still has exactly one password source and ALLOW_INSECURE_WEB=0;
  • the optional generic override adds exactly one file-backed launcher secret without rendering its value and remains isolated from Codex;
  • host networking, privileged mode, added capabilities and Docker/Podman socket mounts are rejected for both services;
  • the exact final head must pass launcher/Codex smoke tests, notices, both SPDX SBOMs, both Trivy scans and the no-fixable-critical gate.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@eXPerience83, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 97582c99-b303-4c91-abb2-f1150d51476b

📥 Commits

Reviewing files that changed from the base of the PR and between 457e4db and 66f2d08.

📒 Files selected for processing (12)
  • .env.example
  • AGENTS.md
  • CHANGELOG.md
  • README.es.md
  • README.md
  • compose/docker-compose.yml
  • compose/launcher-auth.yml
  • docs/architecture.md
  • docs/releases.md
  • docs/security.md
  • scripts/test-remote-dev-launcher.sh
  • scripts/test_single_stack_compose.py

Summary by CodeRabbit

  • Configuration

    • Launcher authentication is now optional and can be configured directly with LAUNCHER_PASSWORD.
    • Insecure web access is enabled by default for the launcher.
    • Web password configuration remains separate for Codex.
  • Bug Fixes

    • Improved authentication override validation to keep launcher and Codex credentials isolated.

Walkthrough

The launcher now uses optional inline password configuration instead of a password secret. Insecure web access is enabled by default. Compose validation checks separate launcher and Codex authentication settings.

Changes

Launcher authentication

Layer / File(s) Summary
Compose authentication configuration
.env.example, compose/docker-compose.yml, compose/truenas.yml
The launcher uses LAUNCHER_PASSWORD, removes its password secret configuration, and enables insecure web access by default. Codex retains separate password configuration.
Authentication boundary validation
scripts/test_single_stack_compose.py
Validation checks launcher unauthenticated defaults, Codex credential requirements, and independent launcher and Codex authentication overrides.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: making stateless launcher authentication optional.
Description check ✅ Passed The description clearly covers the change, rationale, security boundary, validation, and impact, although it omits the template's explicit checklist sections.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/optional-launcher-auth

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@compose/truenas.yml`:
- Around line 18-19: Update the TrueNAS Compose environment block to forward
WEB_USERNAME, map WEB_PASSWORD from LAUNCHER_PASSWORD with an empty default, and
derive ALLOW_INSECURE_WEB from LAUNCHER_ALLOW_INSECURE_WEB with the existing
insecure default. Add a rendered-config test covering the authenticated TrueNAS
override, including the documented password variable taking effect.

In `@scripts/test_single_stack_compose.py`:
- Around line 177-190: Update validate to enforce topology safety for both
launcher and Codex services: reject each service when network_mode equals
"host", and inspect every mount source to reject Docker or Podman socket paths.
Add deterministic assertions covering both services’ socket access and
privilege-escalation settings, preserving the existing launcher and Codex
environment checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 44512cc0-37b9-4b24-83ce-f2b565e50730

📥 Commits

Reviewing files that changed from the base of the PR and between 6524704 and 457e4db.

📒 Files selected for processing (4)
  • .env.example
  • compose/docker-compose.yml
  • compose/truenas.yml
  • scripts/test_single_stack_compose.py
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: build
🧰 Additional context used
📓 Path-based instructions (2)
compose/**

⚙️ CodeRabbit configuration file

compose/**: Review Docker Compose files for TrueNAS and generic Docker compatibility.
Flag privileged mode, host networking, Docker socket mounts, overly broad host mounts,
missing authentication, unsafe public bindings and persistence paths that could lose credentials or workspaces.
Require launcher and agent services to reference one image while keeping agent state out of the launcher.

Files:

  • compose/truenas.yml
  • compose/docker-compose.yml
scripts/test_single_stack_compose.py

⚙️ CodeRabbit configuration file

scripts/test_single_stack_compose.py: Check that topology assertions are deterministic and really prove one image reference, fixed roles,
no launcher access to agent state, no Docker socket/privilege escalation and preserved Codex compatibility.

Files:

  • scripts/test_single_stack_compose.py
🪛 dotenv-linter (4.0.0)
.env.example

[warning] 11-11: [UnorderedKey] The LAUNCHER_BASE_PATH key should go before the LAUNCHER_PUBLISH_IP key

(UnorderedKey)


[warning] 13-13: [UnorderedKey] The LAUNCHER_PASSWORD key should go before the LAUNCHER_PUBLISH_IP key

(UnorderedKey)


[warning] 14-14: [UnorderedKey] The LAUNCHER_CHECK_ORIGIN key should go before the LAUNCHER_PASSWORD key

(UnorderedKey)


[warning] 15-15: [UnorderedKey] The LAUNCHER_ALLOW_INSECURE_WEB key should go before the LAUNCHER_BASE_PATH key

(UnorderedKey)

🪛 Ruff (0.16.0)
scripts/test_single_stack_compose.py

[error] 275-275: Possible hardcoded password assigned to: "WEB_PASSWORD"

(S105)

🔇 Additional comments (3)
.env.example (1)

7-15: LGTM!

compose/docker-compose.yml (1)

19-21: LGTM!

scripts/test_single_stack_compose.py (1)

29-30: LGTM!

Also applies to: 209-215, 245-290

Comment thread compose/truenas.yml
Comment thread scripts/test_single_stack_compose.py

@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: 457e4dbd0e

ℹ️ 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 .env.example Outdated

@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: e1e9d0fce1

ℹ️ 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 docs/architecture.md Outdated

@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: df55d01c6d

ℹ️ 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 compose/docker-compose.yml Outdated

Copy link
Copy Markdown
Owner Author

@codex review

Please review the exact final head df55d01c6d2e6ed02a61951deadd7c8010085df1. Focus on the bounded #65 contract: the launcher is stateless navigation with no authentication or credential variables in the normal TrueNAS example; optional launcher Basic authentication remains available only in generic Compose; Codex remains independently authenticated; origin/CSP/Host-path/method/no-new-privileges and mount boundaries must remain intact. Build AMD64 #539 is green on this SHA.

Copy link
Copy Markdown
Owner Author

@codex review

Please perform the final review on exact head 66f2d08f55f47953b27aa3f8c8b5f7a6ade611ae. The prior plaintext-rendering finding is now addressed with a separate file-backed Compose override; the normal generic and TrueNAS stacks remain password-free for the launcher, while Codex retains exactly one independent password source. Build AMD64 #550 is fully green on this SHA.

@eXPerience83
eXPerience83 merged commit acbd4e9 into main Aug 2, 2026
2 checks passed

@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: 66f2d08f55

ℹ️ 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 compose/launcher-auth.yml
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.

1 participant