
unit-test-security-authorization
Provides patterns for unit testing Spring Security
by giuseppe-trisciuoglioFree
Description
unit-test-security-authorization is an agent skill from the developer-kit collection for unit testing authorization in Spring Security. It covers method-level rules written with @PreAuthorize, @Secured and @RolesAllowed, as well as custom permission evaluators. The patterns test role-based access control and expression-based rules, and they check that access denied cases are refused. The goal is fast authorization tests that do not need the full Spring Security context to start. The skill has a workflow for setting up the test class and authenticated principals, so a test can run as a user with particular roles and see whether a protected method allows or blocks the call. Use it when you add or change a secured service method and want tests that prove who can call it, or when you need to cover a custom permission evaluator. It does not cover the rest of the application's security setup. The skill is free. Its page shows about 3.9K installs and 371 GitHub stars for the repository, and its audits show Gen Agent Trust Hub, Socket and Snyk all at Pass.…
Highlights
- Tests for @PreAuthorize, @Secured and @RolesAllowed
- Role-based access control checks
- Custom permission evaluator tests
- Access denied scenarios
- Runs without the full Spring Security context
Ratings & Reviews
No ratings yet
Be the first to rate unit-test-security-authorization.
People also visit
unit-test-security-authorization FAQ
What does the unit-test-security-authorization skill cover?
Unit tests for Spring Security method rules, including role-based access control, expression-based authorization and custom permission evaluators.
Does it need the full Spring Security setup?
No. The page says the goal is fast authorization tests without the full Spring Security context.
How do I install it?
Run: npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill unit-test-security-authorization
What do the security audits say?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best unit-test-security-authorization alternatives?
Popular alternatives to unit-test-security-authorization include unit-test-exception-handler, unit-test-application-events and unit-test-caching. See all unit-test-security-authorization alternatives









