polizy-schema

Design polizy authorization schemas by mapping relations, actions, and propagation rules.

7|1|Updated Apr 23, 2025
One-click install
npx skills add https://github.com/bratsos/polizy --skill polizy-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polizy-schema
Source: https://github.com/bratsos/polizy/tree/main/skills/polizy-schema
Command: npx skills add https://github.com/bratsos/polizy --skill polizy-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Polizy-schema guides architects and developers in designing robust authorization models by clearly defining relations, actions, and propagation rules for polizy.

Core Features & Use Cases

  • Defines relation types (direct, group, hierarchy) and how actions map to them to enforce fine-grained access control.
  • Demonstrates schema evolution and safe upgrades without breaking existing tuples.
  • Provides concrete examples and best practices for scalable, maintainable authorization models.

Quick Start

Define your schema with defineSchema, listing your relations, actions, and optional hierarchyPropagation to apply polizy rules.

Frequently Asked Questions about polizy-schema

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

FAQPage Schema
How do I design an authorization schema with hierarchy and group relations?

You can design an authorization schema by mapping relations, actions, and propagation rules to a coherent access model. This approach supports direct, group, and hierarchy relationships to enforce fine-grained access control using type-safe definitions.

What is the best way to map actions to relations for type-safe access control?

Mapping actions to relations for type-safe access control involves defining your schema with explicit relation types and clear action mappings. This ensures safe hierarchy propagation and maintains fine-grained authorization rules across your application.

How do I evolve an authorization schema without breaking existing tuples?

You can evolve an authorization schema without breaking existing tuples by following safe upgrade practices. This involves carefully structuring hierarchy propagation and relation definitions to ensure backward compatibility during schema modifications.

When do I need configurable hierarchy propagation in an access model?

Configurable hierarchy propagation is needed when your access model requires inheritance of permissions across nested group or hierarchical relationships. It ensures that actions mapped to relations propagate safely through direct and indirect user connections.

Does polizy support direct, group, and hierarchy relationships in a single schema?

Yes, a single schema can support direct, group, and hierarchy relationships simultaneously. By defining these relation types alongside configurable propagation rules, you enforce scalable and maintainable fine-grained access control.

What are the limitations of defining fine-grained access control with static schemas?

Static schemas for fine-grained access control can limit flexibility when handling complex hierarchy propagation or evolving relation types. Without configurable propagation rules, maintaining safe upgrades and mapping actions to relations becomes difficult as the application scales.