fix(auth): reject implicit root fallback on tenant APIs#716
Merged
qin-ctx merged 2 commits intovolcengine:mainfrom Mar 18, 2026
Merged
fix(auth): reject implicit root fallback on tenant APIs#716qin-ctx merged 2 commits intovolcengine:mainfrom
qin-ctx merged 2 commits intovolcengine:mainfrom
Conversation
qin-ctx
approved these changes
Mar 18, 2026
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.
Description
Reject implicit
default/defaultfallback when the ROOT key calls tenant-scoped data APIs without explicit tenant headers.This fixes the misleading success path behind issue #710: requests like
add-resource,fs, and tenant-scoped debug APIs should fail fast instead of silently operating under the default tenant.Related Issue
Fixes #710
Type of Change
Changes Made
get_request_context()to requireX-OpenViking-AccountandX-OpenViking-Userfor ROOT requests to tenant-scoped APIs when auth is enabled/api/v1/admin/*,/api/v1/observer/*,/api/v1/debug/health,/api/v1/system/status,/api/v1/system/wait)Testing
Commands run locally:
Note: I did not mark the full local test suite as passing because the local environment does not have the AGFS native library needed for the heavier server fixtures.
Checklist
Screenshots (if applicable)
N/A
Additional Notes
This PR intentionally keeps the fix minimal and server-side only. It does not add new CLI/client configuration for account/user headers; it only prevents misleading success when ROOT requests tenant-scoped APIs without explicit tenant identity.