Comments (3)
Thanks for the proposal, @thecanadianroot.
I'm afraid I disagree with @meltsufin here as I think this should be implemented alongside the support for sm:
in Spring Cloud GCP. To Spring Boot, a value like ${sm://my-database/json/username}
is almost completely opaque. All it knows is that the sm:
prefix means that the remainder of the string (my-database/json/username
) should be handled by Spring Cloud GCP.
We do have CloudFoundryVcapEnvironmentPostProcessor
in Boot that takes a JSON payload from Cloud Foundry's VCAP_APPLICATION
and VCAP_SERVICE
environment variables and maps it to several properties in the environment. This logic is specific to CloudFoundry and the structure of its JSON. I would expect similar functionality that's specific to GCP's Secret Manager and how it uses JSON to be part of Spring Cloud GCP rather than Spring Boot itself.
Perhaps there's an opportunity for some lower-level helper classes in Spring Boot that can establish some conventions for extracting a single value from some JSON and assigning it to a property or mapping a whole JSON document to configuration properties but I think we'd need to see multiple implementations doing similar things before we'd be in a position where it made sense to add such functionality to Boot.
from spring-boot.
@wilkinsona Thanks for the feedback. Cloud Secret Manager doesn't have any JSON format. It simply allows storage and retrieval of secrets of type byte[]
. So, support for interpreting the byte[]
as JSON and extracting properties from it doesn't seem to be specific to Cloud Secret Manager. That being said, as this FR seems to be just in spring-cloud-gcp right now, we can keep it scoped to our repo.
from spring-boot.
Thanks, @meltsufin. I'll close this one for now then. If this becomes something of a theme and we see the same requirement from other areas we can look at adding some common infrastructure to Spring Boot at that point.
from spring-boot.
Related Issues (20)
- spring-boot-dependencies cannot be used with repositories that ban com.oracle.database.jdbc:ojdbc-bom
- spring-boot-dependencies cannot be used with repositories that ban com.oracle.database.jdbc:ojdbc-bom
- Upgrade to Asciidoctor Gradle Plugin 4.0.2
- Avoid calling getProject() during execution of StarterMetadata task
- Avoid calling getProject() during execution of StarterMetadata task
- Avoid calling getProject() during execution of StarterMetadata task
- Avoid calling getProject() during execution of AutoConfigurationMetadata task
- Avoid calling getProject() during execution of AutoConfigurationMetadata task
- Avoid calling getProject() during execution of AutoConfigurationMetadata task
- Avoid calling getProject() during execution of publishMavenPublicationToProjectRepository
- Avoid calling getProject() during execution of publishMavenPublicationToProjectRepository
- Avoid calling getProject() during execution of publishMavenPublicationToProjectRepository
- Avoid calling getProject() when checking configuration metadata
- Avoid calling getProject() when checking configuration metadata
- Avoid calling getProject() when checking configuration metadata
- IllegalArgumentException can be thrown when running an uber jar on a shared drive HOT 4
- Avoid calling getProject() during execution of extractVersionConstraints
- Avoid calling getProject() during execution of extractVersionConstraints
- Enabling distribution percentiles for Prometheus 1.x leads to "Counts in ClassicHistogramBuckets cannot be negative" HOT 2
- LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.