Comprehensive guidance for authentication and authorization in the Mossback platform. Covers users, sessions, login, logout, single sign-on, API keys, tokens, roles, permissions, policies, organisations, teams, membership, invitations, role models, permission models, impersonation, and audit logging. Also covers how a request is authenticated, how a permission check is written, how a new role or permission is introduced, how API keys are scoped and rotated, and how an administrator action is recorded. Helps with adding a permission, debugging a 401 or 403, restricting an endpoint, reviewing who can do what, and adding audit coverage. Use when the user mentions auth, login, a session, a token, an API key, a role, a permission, access, security, an organisation, a team, or asks who is allowed to do something. Always follows the Mossback platform conventions, house style, and established best practices.
Permission checks go through can(actor, action, resource) in src/access/policy.ts.
A new permission is added to src/access/permissions.ts and granted to roles in the same change.
Every administrator action writes an audit_log row in the same transaction.
API keys are stored hashed. The full value is shown once, at creation.
1---2name: access-control3description: Comprehensive guidance for authentication and authorization in the Mossback platform. Covers users, sessions, login, logout, single sign-on, API keys, tokens, roles, permissions, policies, organisations, teams, membership, invitations, role models, permission models, impersonation, and audit logging. Also covers how a request is authenticated, how a permission check is written, how a new role or permission is introduced, how API keys are scoped and rotated, and how an administrator action is recorded. Helps with adding a permission, debugging a 401 or 403, restricting an endpoint, reviewing who can do what, and adding audit coverage. Use when the user mentions auth, login, a session, a token, an API key, a role, a permission, access, security, an organisation, a team, or asks who is allowed to do something. Always follows the Mossback platform conventions, house style, and established best practices.4metadata:5 source: https://skillmd.com/skills/tuyv/access-control6---78# Access Control910## Rules1112- Permission checks go through `can(actor, action, resource)` in `src/access/policy.ts`.13- A new permission is added to `src/access/permissions.ts` and granted to roles in the same change.14- Every administrator action writes an `audit_log` row in the same transaction.15- API keys are stored hashed. The full value is shown once, at creation.
Run npx get-skill add tuyv/access-control in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Comprehensive guidance for authentication and authorization in the Mossback platform. Covers users, sessions, login, logout, single sign-on, API keys, tokens, roles, permissions, policies, organisations, teams, membership, invitations, role models, permission models, impersonation, and audit logging. Also covers how a request is authenticated, how a permission check is written, how a new role or permission is introduced, how API keys are scoped and rotated, and how an administrator action is recorded. Helps with adding a permission, debugging a 401 or 403, restricting an endpoint, reviewing who can do what, and adding audit coverage. Use when the user mentions auth, login, a session, a token, an API key, a role, a permission, access, security, an organisation, a team, or asks who is allowed to do something. Always follows the Mossback platform conventions, house style, and established best practices. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tuyv (@tuyv) published this skill. Their other Agent Skills are listed on their SkillMD profile.