Skip to content

feat(task): authenticate remote cache requests - #11625

Merged
jdx merged 2 commits into
agent/task-cache-remote-modesfrom
agent/task-cache-remote-auth
Aug 3, 2026
Merged

jdx merged 2 commits into
agent/task-cache-remote-modesfrom
agent/task-cache-remote-auth

Conversation

@jdx

@jdx jdx commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a global-only experimental Bearer token setting for remote task cache authentication
  • attach the token to every remote request with a sensitive Authorization header
  • retain explicit repository or organization namespace isolation from the preceding stack layer

Tests

  • cargo test task_cache_store::tests
  • cargo clippy --workspace --all-features --all-targets -- -D warnings
  • mise run lint-fix

AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.


Note

Medium Risk
Introduces credential handling and transport policy for remote cache traffic; mitigations include global-only config, HTTPS enforcement when a token is set, sensitive header marking, and redaction in diagnostics.

Overview
Adds Bearer token authentication for the experimental remote task cache via a new global-only task.cache_remote_token setting (MISE_TASK_CACHE_REMOTE_TOKEN), wired from settings into RemoteTaskCacheConfig and sent on every HTTP cache request as a sensitive Authorization header.

Transport rules are tightened: credentialed requests require HTTPS except on loopback; unauthenticated non-loopback HTTP is allowed only with an explicit transit-risk warning. The remote cache protocol doc and JSON schema/settings docs are updated accordingly, and the parity tracker marks authentication/namespaces as done.

Credential hygiene: remote cache tokens are redacted in debug settings dumps and in as_dict / partial settings tables so they do not leak in logs or exported config.

Reviewed by Cursor Bugbot for commit de646ab. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 75bc208d-e42a-476b-a402-5df941b1033e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@greptile-apps

greptile-apps Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds global-only Bearer authentication for remote task-cache requests while redacting the credential from settings diagnostics and output.

  • Passes the configured token into the HTTP cache store and marks the authorization header sensitive.
  • Requires HTTPS for authenticated non-loopback endpoints while retaining warned, unauthenticated HTTP compatibility.
  • Documents the authentication and transport behavior and updates the generated settings schema.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported credential disclosure and unauthenticated HTTP compatibility issues are fixed in the current code.

Important Files Changed

Filename Overview
src/task/task_cache_store.rs Adds sensitive Bearer headers and transport validation; the previously reported authenticated and unauthenticated HTTP cases are addressed.
src/config/settings.rs Redacts the remote-cache token from trace diagnostics and settings dictionary output used by settings commands.
settings.toml Defines the token as an environment-backed, global-only setting so project configuration cannot supply it.
src/task/task_cache.rs Threads the configured token into remote cache construction without changing cache key or artifact behavior.
docs/tasks/remote-cache-protocol.md Documents authenticated HTTPS requirements and warned unauthenticated HTTP compatibility.

Reviews (12): Last reviewed commit: "fix(config): redact remote cache token f..." | Re-trigger Greptile

Comment thread src/task/task_cache_store.rs Resolved
Comment thread settings.toml Resolved
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch 3 times, most recently from be8ad44 to 7934540 Compare August 2, 2026 13:10
@github-actions

github-actions Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▂▃▁▁▁▁▃▂▂█ 80,074,952 → 80,295,451 +0.28% 17.64 → 18.31ms +3.80%
hook-env ▄▄▁▃▂▂▃▂▃█ 82,190,914 → 82,415,481 +0.27% 18.34 → 19.19ms +4.63%
ls ▃▃▁▁▁▄▄▄▄█ 73,127,800 → 73,310,960 +0.25% 15.71 → 16.24ms +3.33%
registry ▁▁▂▂▃▆▆█▂▇ 49,102,713 → 49,179,957 +0.16% 11.64 → 12.65ms +8.63%
startup ▂▂▁▂▂▁▁▂▂█ 15,784,751 → 15,860,323 +0.48% 9.04 → 9.39ms +3.91%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

de646abf94a1 vs e5230aa14775 · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/task-cache-remote-auth branch from 7934540 to 9bfcfce Compare August 2, 2026 15:18
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch from 9bfcfce to bc0f377 Compare August 2, 2026 15:20

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bc0f377. Configure here.

Comment thread src/task/task_cache_store.rs Resolved
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch from bc0f377 to 63383df Compare August 2, 2026 15:27
Comment thread settings.toml Resolved
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch from 63383df to a087b6f Compare August 2, 2026 17:33
Comment thread src/task/task_cache_store.rs Resolved
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch 2 times, most recently from 20a4bf8 to 80485e5 Compare August 2, 2026 18:58
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch from 80485e5 to c4bd6b4 Compare August 2, 2026 19:10
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch from c4bd6b4 to 420ae5c Compare August 2, 2026 21:25
@jdx
jdx force-pushed the agent/task-cache-remote-auth branch from 420ae5c to de646ab Compare August 3, 2026 00:46
@jdx
jdx merged commit 0565cb9 into main Aug 3, 2026
31 checks passed
@jdx
jdx deleted the agent/task-cache-remote-auth branch August 3, 2026 03:04
donbeave pushed a commit to donbeave/mise that referenced this pull request Aug 3, 2026
## Summary
- add a global-only experimental Bearer token setting for remote task
cache authentication
- attach the token to every remote request with a sensitive
`Authorization` header
- retain explicit repository or organization namespace isolation from
the preceding stack layer

## Tests
- `cargo test task_cache_store::tests`
- `cargo clippy --workspace --all-features --all-targets -- -D warnings`
- `mise run lint-fix`

*AI-assisted — Tool: Codex; model: unavailable/unavailable; version:
unavailable.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Introduces credential handling and transport policy for remote cache
traffic; mitigations include global-only config, HTTPS enforcement when
a token is set, sensitive header marking, and redaction in diagnostics.
> 
> **Overview**
> Adds **Bearer token authentication** for the experimental remote task
cache via a new global-only `task.cache_remote_token` setting
(`MISE_TASK_CACHE_REMOTE_TOKEN`), wired from settings into
`RemoteTaskCacheConfig` and sent on every HTTP cache request as a
sensitive `Authorization` header.
> 
> **Transport rules** are tightened: credentialed requests require
**HTTPS** except on loopback; unauthenticated non-loopback HTTP is
allowed only with an explicit transit-risk warning. The remote cache
protocol doc and JSON schema/settings docs are updated accordingly, and
the parity tracker marks authentication/namespaces as done.
> 
> **Credential hygiene**: remote cache tokens are **redacted** in debug
settings dumps and in `as_dict` / partial settings tables so they do not
leak in logs or exported config.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
de646ab. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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