Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix spring security warning #19184

Merged
merged 2 commits into from
Jul 19, 2022

Conversation

mshima
Copy link
Member

@mshima mshima commented Jul 19, 2022

Fix

2022-07-18 22:36:52.353  WARN 80665 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**', OPTIONS]. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-18 22:36:52.353  WARN 80665 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/app/**/*.{js,html}']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-18 22:36:52.353  WARN 80665 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/i18n/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-18 22:36:52.354  WARN 80665 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/content/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-18 22:36:52.354  WARN 80665 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/h2-console/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-18 22:36:52.354  WARN 80665 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/swagger-ui/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
2022-07-18 22:36:52.354  WARN 80665 --- [  restartedMain] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/test/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

Copy link
Member

@atomfrede atomfrede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still in draft for the reactive part I guess?

@mshima mshima marked this pull request as ready for review July 19, 2022 12:41
@mshima
Copy link
Member Author

mshima commented Jul 19, 2022

It was late yesterday, couldn’t check the build result.
Looks ok.
I don’t think those warnings happens at reactive.

@atomfrede atomfrede merged commit af4914e into jhipster:main Jul 19, 2022
@atomfrede
Copy link
Member

I didn't check but at least it seems to be(?). I am not sure what my comment about the csp was, need to check my sample again. #18534

@mshima mshima deleted the skip_ci-spring_security_warning branch July 19, 2022 13:29
@mshima
Copy link
Member Author

mshima commented Jul 19, 2022

I didn’t saw that bug report. 😕
I will do more tests with swagger and h2 later today.
The others routes should be fine.

@atomfrede
Copy link
Member

atomfrede commented Jul 19, 2022

Awesome. I also remember h2 and swagger only. Everything else should also be found our integration/e2e tests.

@mshima
Copy link
Member Author

mshima commented Jul 19, 2022

Indeed h2-console and swagger-ui breaks with this PR.
Switching


to sameOrigin() seems to fix them.

Microservice:

  • h2-console: need to check if it's accessible.
  • swagger-ui: doesn't exist.

Microfrontend:

  • h2-console: should be ok if accessing using dev server (need to confirm).
  • swagger-ui: should be ok if accessing using dev server (need to confirm).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants