kirby-security-and-auth
БесплатноБез исполняемых скриптовНе проверенSecures Kirby sites with access restriction, user roles, permissions, and protected downloads. Use when implementing login/role-based access, permissions, or…
Об этом скилле
Kirby Security and Auth
Use Kirby 6 conventions for new work. For existing authentication integrations, consult kirby://kb/scenarios/83-migrate-kirby-5-to-6 before changing login or session handling.
Kirby 6 authorization and login
- Model guards (
isAvailable,ensureExecutable) replace deprecated model permissions checks. Role permissions and blueprint options remain separate: do not mechanically replace$role->permissions(). - Use
authenticate()and handleKirby\Auth\Status/State::Pending; grant access only after successful challenge completion.login2fa()is legacy; password-onlylogin()cannot complete 2FA. - Users may opt into 2FA even if not globally required. Basic Auth cannot complete it; use appropriately scoped API accounts instead of weakening editor accounts.
- Old cookies are invalidated on upgrade. Test fresh login, logout, expiry and recovery. Passkeys are host-bound and require HTTPS outside localhost.
- Custom challenges extend
Kirby\Auth\Challenge; hash secret pending data yourself. Never expose credentials in UI props, logs or migration reports.
KB entry points
kirby://kb/scenarios/62-access-restriction-loginkirby://kb/scenarios/43-user-registration-and-loginkirby://kb/scenarios/63-files-firewall-protected-downloadskirby://kb/scenarios/64-permission-tricks-role-basedkirby://kb/scenarios/67-indieauth-rel-me
Required inputs
- Protected pages/data and required roles.
- Login/logout flow and redirect rules.
- Download protection or route constraints.
Role matrix template
| Role | Pages | Actions | Downloads |
|---|---|---|---|
| admin | all | all | all |
| editor | edit | publish | limited |
Default guard pattern
- Check
$kirby->user()and required role/permission before returning content. - Redirect or return a 403 for unauthorized requests.
- Enforce CSRF and validation on auth-related forms.
Login redirect rule
- Store intended URL in the session and redirect after successful login.
- Fall back to the home page when no intent is stored.
Common pitfalls
- Checking access only in templates while routes remain public.
- Returning a 404 for unauthorized access instead of a 403 or redirect.
Verification checklist
- Test the role matrix across protected pages and downloads.
- Verify login/logout flows and session handling.
- Confirm CSRF failures render safely.
Workflow
- Clarify which pages/data are protected, required roles, and login/logout behavior.
- Call
kirby:kirby_initand readkirby://roots. - Inspect templates/controllers/blueprints to align with existing patterns:
kirby:kirby_templates_indexkirby:kirby_controllers_indexkirby:kirby_blueprints_index
- For protected downloads or auth routes, inspect routes with
kirby:kirby_routes_indexandkirby://config/routes(install runtime if needed). - Search the KB with
kirby:kirby_search(examples: "access restriction login", "user registration and login", "files firewall", "permission tricks", "page on own domain"). - Implement least-privilege checks in templates/controllers or routes; enforce CSRF and validation on auth forms.
- Verify by rendering protected pages (
kirby:kirby_render_page) and manually testing login and download URLs.
Установить kirby-security-and-auth в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл kirby-security-and-auth?
Secures Kirby sites with access restriction, user roles, permissions, and protected downloads. Use when implementing login/role-based access, permissions, or file protection.
Как установить скилл kirby-security-and-auth?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл kirby-security-and-auth запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic