smithery/bnomei

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.

Installation

$ npx skills add smithery/bnomei --skill kirby-security-and-auth

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/bnomei · top by installs.

npx skills add smithery/bnomei

Browse all from smithery/bnomei

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,476 B
  • docs SUMMARY.md 205 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Kirby Security and Auth

KB entry points

  • kirby://kb/scenarios/62-access-restriction-login
  • kirby://kb/scenarios/43-user-registration-and-login
  • kirby://kb/scenarios/63-files-firewall-protected-downloads
  • kirby://kb/scenarios/64-permission-tricks-role-based
  • kirby://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

  1. Clarify which pages/data are protected, required roles, and login/logout behavior.
  2. Call kirby:kirby_init and read kirby://roots.
  3. Inspect templates/controllers/blueprints to align with existing patterns:

- kirby:kirbytemplatesindex - kirby:kirbycontrollersindex - kirby:kirbyblueprintsindex

  1. For protected downloads or auth routes, inspect routes with kirby:kirbyroutesindex and kirby://config/routes (install runtime if needed).
  2. Search the KB with kirby:kirby_search (examples: "access restriction login", "user registration and login", "files firewall", "permission tricks", "page on own domain").
  3. Implement least-privilege checks in templates/controllers or routes; enforce CSRF and validation on auth forms.
  4. Verify by rendering protected pages (kirby:kirbyrenderpage) and manually testing login and download URLs.