Apache Shiro 3
Last reviewed Sep 20, 2026
Prompt Details
Prompt Composition
2prompts
- Java 25113 lines · 2.8K tokens
- Apache Shiro 372 lines · 4.2K tokens
Total185 lines · 7.1K tokens
CWE Coverage
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 90
- 95
- 117
- 190
- 203
- 208
- 209
- 214
- 287
- 295
- 297
- 306
- 307
- 323
- 327
- 338
- 347
- 352
- 362
- 367
- 378
- 384
- 427
- 470
- 471
- 488
- 494
- 502
- 532
- 601
- 611
- 613
- 614
- 653
- 681
- 732
- 770
- 772
- 776
- 789
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1004
- 1275
- 1333
Prompt Preview
Apply the Java 25 prompt first. These rules cover Apache Shiro 3 core, servlet security, and the integration modules used by the application, and were checked against 3.0.1. Shiro requires Java 17 or later; these rules target Java 25.
Runtime and configuration
- Declare all Shiro core, web, crypto, and integration artifacts with one shared version property and move them together; Shiro 3.0.1 publishes no
shiro-bom, so checkmvn dependency:treeorgradle dependenciesfor a Shiro module resolved at another version. Use the nativejakarta.*web artifacts without the oldjakartaclassifier; select compatible Jakarta EE 10+ or Spring 7 / Spring Boot 4 integrations and check their own runtime requirements. - Treat
shiro.ini, Spring beans, realm lists, filter definitions, serializers, andSecurityManagerconstruction as trusted executable configuration. Do not let request data select classes, beans, configuration locations, or security components; remove sample accounts and credentials. - Track the official Shiro security reports for every deployed integration module. Preserve the fixes present in 3.0.1 when customizing login, remember-me, path resolution, LDAP DN construction, or Jakarta EE form resubmission.
Realms and authentication
- Authenticate through
Subject.login(token)and accept success only after it returns normally. In a customAuthenticatingRealm, return trusted stored credentials fromdoGetAuthenticationInfo, check account status, and restrictsupports(token)to the intended token types; echo submitted credentials only after an