configprops endpoint prefix selector also returns beans of sibling prefixes (spring.data matches spring.datasource)
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java, spring-boot
Research direction
Read ConfigurationPropertiesReportEndpoint.getConfigurationProperties and the existing ConfigurationPropertiesReportEndpointFilteringTests.filterByPrefixMultipleMatches test. Reproduce the sibling-prefix case with spring.data and spring.datasource, then add a regression test for the selector boundary. Done means exact prefixes and dotted descendants still match while sibling prefixes do not.
Written by the indexing model from the issue text.
Description
GET /actuator/configprops/{prefix} (and the JMX operation configurationPropertiesWithPrefix) is documented as returning "the @ConfigurationProperties beans mapped under a certain prefix" and "a more general prefix will return all beans mapped under that prefix stem". The filter is a plain string startsWith (ConfigurationPropertiesReportEndpoint.getConfigurationProperties: bean.getAnnotation().prefix().startsWith(prefix)), so a bean whose prefix merely starts with the same characters is returned too:
GET /actuator/configprops/spring.data (spring-boot-actuator 4.1.1, same on 3.5.x)
spring.data.redis (expected)
spring.datasource (sibling, unexpected)
GET /actuator/configprops/spring.web
spring.web (expected)
spring.webflux (sibling, unexpected)
spring.webservices (sibling, unexpected)
spring.data / spring.datasource and spring.web / spring.webflux / spring.webservices are all real Spring Boot namespaces, so this happens with ordinary applications. The trailing-dot form (spring.data.) and exact names behave as expected. (Not a data-exposure issue — /actuator/configprops already returns everything with the same sanitization — just incorrect filtering.)
Suggested fix: treat the selector as a dotted property-name prefix — a bean matches when its prefix equals the selector or continues with a . (a selector that already ends in ., as in ConfigurationPropertiesReportEndpointFilteringTests.filterByPrefixMultipleMatches, keeps matching every descendant). I have the change with a regression test ready against 3.5.x.
- Dominant language
- Java
- Stars
- 81.7k
- Forks
- 45.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 54
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spring-projects/spring-boot
-
status: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-boot#52316 · 1 comment ·
Maintainers usually reply within 2 days
-
Maven process-test-aot only copies META-INF/native-image of the generated resources so the Logback configuration is lost in native testsPossibly taken @ZedingZhang claimed this 1 day ago. Openstatus: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spring-projects/spring-boot#52301 · 3 comments ·
Maintainers usually reply within 2 days
-
status: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
spring-projects/spring-boot#52300 ·
Maintainers usually reply within 2 days
-
status: waiting-for-triage
Difficulty 1/5 Under an hour Newbie friendliness 75/100
spring-projects/spring-boot#52296 ·
Maintainers usually reply within 2 days
-
status: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
spring-projects/spring-boot#52295 ·
Maintainers usually reply within 2 days
All issues in spring-projects/spring-boot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
checkstyle/checkstyle#22145 ·
Maintainers usually reply within 1 day
-
rset command throws NPE in ResultsFormat.guessSyntaxPossibly taken @Ostrzyciel claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#9593 ·
Maintainers usually reply within 1 day
-
release bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenLiberty/open-liberty#36124 ·
Maintainers usually reply within 1 day