feat(runtime): add optional API token guard#856
Closed
axobase001 wants to merge 1 commit into
Closed
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Hmbown
added a commit
that referenced
this pull request
May 6, 2026
Integrates #856 as a focused runtime API security slice. Default local behavior remains unchanged; /v1/* routes require a token only when --auth-token or DEEPSEEK_RUNTIME_TOKEN is set. Co-authored-by: Zhuoran Deng <dengzhuoran9@gmail.com>
Hmbown
added a commit
that referenced
this pull request
May 6, 2026
Integrates #856 as a focused runtime API security slice. Default local behavior remains unchanged. `/v1/*` routes require a token only when `--auth-token` or `DEEPSEEK_RUNTIME_TOKEN` is set, and `/health` remains public for readiness checks. Co-authored-by: Zhuoran Deng <dengzhuoran9@gmail.com>
Owner
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
Adds a narrow optional token guard for the existing HTTP/SSE runtime API.
This is intentionally smaller than #852:
Behavior:
deepseek serve --httpbehavior is unchanged.--auth-token TOKENor settingDEEPSEEK_RUNTIME_TOKEN=TOKENrequires a matching token for/v1/*routes./healthremains public for local readiness checks.Authorization: Bearer TOKEN,X-DeepSeek-Runtime-Token: TOKEN, or?token=TOKENfor EventSource-style clients.Verification
cargo fmt --allcargo check -p deepseek-tui --lockedcargo test -p deepseek-tui runtime_token_guard_protects_v1_routes --lockedThis PR is meant as a small mergeable slice toward the larger local/remote runtime control direction discussed in #852.