Skip to content

Not recommended to ignore Ant [pattern='/cloudfoundryapplication/**'] #963

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

Closed
mayrstefan opened this issue Aug 25, 2022 · 3 comments
Closed
Labels

Comments

@mayrstefan
Copy link
Contributor

Today a developer pointed me to these application messages

Will not secure Ant [pattern='/cloudfoundryapplication/**']
You are asking Spring Security to ignore Ant [pattern='/cloudfoundryapplication/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.

This is happening for a Spring Boot Application running the latest Java Builldpack. Those URLs are accessed by the VMware Tanzu Apps Manager. Which is okay so far.
But this pattern doesn't exist in our code. We think this comes from same magic buildpack voodoo. So where is this coming from and why is it injected in a way that is not recommended?

@dmikusa
Copy link
Contributor

dmikusa commented Aug 27, 2022

I don't believe this comes from the buildpack. The /cloudfoundryapplication path is added by Spring Boot Actuators.

You can disable adding that by setting management.cloudfoundry.enabled=false. See reference docs.

The warning itself comes from Spring Security. See this comment which explains the change in recommendation.

If your application is setting these values, you should make the adjustment to use permitAll instead of ignoring that path. If you're not setting that anywhere in the app, perhaps you're not on a new enough Spring Boot to have caught up with that recommendation. Just a guess though. If you can't track it down, asking in a Spring Boot issue/chat/SO post would probably be the way to go.

Hope that helps!

@mayrstefan
Copy link
Contributor Author

This is now tracked in spring-projects/spring-boot#32622

@dmikusa
Copy link
Contributor

dmikusa commented Nov 3, 2022

OK, I'm going to close this. If you need anything else from the buildpacks team, just let us know. Thanks

@dmikusa dmikusa closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants