Users
Represent the identity or account to which persistent information belongs. User scope lets information remain available across separate conversations.
Sessions
Represent a particular conversation, workflow, or period of activity. Helps maintain short-term continuity without treating every detail as permanent.
Namespaces
Represent a higher-level isolation boundary, such as an organization, workspace, or customer account, when supported by the deployment.
Users and sessions serve different purposes
Recommended scope model
- Use a stable application-level identifier for each user.
- Create or resolve a session identifier for each conversation or workflow.
- Associate requests with the correct tenant or namespace when multi-tenant isolation is required.
Example identity model
Data isolation
- Authenticate every request.
- Authorize access to the requested user, session, and tenant.
- Validate scope identifiers on the server.
- Prevent one tenant from querying another tenant’s information.
- Apply consistent access rules to retrieval, updates, and deletion.
- Avoid logging secrets or unnecessary personal information.
- Test cross-user and cross-tenant access boundaries.

