openrewrite / openrewrite/rewrite-spring

2.4-2.5: Secure Info Endpoint

Open
#137 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #156 by @fabapp2 — closed without merging
boot-2.5 recipe
Dominant language
Java
Stars
403
Forks
149
Avg merge
2h 33m
Merged PRs (30d)
10

Description

Release Notes
The /info actuator endpoint is no longer exposed over the web by default.
Additionally, if Spring Security is on the classpath and your application doesn't have a custom security configuration, the endpoint requires authenticated access by default.

Condition
  • org.springframework.boot:spring-boot-actuator is on classpath (MUST)
  • org.springframework.security:spring-security-web is on classpath (OPTIONAL)
  • Does a custom security configuration exist (OPTIONAL)
Description with only actuator on classpath

The scan found org.springframework.boot:spring-boot-actuator on the classpath.
The actuator /info endpoint is no longer exposed over the web by default.
If the /info endpoint needs to be accessible over the web you'll need to declare it as exposed over web.
See Exposing Endpoints.
Neither Spring Security nor a security configuration was found. You should take care to secure HTTP endpoints in the same way that you would any other sensitive URL. See Securing HTTP Endpoints for further information.

If you used the /info endpoint for health-checks you might consider using the /health endpoint instead.

Description with actuator and security on classpath without custom security configuration

The scan found org.springframework.boot:spring-boot-actuator and org.springframework.security:spring-security-core-* on the classpath but no custom security configuration.

The actuator /info endpoint is no longer exposed over the web by default.
If the /info endpoint needs to be accessible over the web you'll need to declare it as exposed over web.
See Exposing Endpoints.

No security configuration was found and the /info endpoint now requires authenticated access by default using basic authentication with the default user named user and the random password that's logged at startup, see Security for further information.

If you want to change the authentication bahaviour you can provide a custom security config for the /info endpoint.
This also allows you to preserve the old behaviour by deactivating authentication in the custom security config.
See Securing HTTP Endpoints for further information.

If you used the /info endpoint for health-checks you might consider using the /health endpoint instead.

Description with actuator and security on classpath with custom security configuration

The scan found org.springframework.boot:spring-boot-actuator and org.springframework.security:spring-security-core-* on the classpath and custom security configuration(s) in these classes [list of security configurations].
The actuator /info endpoint is no longer exposed over the web by default.
If the /info endpoint needs to be accessible over the web you'll need to declare it as exposed over web.
See Exposing Endpoints.
Spring security and a custom security configuration was found. You should take care to provide a security configuration for the /info endpoint. See Securing HTTP Endpoints for further information.

If you used the /info endpoint for health-checks you might consider using the /health endpoint instead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named; start with the issue's linked Spring Boot release notes and the three condition descriptions. Done means the implementation covers actuator-only, security-without-custom-configuration, and security-with-custom-configuration cases with the specified guidance, while accounting for the linked pull request.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.