cbsecurity

Secure ColdBox and BoxLang apps with annotation-based access control and JWT authentication.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill cbsecurity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cbsecurity
Source: https://github.com/ColdBox/skills/tree/main/modules/cbsecurity
Command: npx skills add https://github.com/ColdBox/skills --skill cbsecurity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured, production-ready approach to authenticate and authorize ColdBox and BoxLang applications, removing the guesswork from securing handlers, routes, and APIs.

Core Features & Use Cases

  • Annotation-based authorization for handlers and individual actions to keep security rules close to code.
  • Firewall rules and route-level security to broadly protect URL prefixes like /admin and public asset whitelisting.
  • JWT API authentication with token issuance, refresh, logout, and optional token storage for revocation.
  • Role and permission checks via a centralized security context and IUserService integration.
  • Production hardening guidance such as storing secrets in environment variables, short token lifetimes, and revocation strategies.

Quick Start

Install and enable the cbsecurity module, configure firewall rules and JWT settings, and annotate handlers or apply JwtAuthFilter to protect your routes.

Frequently Asked Questions about cbsecurity

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

FAQPage Schema
How do I secure ColdBox handlers using annotation-based access control?

Annotation-based access control secures ColdBox handlers by applying security rules directly to handlers and actions, keeping authorization logic close to the code. You configure the cbsecurity module and annotate handlers to enforce role or permission checks.

What is the best way to configure JWT authentication for a ColdBox REST API?

The best way to configure JWT authentication for a ColdBox REST API is using the cbsecurity module's JwtAuthFilter. It handles token issuance, refresh, logout, and optional token storage for revocation to protect your API endpoints.

How do firewall rules protect specific routes like an admin panel in ColdBox?

Firewall rules protect specific routes like an admin panel in ColdBox by applying broad security configurations to URL prefixes. You can secure /admin routes while whitelisting public assets and enforcing JWT authentication on protected paths.

Does JWT authentication in ColdBox support token revocation for production safety?

JWT authentication in ColdBox supports token revocation through optional token storage with CacheBox. This production hardening feature allows you to invalidate tokens before their expiration and enforce secure logout.

Do I need an IUserService implementation to enforce roles and permissions in ColdBox?

You need an IUserService implementation to enforce roles and permissions in ColdBox. It integrates with the centralized security context to validate user credentials against your application's specific authorization rules.