Skip to content

[Sparkth] Expose UUIDs instead of sequential integer IDs for conversations #190

@hamza-56

Description

@hamza-56

Chat conversation IDs are sequential integers exposed in the public API and frontend URLs (e.g., /dashboard/chat?id=42). This allows trivial enumeration of conversations and leaks information about total conversation count.

Current State

  • chat_conversations.id is a sequential INTEGER primary key
  • This integer ID is exposed in:
    • API path params: GET /api/v1/chat/conversations/{conversation_id}
    • API request/response bodies: ChatCompletionRequest.conversation_id, ConversationResponse.id
    • Frontend URLs: ?id={conversationId}
  • The User model already follows the dual ID pattern — id: int PK + uuid: UUID (uuid7) for public exposure

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions