Micronaut 5.2

Last reviewed Oct 25, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Java 25113 lines · 2.8K tokens
  2. 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-security to applications that need route authentication and keep its SecurityFilter enabled. Declare public routes explicitly; an undecided route is rejected. Do not add a permissive catch-all micronaut.security.intercept-url-map entry to make routing work.
  • Treat each SecurityRule result as final when it is ALLOWED or REJECTED; only UNKNOWN continues. Check rule ordering, HTTP methods, context paths, and @Secured or Jakarta annotation metadata so a broad early grant cannot bypass a tenant or management rule. Add micronaut-security-processor when 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 AuthenticationFetcher implementations. Security 5.4 consults them sequentially in Ordered precedence and uses the first identity emitted; set precedence deliberately when sessions, Basic, bearer, and X.509 may coexist. Disable micronaut.security.basic-auth.enabled where Basic credentials are not