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)
- NoClassDefFoundError can be thrown from LaunchedClassLoader when threads are interrupted HOT 14
- Test Gradle plugin against Gradle 8.7
- Test Gradle plugin against Gradle 8.7
- Buildpacks do not support Docker with containerd image store HOT 2
- x-www-form-urlencoded escaping leads to truncated request HOT 1
- Trigger docs build when artifacts are published
- Add caching to docs-build
- Upgrade from 3.0.13 to 3.1.10 - SSL setup through jvm properties broken HOT 3
- JDK22 and GraalVM spring-boot:3.2.4:build-image failed: Builder lifecycle 'creator' failed with status code 51 HOT 1
- Graceful Shutdown behavior ambiguity in Reference Guide
- Clarify that all named properties must match for @ConditionalOnProperty to match HOT 2
- Getting 500 instead of 404 with integration tests when updating from Spring Boot 3.1.x to to 3.2.4 HOT 6
- Bump gradle/wrapper-validation-action from 2.1.1 to 2.1.2
- Bump gradle/wrapper-validation-action from 2.1.1 to 2.1.2
- Remove redundant Regex escapes
- Remove redundant Regex escapes
- Remove redundant Regex escapes
- Verify snapshots once they have been deployed
- Verify snapshots once they have been deployed
- Verify snapshots once they have been deployed
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.