Repository navigation
fix: enforce appName ownership check in VertexAiSessionService.listEvents - #1435
Open
prasanna8585 wants to merge 1 commit into
Open
prasanna8585 wants to merge 1 commit into
prasanna8585 wants to merge 1 commit into
Conversation
Contributor
|
Hi @prasanna8585, thank you for your contribution! We appreciate you taking the time to submit this pull request. our team is currently reviewing your changes, and we will keep you posted if any additional information is required. Thank you! |
Contributor
Author
|
Hi @hemasekhar-p, is there any update or code changes needed from my side or are we ready to merge this PR? |
Contributor
Author
|
Hi Team , is there any update or code changes needed from my side or are we ready to merge this PR? |
Contributor
Author
|
Hi @hemasekhar-p, any update required from my side to merge this PR? |
prasanna8585
force-pushed
the
fix/listevents-ownership-check
branch
from
September 24, 2026 11:22
198b177 to
0be9ca1
Compare
Contributor
|
Hi, thank your for PR, please:
|
prasanna8585
force-pushed
the
fix/listevents-ownership-check
branch
from
October 15, 2026 11:45
f9f3220 to
af65945
Compare
prasanna8585
force-pushed
the
fix/listevents-ownership-check
branch
from
October 15, 2026 11:46
af65945 to
6cb6557
Compare
Contributor
Author
|
Hi @damianmomotgoogle, thanks for the review : Squashed all commits into a single commit Ready for another look. |
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.
Summary
Commit d1b1d92 (#1323) added an ownership check to
getSessionanddeleteSession- fetch the session, compare the backend-reported owner to the caller'suserId, deny as not-found on mismatch. The same check was not applied tolistEvents.Impact
listEventsreturns a session's full event stream (conversation content, tool calls, state deltas) addressed solely bysessionId, with no ownership check. The Vertex backend session-events sub-resource does not enforce per-caller ownership on its own (per the existing comments on the getSession/deleteSession checks in this same file), so any authenticated caller who knows or guesses another user'ssessionIdcan read that user's full conversation history vialistEvents- the same disclosure class d1b1d92 fixed forgetSession/deleteSession, left open here.listEventsis public API (BaseSessionServiceinterface), not an internal helper.Fix
listEventsnow fetches the session and applies the same ownership checkgetSession/deleteSessionalready use before returning events, denying as an empty response (not an error) on mismatch - consistent withgetSession's not-found-style denial rather thandeleteSession's exception-based one, sincelistEvents' existing contract already returns an empty response for a nonexistent/eventless session.Testing
Added
listEvents_wrongUser_returnsEmpty, mirroring the existinggetSession_wrongUser_returnsEmptytest in the same file. Verified locally: the new test fails against the unfixed code (confirming it genuinely exercises the gap) and passes with the fix; fullVertexAiSessionServiceTestsuite passes with no regressions.