fix(local): stop sending the local service key on invoke and storage object I/O#78
Open
tkkhq wants to merge 1 commit into
Open
fix(local): stop sending the local service key on invoke and storage object I/O#78tkkhq wants to merge 1 commit into
tkkhq wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Stops local function invocation and storage object operations from sending the shared local service key.
Changes:
- Adds a synthetic
LocalModeconfiguration flag. - Omits data-plane credentials locally while preserving cloud and management authentication.
- Updates command guidance and authentication tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
internal/storage/storage.go |
Uses an unauthenticated client for local object operations. |
internal/config/config.go |
Adds LocalMode and suppresses local invoke tokens. |
internal/config/config_test.go |
Tests local invoke token suppression. |
internal/cmd/root/root_test.go |
Verifies direct local invocation omits authorization. |
internal/cmd/local/local.go |
Marks local configs and removes the object-token provider. |
internal/cmd/local/local_test.go |
Verifies local object uploads omit authorization. |
internal/cmd/functions/invoke.go |
Documents local invocation authentication semantics. |
internal/cmd/functions/invoke_test.go |
Verifies invoke authentication while retaining management authentication. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Tracking
Summary
sk-1111…) on the local operator data-plane:volcano functions invokeandvolcano storage object …now send noAuthorizationheader in local mode, and the local server defaults an absent credential to the pre-provisioned local userinternal/config/config.go: add a syntheticConfig.LocalModeflag (never persisted);FunctionInvokeToken()returns empty in local mode so both invoke paths send no credentialinternal/cmd/local/local.go: setLocalMode: truein the synthetic local config; drop the now-dead localWithObjectTokenProvider/storageObjectTokenwiring (cloud's data-plane-key provider is untouched)internal/storage/storage.go:objectAPIsends no credential in local mode (previously an empty token fell back to the platform token, which storage rejects)internal/cmd/functions/invoke.go: documentvolcano functions invokeas a local function-logic harness — real per-user auth (signed-in vs anonymous), RLS, and cross-service behavior are exercised against a cloud deployment or the app-driven path, not the CLIvolcano-cli-data-planeservice key via the invoke/object token providers; management commands still send the platform tokenRollout dependency
This depends on the server-side local defaults being present in the running
kong/volcano:local-nightlyimage. VOL-474 (volcano-hosting#656) makes the local server default an absent data-plane credential to the seeded local user; without it, localfunctions invoke/storage objectwould 401. Land/deploy the server change (and refresh the local image) before releasing this CLI change.Verification
make lintmake openapi-generated-checkmake test