indykite-authzen-search-subject
Skill4 starsChanged 4 months agoApache-2.0View on GitHub
List the subjects allowed to perform a given action on a resource via the IndyKite AuthZEN REST API (`POST /access/v1/search/subject`) - given a resource and an action, returns the matching subject instances of a type. Use to enumerate who has access - "who can provision gpu-node-7?", "list the people allowed to approve this document" (audit / reviewer views). Not for a specific-subject yes/no ("can grace provision gpu-node-7?" -> indykite-authzen-evaluation); to enumerate the other axes use indykite-authzen-search-action (which actions) or indykite-authzen-search-resource (which resources); to author the policy use indykite-authzen-kbac-policies.
In this repository25 other files it gives its agents.
- indykite-agent-gatewaySkill
- indykite-audit-logsSkill
- indykite-authzen-evaluationSkill
- indykite-authzen-evaluationsSkill
- indykite-authzen-kbac-policiesSkill
- indykite-authzen-list-policiesSkill
- indykite-authzen-search-actionSkill
- indykite-authzen-search-resourceSkill
- indykite-capture-delete-node-propertiesSkill
- indykite-capture-delete-node-property-metadataSkill
- indykite-capture-delete-nodesSkill
- indykite-capture-delete-relationship-propertiesSkill
- indykite-capture-delete-relationshipsSkill
- indykite-capture-upsert-nodesSkill
- indykite-capture-upsert-relationshipsSkill
- indykite-ciq-add-propertySkill
- indykite-ciq-add-relationship-propertySkill
- indykite-ciq-create-nodeSkill
- indykite-ciq-create-node-with-linkSkill
- indykite-ciq-create-relationshipSkill
- indykite-ciq-deleteSkill
- indykite-ciq-readSkill
- indykite-ciq-whoamiSkill
- indykite-data-schemaSkill
- indykite-mcp-serverSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Do not activate this skill for a single yes/no decision (indykite-authzen-evaluation), to enumerate actions or resources instead (the …
- Distinctive: line 39
If a prerequisite is missing, say so - an empty result set from a missing policy or absent node looks identical to a real "nothing …
- Very specific: line 53
Do not set subject.id - the subjects are what the search returns.
- Distinctive: line 92
When this skill has been applied successfully:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IndyKite AuthZEN - subject search
Subject search asks the AuthZEN endpoint: which subjects may perform a given action on this resource? Given a subject type, one resource, and one action, it returns the matching subject instances under the project's currently ACTIVE KBAC policies and current graph state.
It is one of three AuthZEN search endpoints, each pinning two of the three (subject, action, resource) parts and enumerating the third:
| Endpoint | Pinned | Enumerates | Skill |
/search/action | subject + resource | actions | indykite-authzen-search-action |
/search/resource | subject + action | resources | indykite-authzen-search-resource |
/search/subject | resource + action | subjects | this skill |
This skill covers building and sending the request and reading the results. It does not author policies - the 2.0-kbac and 3.0-kbac policies these results are evaluated against are authored with indykite-authzen-kbac-policies.
When to use
Activate this skill when the user wants to:
- list every subject of a type that may perform an action on a specific resource (e.g. "who can
DEPLOYgpu-node-7?", "who can approve this document?"); - build an audit or reviewer view of who currently has access to an item;
- debug why an expected subject is or is not in a resource's permitted set.
Do not activate this skill for a single yes/no decision (indykite-authzen-evaluation), to enumerate actions or resources instead (the sibling search skills), or to author a policy or read/write graph data (search only lists subjects).
Prerequisites
- One or more ACTIVE KBAC policies whose
subject.type/resource.typeandactionscover the question. If none exist, author them first withindykite-authzen-kbac-policies; search over an empty policy set returns{"results": []}. - An AppAgent with credentials configured for the calling application (Credentials guide).
- The IKG populated with the candidate subject nodes and the resource node (and any relationships the policy conditions match).
- Any partial parameters a candidate policy references, ready to pass under
context.input_params.
If a prerequisite is missing, say so - an empty result set from a missing policy or absent node looks identical to a real "nothing permitted".
Steps
1. Pin the resource and the action; leave the subject a type
Subject search fixes the resource and the action, and searches across subjects of a given type:
| Part | Field | Example |
| subject | subject.type only | Person (no id) |
| action | action.name | PROVISION |
| resource | resource.type + resource.id | Server / gpu-node-7 |
Do not set subject.id - the subjects are what the search returns.
2. Build the request body
{
"subject": { "type": "Person" },
"resource": { "type": "Server", "id": "gpu-node-7" },
"action": { "name": "PROVISION" },
"context": { "input_params": { "max_price": 80000 } }
}Include context.input_params only if a candidate policy references a $name partial parameter; supply each key without the $, correctly typed. A location-routed 3.0-kbac policy on a composite IKG takes its logical location here too ({ "region": "east" }, a key of the project's alias_mapping); only subjects stored in that location can be returned, and a missing or unknown location is a 422 - see references/search-subject-reference.md. A ready body: assets/search-subject-request.json.
3. Send the search
POST <API_URL>/access/v1/search/subjectThe endpoint authenticates the calling application (its AppAgent credentials - always required). A user access token is accepted too, but for subject search it typically has no effect on the result set (you are enumerating subjects, not acting as one). Which credential goes in which request header is covered by the Credentials guide.
A runnable shell helper builds the authenticated request: scripts/search-subject.sh — run with --print to preview the curl (host-pinned; tokens redacted).
4. Read the results
{ "results": [ { "type": "Person", "id": "grace" }, { "type": "Person", "id": "dennis" } ] }Each results[] entry is a subject (type + id, the external_id) allowed the action on that resource. An empty results array is a normal 200 meaning no subject of that type is permitted - not an error.
5. Verify
Empty or surprising results usually trace to: subject.id accidentally set (it takes subject.type only), resource.id not being an external_id, the action not matching a policy, a $param missing/mistyped (loosening max_price widens the set), or the subject nodes being absent. Full checklist: references/search-subject-reference.md.
Outcome
When this skill has been applied successfully:
POST /access/v1/search/subjectreturns aresultsarray of subject instances (type+id) allowed a given action on a specific resource, under current ACTIVE policies and graph state (an empty array means no subject of that type permitted — a normal200).- The subjects returned are consistent with single-decision (
/access/v1/evaluation) results for the same triples.
Files in this skill
references/search-subject-reference.md- endpoint, auth, request/response shape, error codes, troubleshooting, sibling endpoints.assets/search-subject-request.json- runnable subject-search request body for the "who canPROVISIONgpu-node-7" example.scripts/search-subject.sh- Bash helper that posts a search request to/access/v1/search/subject(host-pinned;--printto preview).
Agent-specific notes
This skill uses generic markdown instructions and works across all agents listed in the README. The agent needs to be able to issue HTTP requests (curl, an HTTP client, or the IndyKite Terraform provider). No Claude Code hooks, Cursor @-mentions, or Copilot workspace context are required.
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

