Add API for PropertySource resource location retrieval #24504
Spring Cloud Config Server verifies that any property sources it loads are from configured locations for security. To do that has used the property source name to get this information.
In boot 2.3.x we got classpath:/configs/application.yaml from
In boot 2.4.0 we updated the parsing logic in spring-cloud/spring-cloud-config@854060b
#24428 changed the property source names and hence broke config server. It has been updated again as seen in the issue below, but this is a brittle approach. We likely didn't say anything in the 2.3.x or prior timeline because it didn't change.
I've added support for checking the location by parsing
The text was updated successfully, but these errors were encountered:
This one is a bit tricky. If I've read the code correctly, you ideally want a way to get the
The only ideas I've had so far are to either try to create some kind of registry that links a
I definitely needs more thought.
@spencergibb I've pushed something to 2.4.x, can you take a look and see if you think it will work.
I hope you can update
TrackingConfigDataEnvironmentUpdateListener listener = new TrackingConfigDataEnvironmentUpdateListener() ConfigurableEnvironment environment = getEnvironment(config, profile, label, listener); ... ConfigDataEnvironmentPostProcessor.applyTo(environment, resourceLoader, null, StringUtils.commaDelimitedListToStringArray(profile), listener);
You can then hopefully update the
Let me know if that doesn't work and we can have another go.
Update `StandardConfigDataResource` to make the `getResource()` method public so that it can be used by Spring Cloud. Closes gh-24504