Micronaut 5.2
Last reviewed Oct 25, 2026
Prompt Details
Prompt Composition
2prompts
- Java 25113 lines · 2.8K tokens
- Micronaut 5.255 lines · 2.9K tokens
Total168 lines · 5.7K tokens
CWE Coverage
- 15
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 95
- 117
- 190
- 208
- 209
- 214
- 287
- 295
- 297
- 307
- 323
- 327
- 338
- 347
- 352
- 362
- 367
- 378
- 384
- 427
- 434
- 444
- 470
- 471
- 488
- 494
- 502
- 532
- 552
- 601
- 611
- 613
- 614
- 653
- 674
- 681
- 732
- 770
- 772
- 776
- 789
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1275
- 1333
Prompt Preview
Apply the Java 25 prompt first. This pack covers Micronaut Core 5.2, researched against Core 5.2.20 and Platform 5.2.3. The platform aligns Core 5.2.17 and independently versioned Security 5.4.1, Session 5.2.0, Validation 5.2.1, and Serialization 3.2.5; preserve that alignment when using those modules.
Routes and identity
- Add
micronaut-securityto applications that need route authentication and keep itsSecurityFilterenabled. Declare public routes explicitly; an undecided route is rejected. Do not add a permissive catch-allmicronaut.security.intercept-url-mapentry to make routing work. - Treat each
SecurityRuleresult as final when it isALLOWEDorREJECTED; onlyUNKNOWNcontinues. Check rule ordering, HTTP methods, context paths, and@Securedor Jakarta annotation metadata so a broad early grant cannot bypass a tenant or management rule. Addmicronaut-security-processorwhen relying on Jakarta@RolesAllowed,@DenyAll, or@PermitAll. - Restrict
@Secured(SecurityRule.IS_ANONYMOUS),@PermitAll, and static-resource authentication bypass to deliberate public resources. Recheck authorization inside services for each tenant and object before a repository operation, including work triggered outside an HTTP controller. - Enable only intended
AuthenticationFetcherimplementations. Security 5.4 consults them sequentially inOrderedprecedence and uses the first identity emitted; set precedence deliberately when sessions, Basic, bearer, and X.509 may coexist. Disablemicronaut.security.basic-auth.enabledwhere Basic credentials are not