Apache Shiro 3

Last reviewed Sep 20, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Java 25113 lines · 2.8K tokens
  2. 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 check mvn dependency:tree or gradle dependencies for a Shiro module resolved at another version. Use the native jakarta.* web artifacts without the old jakarta classifier; 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, and SecurityManager construction 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 custom AuthenticatingRealm, return trusted stored credentials from doGetAuthenticationInfo, check account status, and restrict supports(token) to the intended token types; echo submitted credentials only after an