docs: clarify user_key vs root_key in quickstart and basic usage#1077
Open
r266-tech wants to merge 1 commit intovolcengine:mainfrom
Open
docs: clarify user_key vs root_key in quickstart and basic usage#1077r266-tech wants to merge 1 commit intovolcengine:mainfrom
r266-tech wants to merge 1 commit intovolcengine:mainfrom
Conversation
The quickstart-server.md auth section previously just said "pass api_key" without distinguishing user_key from root_key. This causes users to mistakenly use root_key for tenant-scoped APIs (add_resource, find, ls), which fails with "ROOT requests to tenant-scoped APIs must include X-OpenViking-Account and X-OpenViking-User headers". Changes: - docs/zh/getting-started/03-quickstart-server.md: expanded auth section with user_key (recommended) and root_key (must pass account/user) examples, plus warning about the common pitfall - docs/en/getting-started/03-quickstart-server.md: same changes in English - examples/basic-usage/README.md: added multi-tenant auth note after HTTP client example - examples/basic-usage/README_CN.md: same note in Chinese Closes volcengine#1022
|
|
|
Failed to generate code suggestions for PR |
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.
Closes #1022
Problem
The quickstart-server.md auth section previously just said "pass
api_key" without distinguishinguser_keyfromroot_key. This causes users to mistakenly useroot_keyfor tenant-scoped APIs (add_resource,find,ls), which fails with:While the Authentication guide correctly documents this distinction, users naturally start from the quickstart and form an incorrect mental model before ever reaching the auth docs.
Changes
docs/zh/getting-started/03-quickstart-server.md&docs/en/getting-started/03-quickstart-server.mdExpanded the auth section with:
accountanduserfor tenant-scoped accessexamples/basic-usage/README_CN.md&examples/basic-usage/README.mdAdded a multi-tenant auth note after the HTTP client mode example, pointing users to the quickstart and auth docs.