auth-and-permissions-safety

Enforce authentication, authorization, and CSRF protections on API endpoints.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lgerard314/global-plugin --skill auth-and-permissions-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-and-permissions-safety
Source: https://github.com/lgerard314/global-plugin/tree/main/plugin/skills/auth-and-permissions-safety
Command: npx skills add https://github.com/lgerard314/global-plugin --skill auth-and-permissions-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps security-minded teams ensure authentication and authorization are correctly implemented across server endpoints and route handlers, preventing leaks and misconfigurations.

Core Features & Use Cases

  • Enforce authentication and resource-scoped authorization (RBAC/ABAC) on API routes and handlers.
  • Validate session management, token hygiene, and CSRF defenses, including proper cookie attributes and token rotation.
  • Guide safe error handling and anti-enumeration practices for auth-related flows.

Quick Start

Apply the guard rules to your endpoints to ensure authentication, authorization, and CSRF protections.

Frequently Asked Questions about auth-and-permissions-safety

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

FAQPage Schema
How do I enforce RBAC and ABAC authorization checks across API endpoints?

To enforce RBAC and ABAC authorization across API endpoints, apply guard rules to route handlers ensuring resource-scoped checks are performed before processing requests. This prevents unauthorized data access by validating user permissions against specific protected resources.

What is the best way to prevent token enumeration during authentication flows?

Preventing token enumeration requires uniform error messaging during authentication flows. By standardizing auth responses and avoiding differentiated error messages, attackers cannot distinguish between valid and invalid user credentials or session identifiers.

How do I validate JWT session hygiene and token rotation in backend services?

Validating JWT session hygiene involves enforcing short token lifetimes with automated rotation and verifying proper cookie attributes. This ensures compromised tokens expire quickly and session data remains protected across backend services.

Does this approach work for implementing CSRF defenses on route handlers?

Yes, this approach works for implementing CSRF defenses by validating proper cookie attributes and token rotation on protected route handlers. It ensures cross-site request forgery protections are applied uniformly across all API endpoints.

When do I need step-up authentication requirements for API routes?

Step-up authentication is needed when accessing sensitive API routes requiring elevated user trust. It enforces additional verification beyond standard session validation, ensuring higher assurance for privileged operations before processing resource-scoped requests.

Why does authentication fail despite valid JWT tokens in session management?

Authentication can fail despite valid JWT tokens if session management lacks proper token rotation or cookie attributes are misconfigured. Enforcing short token lifetimes and validating cookie security settings resolves these backend authorization failures.