relationship-query

Query SpiceDB/Kessel RBAC relations to retrieve tuples and trace access chains.

11|77|Updated Feb 1, 2019
One-click install
npx skills add https://github.com/RedHatInsights/insights-rbac --skill relationship-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: relationship-query
Source: https://github.com/RedHatInsights/insights-rbac/tree/main/.cursor/skills/relationship
Command: npx skills add https://github.com/RedHatInsights/insights-rbac --skill relationship-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps users query and understand complex relationships within the RBAC (Role-Based Access Control) system, specifically interacting with SpiceDB/Kessel via the RBAC relations API. It clarifies who has access to what, and how that access is granted.

Core Features & Use Cases

  • Relationship Querying: Retrieve tuples and resource information related to RBAC entities like groups, roles, and role bindings.
  • Access Chain Verification: Trace the path of access from a user to a resource, verifying each step in the chain (user -> group -> role binding -> role -> workspace).
  • Use Case: A security administrator needs to determine if a specific user has access to a particular workspace. This Skill can trace the user's group memberships, the role bindings associated with those groups, and the roles assigned to those bindings, ultimately confirming access to the target workspace.

Quick Start

Use the relationship skill to find all members of the group with UUID 'example-group-uuid' in the stage environment.

Frequently Asked Questions about relationship-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query RBAC relationships in SpiceDB to verify user access?

To query RBAC relationships in SpiceDB, you can retrieve tuples and trace the access chain from user to resource, verifying steps like group memberships, role bindings, and roles to confirm workspace access.

What is an RBAC relationship query and when do I need it?

An RBAC relationship query retrieves tuples and resource information from SpiceDB or Kessel. You need it to understand complex access control configurations and clarify who has access to what within your system.

Do I need a session token to query access control configurations in Kessel?

Yes, querying access control configurations in Kessel requires a valid SESSION token. You must also configure environment settings for stage or prod environments using a config.env file.

How do I trace a user's access chain through groups and role bindings?

You trace a user's access chain by looking up resources based on defined filters and subjects. This verifies each step from user to group, through role bindings, to roles, and ultimately to the target workspace.

Can I look up resources using subject filters in the SpiceDB relations API?

Yes, you can look up resources in the SpiceDB relations API by applying defined filters and subjects. This allows you to retrieve specific resource information related to RBAC entities like groups and roles.