Repository navigation
docs(integrations): add security section to MongoDB README - #7921
Closed
atandon2024 wants to merge 3 commits into
Closed
atandon2024 wants to merge 3 commits into
atandon2024 wants to merge 3 commits into
Conversation
Documents what the session and memory services store, why app_name, user_id and session_id must come from an authenticated identity, the search-filter operator allowlist, untrusted search results, and how reads are bounded.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Contributor
Author
|
@theshanbhag could you please review this PR? |
atandon2024
marked this pull request as ready for review
November 2, 2026 15:26
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
Merge #7921 PiperOrigin-RevId: 1014003326
Collaborator
|
Thank you @atandon2024 for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 1f49e28. Closing this PR as the changes are now in the main branch. |
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
2. Or, if no issue exists, describe the change:
Problem:
The MongoDB integration README explains least-privilege roles and keeping the connection string out of Agent Engine packages. It doesn't say what the session and memory services store, which inputs they trust, or where the boundary between users and tenants lies.
Solution:
Add a
## Securitysection, placed before "Required permissions", modeled on the security section of mongodb-developer/claude-agent-sdk-mongodb-session-store. Documentation only; no code changes.event_data. Covers TLS and auth, least-privilege users, write access, and encryption at rest or CSFLE (including which fields must stay unencrypted).app_name,user_idandsession_idgo straight into query filters and are not type-checked, so a dict such as{"$ne": ""}acts as an operator._check_filteraccepts, and notes that the allowlist limits what a filter can express, not what data it can reach.max_resultsandtimeout_ms, and howtimeoutMSandGetSessionConfigtighten them.Testing Plan
Documentation-only change.
Unit Tests:
pytest tests/unittests/integrations/mongodb: 128 passed.I also checked each claim with a throwaway test file using the existing fakes (23 passed, not committed):
event_data;_id,app_name,user_id,session_idandevent_id, neverevent_dataor state;keywords;{"$ne": ""}user_idreaches the query filter without validation;$where,$exprand nested$regexraiseValueError;max_resultsandtimeout_msdefaults are 50 and 60000;GetSessionConfig(num_recent_events=..., after_timestamp=...)limits loaded events.Every in-page anchor resolves to a heading, and the external MongoDB doc links return 200.
Checklist