Repository navigation
Conversation
This was referenced Nov 12, 2026
There was a problem hiding this comment.
🟢 Approval recommended
The review reports no active issues requiring changes.
No open issues 🎉
What changed in this PR
Enables volcano cloud functions invoke to authenticate directly with delegated grants, building on project-bound grant support without creating a long-lived service key.
Changes:
- Adds grant-aware invoke token selection while preserving service-key behavior for other credentials.
- Wires cloud function invocation to the new token provider.
- Adds unit and command-level tests and documents the grant behavior.
| File | Description |
|---|---|
internal/dataplane/service_key.go |
Adds InvokeToken to use delegated grants directly. |
internal/dataplane/service_key_test.go |
Tests grant passthrough and service-key fallback. |
internal/cmd/cloud/cloud.go |
Connects cloud function invocation to InvokeToken. |
docs/authentication.md |
Documents invocation without creating a service key. |
cmd/volcano/grant_test.go |
Verifies invocation sends the grant with no service-key requests. |
Review effort: Balanced
# Conflicts: # docs/authentication.md
# Conflicts: # docs/authentication.md
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
docs/design/builder-app/designs/grant-acceptance.md§6 and §7 K2 in Kong/volcano-builderWhy
volcano cloud functions invokelists, reads or creates the reservedvolcano-cli-data-planeservice key (sk-) and invokes with it. Hosting refuses the service-key routes to a grant, so under a grant invoke can't work this way. A grant must invoke as itself, so no long-lived key is ever minted for it (R11, R12).Summary
dataplane.Service.InvokeToken: apg-grant invokes with itself; any other credential gets the reserved service key, as beforecloud functions invoketoInvokeTokenininternal/cmd/cloud/cloud.goPOST /functions/{functionId}/invokewithAuthorization: Bearer pg-…; name resolution through the functions list is a grant read; 403grant_permission_missing(exit5) and 429rate_limit_exceeded(exit1) keep their codesGET …/service-keys, which Hosting refuses with 403grant_route_not_allowed(exit5)FunctionInvokeTokenpathauthentication.md, now in docs(cli): document delegated grants, exit code 6 and VOLCANO_TOKEN_FD volcano-docs#190Verification
go build ./...make check(openapi-generated-check,release-workflow-check,lintwith 0 issues,test)TestGrantInvokesWithTheGrantAndNoServiceKeyrunscloud functions invoke --id … --jsonwith the worker's environment against a recording server. It makes exactly one request,POST /functions/{id}/invokewith the grant, and no/service-keyscallTestInvokeTokenUsesADelegatedGrantDirectly(no request at all),TestInvokeTokenUsesTheServiceKeyForOtherCredentialsmainat96438255)