Authorize shared pipeline uploads
fix(backend): authorize shared pipeline uploads (#14352)
Authorize shared pipeline uploads62516d-fix-authorize-shared-pipeline-uploads-cve-2026-77596fixauthorize shared pipeline uploads backend
Committed by jeffspahr
commit message
fix(backend): authorize shared pipeline uploads (#14352)
* Authorize empty-namespace (shared) pipeline uploads
canUploadVersionedPipeline returned nil whenever the resolved namespace was
empty, skipping the SubjectAccessReview for shared (cluster-wide) pipeline
create and upload_version in multi-user mode. An empty namespace is the
default when the namespace query parameter is omitted (REQUIRE_NAMESPACE_FOR_PIPELINES
defaults to false), so any caller could create shared pipelines and inject
versions into existing ones without authorization.
Remap the empty namespace to the KFP system namespace and run IsAuthorized,
mirroring canAccessPipeline in pipeline_server.go, so the HTTP upload path
enforces the same shared-pipeline-write authorization as the gRPC path. The
upload endpoints only perform writes, so no read short-circuit is needed.
Signed-off-by: Vito Carolillo <[email protected]>
(cherry picked from commit 16a8edb016e0cb5dee81f21614a686cd8ed8c27d)
Signed-off-by: Jeff Spahr <[email protected]>
* test(backend): cover shared pipeline upload authorization
Signed-off-by: Jeff Spahr <[email protected]>
* fix(backend): authorize sentinel shared pipeline uploads
Signed-off-by: Jeff Spahr <[email protected]>
* fix(test): authenticate tenant pipeline uploads in E2E tests
Signed-off-by: Jeff Spahr <[email protected]>
* fix(test): preserve Kubernetes-native upload namespace handling
Signed-off-by: Jeff Spahr <[email protected]>
---------
Signed-off-by: Vito Carolillo <[email protected]>
Signed-off-by: Jeff Spahr <[email protected]>
Co-authored-by: Vito Carolillo <[email protected]>Editor assessment
This commit patches CVE-2026-77596. Strong, mechanism-first reasoning. The body explains that canUploadVersionedPipeline returned nil whenever the resolved namespace was empty, skipping the SubjectAccessReview for shared pipelines in multi-user mode, and that an omitted namespace parameter hits exactly that case by default. It then states the fix: remap the empty namespace to the KFP system namespace and run IsAuthorized, mirroring the gRPC path, with tests for the sentinel case. The squash log and PR number add minor noise.