feat: support Viking API key auth - #1116
Merged
yaozheng-fang merged 1 commit intoSep 17, 2026
Merged
Conversation
xgtcode
force-pushed
the
feat/viking-apikey-framework-auth
branch
from
September 17, 2026 07:53
3eaef0e to
4b9851d
Compare
xgtcode
force-pushed
the
feat/viking-apikey-framework-auth
branch
from
September 17, 2026 09:23
4b9851d to
ac71516
Compare
yaozheng-fang
approved these changes
Sep 17, 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.
Background
The latest VikingDB SDK supports
APIKeyauthentication. VeADK should support API key access for existing VikingDB knowledgebase and memory resources at runtime, while keeping resource/collection management on AK/SK or VeFaaS IAM. This avoids passing API keys to Viking control-plane APIs that do not support them.Changes
Added
DATABASE_VIKING_API_KEYsupport for Viking knowledgebase.search()usesAuthorization: Bearer <api_key>when an API key is configured.Added
DATABASE_VIKINGMEM_API_KEYsupport for Viking memory.VikingMem(auth=APIKey(...)).get_user_profile()now reuses SDK collectionsearch_memory().get_user_profile()raises on non-zerocoderesponses instead of treating auth/service failures as an empty profile.Updated the custom
VikingDBMemoryClient.Updated Studio and Harness behavior.
Updated dependencies and docs.
vikingdb-python-sdkversion to one that includesAPIKey.Auth Priority
Data plane:
api_keyDATABASE_VIKING_API_KEY/DATABASE_VIKINGMEM_API_KEYManagement plane:
Management APIs do not use API key auth.
Verification
uv run pytest tests/test_vikingdb_knowledge_backend.py tests/test_vikingdb_memory_backend.py tests/cli/test_frontend_runtime_proxy.py -q -k "viking"44 passeduv run pytest tests/cli/test_generated_agent_component_matrix.py tests/cloud/test_harness_app_contract.py -q133 passedcd frontend && npm test1168 passedcd frontend && npm run buildcd frontend && npm run test:webui-assetsgit diff --checkpre-commit run gitleaks --all-filesNotes
ruff/pyrightwere also run against the changed Python files, but they hit existing repository-wide issues, such as historical lint findings incli_frontend.py, aschemafield conflicting with a Pydantic/BaseModel method, and existing Optional AK/SK type annotations. This PR does not include unrelated broad cleanup.