question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spring Boot login page issue

See original GitHub issue

Description

Unable to request default login form with logbook-spring-boot-starter in the dependencies. As soon I remove dependency or set logbook.filter.enable=false property - everything works as expected.

Expected Behavior

I should be able to access login form with enabled LogbookFilter

Actual Behavior

I have simple spring boot application with default authentication form. With logbook-spring-boot-starter - application starts, but I am unable to reach login form. For different web servers I can see next behaviour:

  • Tomcat: continuous load
  • Jetty: 500 error with “insufficient content written” message
  • Undertow: empty reply from server with “Fixed length stream closed with with 1317 bytes remaining” message in logs

Context

  • logbook-spring-boot-starter version: 1.13.0
  • Spring Boot version: 2.1.2.RELEASE

My security configs:

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .csrf().disable()
            .authorizeRequests()
//          .antMatchers("/api/**").permitAll()
            .anyRequest().authenticated()
            .and().formLogin();
    }

If I uncomment line with permitAll - I still can not access login form, while api works as expected and I can see logged requests and responses.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
whiskeysierracommented, Apr 12, 2019

I believe I finally found a fix. See #484

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring security login always lands in an error page with no ...
I'm using a login form for a small project in Spring but I have a small problem which is that every time I...
Read more >
Login For a Spring Web App - Error Handling and Localization
In this article we're going to illustrate how to implement a simple Login Page with Spring MVC for an application that's handling the ......
Read more >
Can't login to my custom login page in Spring Boot Security
Open any browser, type “http:/localhost:8080/login” After providing the correct or incorrect login credential, it will be redirected to the same login page. It ......
Read more >
Spring Boot Login Page - working with a default ... - ZetCode
Spring Boot Login Page tutorial shows how to work with a default login page. Spring security secures all HTTP endpoints by default.
Read more >
Getting Started | Securing a Web Application - Spring
The web application includes two simple views: a home page and a “Hello, ... If the user fails to authenticate, the page is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found