indykite-authzen-list-policies
Skill4 starsChanged 4 months agoApache-2.0View on GitHub
List the ACTIVE KBAC authorization policies of the calling application agent's project at runtime via the IndyKite AuthZEN REST API (`GET /access/v1/policies`) - each policy returned as stored (inlined JSON object) with its tags, optionally narrowed with `?subject_type=`. Needs the `ReadAuthZConfigs` API permission on the AppAgent; no Service Account token, no user token. Use to show which rules currently apply, discover the actions / resource types / tags that exist for a subject type before asking for decisions, or pick `context.policy_tags` - "which policies apply to Person right now?", "what actions exist for Server?", "why 401 on /access/v1/policies?". Not for making decisions (indykite-authzen-evaluation / -evaluations), enumerating allowed actions / resources / subjects for a specific subject (indykite-authzen-search-*), or creating / updating / deleting policies (indykite-authzen-kbac-policies, Config API). Never lists ContX IQ 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-search-actionSkill
- indykite-authzen-search-resourceSkill
- indykite-authzen-search-subjectSkill
- 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
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 30
Do not activate this skill when the user wants to:
- Very specific: line 35
read the graph schema rather than the policies - indykite-data-schema.
- Distinctive: line 43
If a prerequisite is missing, say so - an empty listing looks the same whether no policy exists or the wrong project's credential was used.
- Distinctive: line 96
Only the calling agent's project.
- Very specific: line 104
Choose
policy_tagsfromtags: Only tags that appear here can select anything on an evaluation. - Distinctive: line 110
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 - list the project's active KBAC policies
GET /access/v1/policies lets an application agent read the ACTIVE KBAC (Knowledge-Based Access Control) policies of its own project at runtime. Each policy comes back exactly as it was stored through the Config API, inlined as a JSON object, together with its tags. It is a read-only runtime view of the rules the decision endpoints evaluate: no Service Account credentials, no policy IDs, no lifecycle operations.
It sits next to the other runtime AuthZEN endpoints under /access/v1, but answers a different question:
| Question | Endpoint | Skill |
| Which rules apply in this project right now? | GET /policies | this skill |
| Can X do Y on Z? (one / many) | POST /evaluation(s) | indykite-authzen-evaluation / -evaluations |
| Which actions / resources / subjects are allowed? | POST /search/* | indykite-authzen-search-action / -resource / -subject |
| Create, update, publish, or delete a policy | Config API | indykite-authzen-kbac-policies |
When to use
Activate this skill when the user wants to:
- see which KBAC policies are active in the project, from an application (not an admin) credential - "which rules apply to
Personright now?"; - discover the vocabulary a subject type can be asked about - the
actionsandresource.typevalues present in policies forPerson- before building evaluation or search requests, e.g. for an AI agent that must not guess action names; - pick the
policy_tagsto send undercontexton an evaluation, from the tags that actually exist; - debug a
401on/access/v1/policies- almost always the missingReadAuthZConfigsAPI permission.
Do not activate this skill when the user wants to:
- make a decision -
indykite-authzen-evaluation/indykite-authzen-evaluations; - enumerate what a specific subject may do (actions, resources, subjects under current graph state) - the
indykite-authzen-search-*skills; this listing shows the rules, not their outcome for a given node; - author, update, activate, or delete a policy, or needs policy IDs, names, ETags,
INACTIVE/DRAFTpolicies, or CIQ policies -indykite-authzen-kbac-policies(Config API, Service Account token); - read the graph schema rather than the policies -
indykite-data-schema.
Prerequisites
- An IndyKite project with an AppAgent and AppAgent credentials (the token that goes into
X-IK-ClientKey) - see the Credentials guide. - The AppAgent holds the
ReadAuthZConfigsAPI permission. It is a separate permission fromAuthorizationand is not granted to existing agents automatically: add it to the agent'sapi_permissions(POST/PUT /configs/v1/application-agents, Service Account token, or the Hub UI). The full permission-to-endpoint map is in the Environment guide. - At least one ACTIVE KBAC policy in the project - otherwise the listing is an empty
resultsarray, which is a normal200.
If a prerequisite is missing, say so - an empty listing looks the same whether no policy exists or the wrong project's credential was used.
Steps
1. Call the endpoint
GET <API_URL>/access/v1/policies
GET <API_URL>/access/v1/policies?subject_type=Personwhere API_URL is https://eu.api.indykite.com or https://us.api.indykite.com, matching the project's region. Authentication is the AppAgent credential in the X-IK-ClientKey header, as is, without any prefix. No request body, no user token - the project is derived from the credential.
The only parameter is the optional query subject_type: keep only the policies whose subject.type equals this node type (a valid node label such as Person or _Application, 2-64 characters, case-sensitive). Omit it to get every policy. A subject type no policy uses is not an error - it returns {"results": []}.
A runnable shell helper builds the authenticated request: scripts/list-policies.sh - pass the subject type as the optional argument, run with --print to preview the curl (host-pinned; token redacted).
2. Read the response
{
"results": [
{
"policy": {
"meta": { "policy_version": "2.0-kbac" },
"subject": { "type": "Person" },
"actions": ["CAN_DRIVE"],
"resource": { "type": "Car" },
"condition": { "cypher": "MATCH (subject:Person)-[:DRIVES]->(resource:Car)" }
},
"tags": []
},
{
"policy": {
"meta": { "policy_version": "2.0-kbac" },
"subject": { "type": "_Application" },
"actions": ["CAN_READ"],
"resource": { "type": "Car" },
"condition": { "cypher": "MATCH (subject) MATCH (resource:Car)" }
},
"tags": ["fleet"]
}
]
}results[]- one entry per policy; empty when nothing matches.results[].policy- the policy definition as stored: thepolicystring given toPOST /configs/v1/authorization-policies, parsed back into an object (no escaping to undo). Its shape followsmeta.policy_version-meta,subject,actions,resource,condition(withcypherand an optionalfilter) appear exactly as authored.results[].tags- the policy's tags, the values matched bycontext.policy_tagson evaluation. Always an array,[]when the policy has none.
What is (and is not) listed:
- KBAC policies (
2.0-kbacand3.0-kbac) with status ACTIVE only - the same set the decision endpoints evaluate. - Only the calling agent's project; there is no project parameter.
- No ContX IQ (
1.0-ciq) policies, no policyid/name/ timestamps / ETag - those live on the Config API.
The full field reference, error table, and jq recipes are in references/list-policies-reference.md.
3. Use what it tells you
- Build requests from real values. Take
actions[],resource.type, andsubject.typeverbatim intoindykite-authzen-evaluation/ search requests instead of guessing action names. - Choose
policy_tagsfromtags. Only tags that appear here can select anything on an evaluation. - Spot required
input_params. A$nameinsidecondition.cypheris a partial parameter the decision call must supply undercontext.input_params. - Don't mistake it for a decision. A policy being listed says nothing about whether a given subject passes its condition - ask the evaluation or search endpoints for that.
Outcome
When this skill has been applied successfully:
GET /access/v1/policies(optionally with?subject_type=) returns aresultsarray of the project's ACTIVE KBAC policies, each with its storedpolicyobject andtags, or an empty array when none match.- The AppAgent used holds
ReadAuthZConfigs, and downstream evaluation / search requests use action names, resource types, subject types, and tags taken from the listing.
Files in this skill
references/list-policies-reference.md- endpoint, auth and permission, query parameter, response fields, error codes, troubleshooting, andjqrecipes.scripts/list-policies.sh- Bash helper that GETs/access/v1/policieswith the right header and an optionalsubject_type(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 or an HTTP client). No Claude Code hooks, Cursor @-mentions, or Copilot workspace context are required.
References
- AuthZEN guide (developer hub) - "How do I read the policies behind the decisions?"
- Resource authz-9 (developer hub) - full worked example of
GET /access/v1/policies - Environment guide (developer hub) - Application Agent API permissions
- IndyKite REST API documentation (Authorization API)
- Credentials guide
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.

