GithubHelp home page GithubHelp logo

Comments (3)

wilkinsona avatar wilkinsona commented on April 28, 2024 1

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.

meltsufin avatar meltsufin commented on April 28, 2024

@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.

wilkinsona avatar wilkinsona commented on April 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.