pikku-security

Secure Pikku applications with authentication, authorization, and middleware across transports.

56|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/pikkujs/pikku --skill pikku-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pikku-security
Source: https://github.com/pikkujs/pikku/tree/main/.claude/skills/pikku-security
Command: npx skills add https://github.com/pikkujs/pikku --skill pikku-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pikku security provides authentication, authorization, and middleware capabilities across Pikku apps, enabling consistent and secure access control across transports.

Core Features & Use Cases

  • Session management with pikkuAuth and per-function permissions to protect APIs and wirings
  • Built-in security middlewares (bearer, cookie, API key) and permission groups for scalable access control
  • Scoping and governance: apply security rules at global, prefix, tag, and inline levels to enforce consistent policies

Quick Start

Set up pikku-auth, permissions, and middleware in your wiring to enable authentication and authorization across transports.

Frequently Asked Questions about pikku-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication and authorization to HTTP and WebSocket routes?

Authentication and authorization for HTTP and WebSocket routes are added by applying pikkuAuth and pikkuMiddleware to your wirings, enabling consistent session handling and per-function access control across transports.

What is the best way to manage API sessions using bearer tokens and cookies?

Managing API sessions with bearer tokens and cookies is handled through built-in security middlewares like authBearer and authCookie, which intercept requests to validate sessions and enforce access policies globally or inline.

Can I apply per-function permissions and permission groups for access control?

Per-function permissions and permission groups are supported, allowing you to attach specific access control rules to individual functions and group permissions for scalable policy management across your application.

Does this security middleware work across CLI and queue transports?

Yes, the security middleware works across CLI and queue transports, providing unified authentication, authorization, and session management rules that apply consistently regardless of the transport layer being used.

How do I scope access control rules globally and at the tag level?

Scoping access control rules globally and at the tag level is achieved by applying pikkuPermission and pikkuMiddleware at global, prefix, or tag levels, or by defining inline per-wiring access control for granular governance.

Why use API key middleware for securing application access?

Using API key middleware secures application access by validating unique keys through the authAPIKey middleware, providing a straightforward method to authenticate requests and enforce permissions before they reach your functions.