← Zurück zum Katalog

Skill · Version 1.0.0

Berechtigungsregeln modellieren

Definiert Zugriffsentscheidungen anhand von Akteur, Organisationsbereich, Aktion, Datensatzstatus, Beziehungen und Freigaben.

authorization-modeling

Entdecke, wie der Skill hilft

Wann ist der Skill hilfreich?

Nutze diesen Skill, wenn Rollennamen Eigentum, Schwellenwerte oder delegierte Rechte nicht ausreichend beschreiben.

Wobei hilft er dir?

  • Formuliert ausdrückliche Regeln innerhalb der vorhandenen Policy-Architektur.
  • Trennt direkte, delegierte und unabhängig freizugebende Aktionen.
  • Bestimmt Folgen geänderter Eigentümer, Werte und Benutzerrechte.

Das könntest du fragen

Modelliere Angebotsbearbeitung und Freigabe: hohe Rabatte benötigen eine andere Person und geänderte Summen eine neue Freigabe. Erstelle eine Aktionsmatrix für Entwürfe, freigegebene und geänderte Angebote. Prüfe die API-Regeln einschließlich des Versuchs, den eigenen Rabatt freizugeben.

Ausführliche Dokumentation

Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.

Details…Weniger anzeigen

Authorization Modeling

When to Use

Use when designing, reviewing, or refactoring roles, permissions, access policies, ownership rules, or approval requirements in an application.

The Six-Question Authorization Decision Tuple

Never model authorization as a flat user.role === 'admin' check. Every policy rule must answer six questions explicitly:

  1. Who is the Initiating Principal (Subject)? Human user, API key, webhook principal, or AI agent (plus the delegating user if acting on behalf of someone).
  2. In Which Organizational Scope & Capacity? Active tenant/workspace membership, department/team assignment, and active role(s).
  3. Which Action (Verb) on Which Target Resource (Object)? E.g., quote:create, quote:edit, quote:submit, quote:approve, quote:export.
  4. Which Resource State, Ownership, Relationship, or Value Threshold Applies?
    • State: A draft quote is editable by its owner; an approved or invoiced quote is immutable even by its owner.
    • Relationship: Account owner, department manager, project collaborator, or direct report.
    • Threshold: Discounts > 15% or orders > 10,000 EUR require manager approval.
  5. Is Delegation or Explicit Approval Required? Does the action execute immediately (ALLOW), require a co-signer (REQUIRE_APPROVAL), or rely on a time-bounded delegation grant?
  6. What Happens When Conditions Change Later? What if the resource owner changes, the quote total is edited after approval, or the user's role is revoked while a job is queued?

Choosing the Right Paradigm (Without Over-Engineering)

Adapt to the project's existing policy/gate layer and combine models only where warranted:

  • RBAC (Role-Based Access Control): Map roles (sales_rep, sales_manager, finance_approver, auditor) to explicit permission capabilities (quote:approve), never scattering raw role names across controllers. Apply role hierarchy only where business rules genuinely state a higher role inherits all lower permissions (often false under Separation of Duties—e.g., an engineering_lead or system_admin must not automatically have permission to approve their own expense report!).
  • ABAC (Attribute-Based Access Control): Evaluate subject attributes (user.departmentId), resource attributes (quote.status === 'draft', quote.discountPct <= 15), and environment constraints.
  • ReBAC (Relationship-Based Access Control): Derive permissions from domain graph edges (user -> owner_of -> account -> parent_of -> opportunity).

Build an Explicit Authorization Matrix First

Before writing enforcement code, document a concrete Subject $\times$ Resource State $\times$ Action Matrix with real examples, highlighting edge cases, exceptions, and conflicting rules (deny-overrides vs. explicit exception grants).

Enthaltene Dateien 1

  • SKILL.md

Über dieses Skill-Paket

authorization-modeling

authorization-modeling: Macht Zugriffsregeln eindeutig und setzt sie auf dem Server durch, mit Berechtigungsszenarien und Audit-Nachweisen.

Details…Weniger anzeigen

authorization-modeling

authorization-modeling: Macht Zugriffsregeln eindeutig und setzt sie auf dem Server durch, mit Berechtigungsszenarien und Audit-Nachweisen.

Enthält den vollständigen Skill und seine Begleitdateien (1 Dateien). Der genaue, ursprünglich verfasste Anwendungsbereich bleibt unten erhalten.

Ursprüngliche Skill-Beschreibung (Quellsprache)

Use when modeling fine-grained authorization rules combining RBAC, ABAC, and ReBAC—explicitly defining principals, organizational scopes, actions, resource states, thresholds, and separation-of-duty invariants.

Installiere den Skill, prüfe seine Quelle und Vertrauenseinstellungen und aktiviere ihn für das passende Projekt oder den Agenten.

Voraussetzungen

  • Orqestria auf deinem Computer installiert.