Spring Eureka запрашивает аутентификацию по паролю - PullRequest
1 голос
/ 03 марта 2020
    Using generated security password: f9268f9c-f2e6-4e53-a751-632a7005b807

2020-03-03 13:07:44.539  INFO 4824 --- [  restartedMain] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@2a92f8c3, org.springframework.security.web.context.SecurityContextPersistenceFilter@412324cd, org.springframework.security.web.header.HeaderWriterFilter@7cf2dd91, org.springframework.security.web.csrf.CsrfFilter@565adf96, org.springframework.security.web.authentication.logout.LogoutFilter@5b3457db, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@b1041fc, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@5e842f37, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@3e06198f, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@574d3e0c, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@2b5beb1d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4d02763e, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@b273c65, org.springframework.security.web.session.SessionManagementFilter@1f6d3131, org.springframework.security.web.access.ExceptionTranslationFilter@1bf860da, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@11538685]
2020-03-03 13:07:44.612  WARN 4824 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : Unable to start LiveReload server

Я не включил зависимости безопасности Spring в файл POM, но вижу эти строки в своей консоли. Браузер запрашивает имя пользователя и пароль. Как я могу это исправить?

Ответы [ 2 ]

2 голосов
/ 03 марта 2020

Я не думаю, что вы должны проверить или зависимость в POM

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
0 голосов
/ 03 марта 2020

Решено! По умолчанию на сервере Eureka установлена ​​аутентификация по паролю пользователя. Имя пользователя по умолчанию - user, и пароль будет сгенерирован в консоли!

...