name: design-a-permission-model
description: Design a permission model with roles, resource scopes, deny rules, and auditable checks. Use when the user needs to control which identities can perform actions on protected resources.
domain: architecture-design
tags: [permissions, authorization, access-control]
triggers: ["permission model design", "role based access architecture", "resource authorization policy"]
Design a permission model with roles, resource scopes, deny rules, and auditable checks
Purpose
Design a permission model with roles, resource scopes, deny rules, and auditable checks.
When to use
Use when the user needs to control which identities can perform actions on protected resources.
When NOT to use
Do not use this for a local implementation detail; use software-engineering instead.
Inputs required
- The functional and non-functional requirements
- The constraints on scale, budget and timeline
- The existing systems the design must fit
Procedure
- List the identities, protected resources, actions, and scope levels in the system.
- Define roles, permissions, resource attributes, and the inheritance or delegation rules.
- Specify allow and deny precedence, default posture, and behavior for missing policy data.
- Enforce checks at every service boundary and keep ownership decisions close to resources.
- Log authorization decisions with actor, action, resource, result, and policy version.
- Test privilege escalation, stale grants, and cross-tenant access paths against explicit assumptions.
Output contract
A design with components, interfaces, data flows, failure modes and a migration path.
Validation checklist
Safety notes
Never present a design as final without stating the assumptions it depends on.
Related skills
design-a-data-model-for-a-feature
design-a-multi-tenant-data-model
design-a-batch-processing-pipeline
1---2name: design-a-permission-model3description: Design a permission model with roles, resource scopes, deny rules, and auditable checks. Use when the user needs to control which identities can perform actions4---5---6name: design-a-permission-model7description: Design a permission model with roles, resource scopes, deny rules, and auditable checks. Use when the user needs to control which identities can perform actions on protected resources.8domain: architecture-design9tags: [permissions, authorization, access-control]10triggers: ["permission model design", "role based access architecture", "resource authorization policy"]11---1213# Design a permission model with roles, resource scopes, deny rules, and auditable checks1415## Purpose1617Design a permission model with roles, resource scopes, deny rules, and auditable checks.1819## When to use2021Use when the user needs to control which identities can perform actions on protected resources.2223## When NOT to use2425Do not use this for a local implementation detail; use software-engineering instead.2627## Inputs required2829- The functional and non-functional requirements30- The constraints on scale, budget and timeline31- The existing systems the design must fit3233## Procedure34351. List the identities, protected resources, actions, and scope levels in the system.362. Define roles, permissions, resource attributes, and the inheritance or delegation rules.373. Specify allow and deny precedence, default posture, and behavior for missing policy data.384. Enforce checks at every service boundary and keep ownership decisions close to resources.395. Log authorization decisions with actor, action, resource, result, and policy version.406. Test privilege escalation, stale grants, and cross-tenant access paths against explicit assumptions.4142## Output contract4344A design with components, interfaces, data flows, failure modes and a migration path.4546## Validation checklist4748- [ ] Every requirement maps to a component49- [ ] Failure and rollback paths are described50- [ ] The trade-offs behind the choice are written down5152## Safety notes5354Never present a design as final without stating the assumptions it depends on.5556## Related skills5758- `design-a-data-model-for-a-feature`59- `design-a-multi-tenant-data-model`60- `design-a-batch-processing-pipeline`