Skip to content

User Management: Document-Level Access via Keycloak Helm Chart #5

@robodev-r2d2

Description

@robodev-r2d2

Summary

Implement user management in the rag-template project so that different users have access to different documents within the vectordatabase. Employ the Keycloak Helm chart to enable authentication and authorization features.

Motivation

Currently, all users may have equal access to the vectordatabase content. For compliance, security, and product feature requirements, we need document-level access control so that only authorized users can view or query specific documents.

Proposed Solution

  • Integrate Keycloak using its Helm chart for Kubernetes-based deployment.
  • Configure Keycloak realms, clients, and roles/groups to reflect user types and document access levels.
  • Update the application logic to check user roles/groups and filter document access accordingly when querying the vectordatabase.
  • Ensure vectordatabase queries are permission-aware, returning only documents the user is authorized to access.
  • Provide admin functionality to assign documents to users/groups.

Implementation Steps

  1. Add Keycloak Helm chart to the deployment process.
  2. Define user roles/groups for document access control in Keycloak.
  3. Update backend to authenticate users via Keycloak and enforce access restrictions when serving queries.
  4. Create utilities for admins to manage user-document assignments.
  5. Document the setup and usage in the repo's README.

Acceptance Criteria

  • Keycloak is deployed via Helm and integrated with the app.
  • Users can only access documents they are authorized for.
  • Admins can assign/revoke document access to/from users.
  • Documentation for setup and usage is available.

If you need code snippets, sample Keycloak Helm chart values, or integration examples, please specify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions