Shanmukh Adari
11/10/2025, 1:08 PMAlon Boshi
11/10/2025, 1:11 PMAsk Inkeep
11/10/2025, 1:11 PMAsk Inkeep
11/10/2025, 1:12 PMawait permit.api.resource_relations.create(
"CSE_RAG_AGENT",
{
"key": "parent",
"name": "Parent",
"subject_resource": "DOMAIN_CSC",
}
)
2. Configure Role Derivation
Role derivation allows users with permissions on the parent resource to automatically inherit permissions on child resources (1) . This means when a user has access to DOMAIN_CSC, they'll automatically get the derived permissions for CSE_RAG_AGENT instances that are children of that DOMAIN_CSC .
The derivation works by:
1. Configuring a derivation between roles in your system
2. When a relationship tuple is created between resources, users with explicit grants to one resource implicitly gain permissions to related resources
3. Create the Relationship Instance
When you create a CSE_RAG_AGENT instance, establish its relationship to the parent DOMAIN_CSC (2) :
await permit.api.relationship_tuples.create({
subject: "DOMAIN_CSC:specific_domain_id",
relation: "parent",
object: "CSE_RAG_AGENT:specific_agent_id"
})
(3)
This creates a relationship tuple indicating that the specific DOMAIN_CSC instance is the parent of the specific CSE_RAG_AGENT instance (1) .
With this setup, users who have access permission on DOMAIN_CSC will automatically inherit the appropriate permissions for its child CSE_RAG_AGENT resources through the role derivation mechanism .Ask Inkeep
11/10/2025, 1:12 PM