<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc" -->

---
title: Debug Past an HTTP 403 Without Breaking Spring Security
description: IntelliJ IDEA 2026.2 introduces security inlays in the Spring Debugger plugin that show the role-based authorization requirements for Spring MVC endpoints...
canonical: https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Debug Past an HTTP 403 Without Breaking Spring Security | daily.dev
og:description: IntelliJ IDEA 2026.2 introduces security inlays in the Spring Debugger plugin that show the role-based authorization requirements for Spring MVC endpoints...
og:url: https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc
og:image: https://api.daily.dev/og/posts/64vGEIrZC.png
og:image:alt: Debug Past an HTTP 403 Without Breaking Spring Security
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug Past an HTTP 403 Without Breaking Spring Security

**[JetBrains](https://daily.dev/sources/jetbrains)** · 13 min read · 2 upvotes · 1 comments

## Summary

IntelliJ IDEA 2026.2 introduces security inlays in the Spring Debugger plugin that show the role-based authorization requirements for Spring MVC endpoints directly in the editor, letting developers bypass an HTTP 403/401 during debugging without editing SecurityConfig or restarting the app. An 'unlock' action injects a TestingAuthenticationToken into the running app's SecurityContext for a specific URI and HTTP method, either with the endpoint's required roles or a custom username/authority set. The unlock affects any client hitting that exact URI and method (curl, Postman, browsers), lasts only for the debug session, and only works on the Servlet stack (not WebFlux) by hooking Spring Security's AuthorizationFilter. Known limitations include @AuthenticationPrincipal returning null and concrete Authentication subtypes throwing exceptions. An MCP tool for AI agent-driven lock/unlock is planned for the 2026.3 release.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.jetbrains.com/idea/2026/09/debug-past-an-http-403-without-breaking-spring-security>

## Questions this post answers

### How does IntelliJ IDEA's security inlay let me bypass a Spring Security 403 error while debugging?

IntelliJ IDEA 2026.2's Spring Debugger plugin shows an inlay with the roles or authorities an endpoint requires, and an 'unlock' action that treats matching requests as authenticated for the debug session, using either the endpoint's required roles or a custom username and role list you specify, without editing SecurityConfig or restarting the app.

_Debugging Spring Security lockouts is easier when developers compare tooling notes like this on daily.dev._

### Why does a controller parameter annotated with @AuthenticationPrincipal come back null when using IntelliJ IDEA's Spring Debugger unlock feature?

The unlocked request's principal is a plain username String wrapped in a TestingAuthenticationToken, not the app's custom UserDetails or principal type, so @AuthenticationPrincipal cannot resolve it and returns null. This is tracked as known bug IDEA-389767, open as of Spring Debugger's release for IntelliJ IDEA 2026.2. Declaring the parameter as Principal or Authentication instead works correctly.

_Save time chasing debugger quirks by following Spring tooling updates like this on daily.dev._

### Does Spring Security's unlock/bypass debugging feature in IntelliJ IDEA work with Spring WebFlux applications?

No, it only supports the Servlet stack. The feature hooks a hidden breakpoint into Spring Security's AuthorizationFilter, which exists only on the Servlet stack; WebFlux uses AuthorizationWebFilter instead, which this unlock mechanism does not hook, so reactive Spring applications are not yet supported.

_Track which Spring Security debugging tools support your stack, reactive or servlet, via daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@leonidbugaev** · 0 upvotes

> The unlock is a TestingAuthenticationToken with a string principal, so @AuthenticationPrincipal going null is the real controller path, not a debugger quirk. I'd still hit the endpoint once with a real UserDetails before calling it done.

## Similar posts on daily.dev

- [Spring Boot Debugging – Now Remote](https://daily.dev/posts/spring-boot-debugging-now-remote-a1g7mxjih) · JetBrains · 18 upvotes · 0 comments
- [Granular Authorization in Spring Boot: Beyond Role Checks](https://daily.dev/posts/granular-authorization-in-spring-boot-beyond-role-checks-bfjgs4egt) · Sergio Lema · 18 upvotes · 1 comments
- [CVE-2026-59326: HTTP Proxy Credentials Logged in Plaintext by the Spring Boot Language Server](https://daily.dev/posts/cve-2026-59326-http-proxy-credentials-logged-in-plaintext-by-the-spring-boot-language-server-bjhmbawqm) · Spring · 1 upvotes · 0 comments
- [Security Baked Into the JVM: why fork Apache River and OpenJDK?](https://daily.dev/posts/security-baked-into-the-jvm-why-fork-apache-river-and-openjdk--jddvz9ame) · A Java geek · 1 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#java](https://daily.dev/tags/java), [#authorization](https://daily.dev/tags/authorization), [#spring-security](https://daily.dev/tags/spring-security)

[View this post on daily.dev](https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Debug Past an HTTP 403 Without Breaking Spring Security","url":"https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc"},"datePublished":"2026-09-08T12:58:08.423Z","dateModified":"2026-09-14T09:00:26.266Z","description":"IntelliJ IDEA 2026.2 introduces security inlays in the Spring Debugger plugin that show the role-based authorization requirements for Spring MVC endpoints...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5e2fa753d9001b8605857cf0f3443251?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5e2fa753d9001b8605857cf0f3443251?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"JetBrains","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"JetBrains","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/53ecf0c676f34b3896ee109609d91efa","url":"https://daily.dev/sources/jetbrains"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"devtools,java,authorization,spring-security","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"JetBrains","item":"https://daily.dev/sources/jetbrains"},{"@type":"ListItem","position":3,"name":"Debug Past an HTTP 403 Without Breaking Spring Security"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc","comment":[{"@type":"Comment","text":"The unlock is a TestingAuthenticationToken with a string principal, so @AuthenticationPrincipal going null is the real controller path, not a debugger quirk. I’d still hit the endpoint once with a real UserDetails before calling it done.","datePublished":"2026-09-09T15:06:52.702Z","url":"https://daily.dev/posts/64vGEIrZC#c-2sjbGmFD6","author":{"@type":"Person","name":"Leonid Bugaev","url":"https://daily.dev/leonidbugaev","image":"https://lh3.googleusercontent.com/a/ACg8ocLhMgurwTmJElWaH9A8Ju8cHvZxgMCDt009jEYkmFCyUGAoaGSw=s96-c"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/debug-past-an-http-403-without-breaking-spring-security-64vgeirzc#faq","mainEntity":[{"@type":"Question","name":"How does IntelliJ IDEA's security inlay let me bypass a Spring Security 403 error while debugging?","acceptedAnswer":{"@type":"Answer","text":"IntelliJ IDEA 2026.2's Spring Debugger plugin shows an inlay with the roles or authorities an endpoint requires, and an 'unlock' action that treats matching requests as authenticated for the debug session, using either the endpoint's required roles or a custom username and role list you specify, without editing SecurityConfig or restarting the app. Debugging Spring Security lockouts is easier when developers compare tooling notes like this on daily.dev."}},{"@type":"Question","name":"Why does a controller parameter annotated with @AuthenticationPrincipal come back null when using IntelliJ IDEA's Spring Debugger unlock feature?","acceptedAnswer":{"@type":"Answer","text":"The unlocked request's principal is a plain username String wrapped in a TestingAuthenticationToken, not the app's custom UserDetails or principal type, so @AuthenticationPrincipal cannot resolve it and returns null. This is tracked as known bug IDEA-389767, open as of Spring Debugger's release for IntelliJ IDEA 2026.2. Declaring the parameter as Principal or Authentication instead works correctly. Save time chasing debugger quirks by following Spring tooling updates like this on daily.dev."}},{"@type":"Question","name":"Does Spring Security's unlock/bypass debugging feature in IntelliJ IDEA work with Spring WebFlux applications?","acceptedAnswer":{"@type":"Answer","text":"No, it only supports the Servlet stack. The feature hooks a hidden breakpoint into Spring Security's AuthorizationFilter, which exists only on the Servlet stack; WebFlux uses AuthorizationWebFilter instead, which this unlock mechanism does not hook, so reactive Spring applications are not yet supported. Track which Spring Security debugging tools support your stack, reactive or servlet, via daily.dev."}}]}
```

