OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
_meta:
type: "roles"
config_version: 2
openrag_user_role:
description: "DLS: user can read docs they own or unowned docs"
cluster_permissions:
- "indices:data/read/scroll"
- "indices:data/read/scroll/clear"
- "cluster:monitor/*"
index_permissions:
- index_patterns: ["documents", "documents*", "knowledge_filters", "knowledge_filters*", "orag-*", "orag*"]
allowed_actions:
- read
dls: >
{"bool":{"should":[
{"term":{"owner":"${user.name}"}},
{"term":{"owner":"${attr.jwt.email}"}},
{"bool":{"must_not":{"exists":{"field":"owner"}}}}
],"minimum_should_match":1}}
- index_patterns: ["documents", "documents*", "knowledge_filters", "knowledge_filters*", "orag-*", "orag*"]
allowed_actions:
- indices:admin/mappings/get
- indices:admin/exists
- indices:admin/get
- index_patterns: ["openrag_dls_principals", "openrag_dls_principals*"]
allowed_actions:
- read
- indices:data/read/get
- indices:data/read/search
dls: >
{"term":{"user_name":"${user.name}"}}
- index_patterns: ["openrag_dls_principals", "openrag_dls_principals*"]
allowed_actions:
- indices:admin/exists
- index_patterns: ["api_keys", "api_keys*"]
allowed_actions:
- read
dls: >
{"bool":{"should":[
{"term":{"user_id":"${user.name}"}},
{"bool":{"must_not":{"exists":{"field":"user_id"}}}}
],"minimum_should_match":1}}
- index_patterns: ["api_keys", "api_keys*"]
allowed_actions:
- indices:admin/mappings/get
- indices:admin/exists
- indices:admin/get
openrag_user_acl_role:
description: "DLS: user can read docs they are allowed on via ACL"
cluster_permissions: []
index_permissions:
- index_patterns: ["documents", "documents*", "knowledge_filters", "knowledge_filters*", "orag-*", "orag*"]
allowed_actions:
- read
dls: >
{"bool":{"should":[
{"term":{"allowed_users":"${user.name}"}},
{"term":{"allowed_users":"${attr.jwt.email}"}},
{"terms":{"allowed_principals":{"index":"openrag_dls_principals","id":"${user.name}","path":"principals"}}}
],"minimum_should_match":1}}