Enhance client side resolution of plain-text files
See original GitHub issueConfig server supports serving plain-text configuration files (for configuration tailored to specific libraries or environments), including placeholder resolution from config server properties. (See http://cloud.spring.io/spring-cloud-static/Dalston.SR1/#_serving_plain_text)
It seems that the only way to consume these resources (in OSS) is via RestTemplate
or some similar REST client means. This can be complicated when there are additional hoops to jump through in order to resolve access to these files such as secured authentication/authorization around config server. This may require a client to muck about with authentication/authorization beans to get at the access token needed to consume those resources.
To make this easier such client situations, it would be useful to provide some means by which the clients can consume those resources, but without having to deal with the authentication/authorization specifics.
One possible (off-the-cuff) idea might be to provide some sort of ConfigServerResource
or other type that would handle the OAuth concerns under the covers. Here is potential pseudo just to further elaborate the point but not yet fleshed out:
FileInputStream fis = configServer.getConfig("myapp","myprofile");
Along with auto resolution such as:
@Value("nginx.conf") // not sure this is possible with `.` in name
FileInputStream nginxConfFileStream
Regardless of the solution, ideally, the client-side piece would be part of Spring Cloud OSS generically, with hooks provided for SCS to provide OAuth details to be included in the request.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:25 (11 by maintainers)
@SpiReCZ this enhancement has not been scheduled for addition at this time. When it has, it will be added to a Project and Milestone.
@csterwa maybe we could port the non-oauth version here. See comments in #1459