authorization-access-control
Skill11 starsChanged 10 days agoMITView on GitHub
Use when designing or reviewing roles, permissions, tenant isolation, object ownership, administrative actions, or server-side authorization checks in web applications and APIs.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- document-head-seoSkill
- font-performanceSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Ensure every sensitive operation is authorized for the current principal, requested action and specific resource.
- Distinctive: line 17
Check object-level access on every operation that uses a client-supplied identifier.
- Distinctive: line 18
Check function-level access for privileged endpoints and administrative workflows.
- Distinctive: line 29
Read-only users cannot modify protected fields.
- Distinctive: line 36
Avoid relying on frontend route guards, hidden buttons or client-side role flags.
- Distinctive: line 37
Use policy functions that receive the principal, action and resource explicitly.
- Distinctive: line 40
Avoid ambiguous fallback behavior when policy evaluation fails.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Authorization and Access Control
Objective
Ensure every sensitive operation is authorized for the current principal, requested action and specific resource. Authentication proves identity; it does not grant blanket access.
Workflow
- Inventory actors, roles, permissions, resources, tenants and sensitive operations.
- Define policy centrally and enforce it at the server-side service or data-access boundary.
- Deny by default. Grant only the minimum permissions required for the task.
- Check object-level access on every operation that uses a client-supplied identifier.
- Check function-level access for privileged endpoints and administrative workflows.
- Restrict writable properties with explicit allowlists or command-specific input models. Never bind arbitrary request fields directly to persistence models.
- Enforce tenant boundaries in reads, writes, exports, background jobs, caches and object storage.
- Re-check authorization for asynchronous jobs and long-running operations at execution time where permissions may change.
- Record security-relevant denials and privileged changes without logging secrets or unnecessary personal data.
Required negative tests
- User A cannot read, update, delete or export User B's resources by changing an identifier.
- A user cannot access another tenant's records, including through search, bulk operations or indirect relationships.
- A regular user cannot call administrative functions directly.
- Read-only users cannot modify protected fields.
- A user cannot elevate privileges by adding role, owner, tenant or approval fields to a request.
- Revoked permissions take effect within the documented consistency window.
- Background tasks do not execute with broader authority than intended.
Implementation guidance
- Avoid relying on frontend route guards, hidden buttons or client-side role flags.
- Use policy functions that receive the principal, action and resource explicitly.
- Apply authorization before returning sensitive data or performing side effects.
- Make resource queries tenant-aware rather than fetching globally and filtering after exposure.
- Avoid ambiguous fallback behavior when policy evaluation fails.
Completion criteria
Sensitive routes and data operations have explicit server-side authorization, tenant isolation is tested, and negative tests cover object, function and property-level access.
Common AI failure mode
Failure: An agent checks that a user is signed in but fails to authorize access to the specific resource identified by a client-supplied ID.
Why it matters: An authenticated user can change an identifier and read, modify, delete, or export another user's object. Frontend route guards and hidden controls do not protect server-side data operations.
Symptoms:
- Changing an object ID in a request returns another user's resource.
- List, search, export, or background-job paths omit the same ownership or tenant check used by the detail route.
- Authorization is checked only in the UI or before a later resource lookup changes the target object.
Prevention: At the server-side data boundary, authorize the current principal against the requested action and resolved resource on every operation. Scope resource queries by owner or tenant, deny by default, and re-check authorization in asynchronous work where permissions can change. Add negative tests that substitute another user's IDs across reads, writes, deletes, exports, and indirect access paths.
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.

