MetaCell / cloud-harness

Other
14 stars 5 forks source link

Common microservice: get runtime environment #706

Open filippomc opened 10 months ago

filippomc commented 10 months ago

Currently there is no generic way to setup configurations that are different on the different environments in the frontend, at runtime. One example is the google analytics tag between dev and prod environment.

The common microservice provides that for Sentry and Accounts but there is no generic way to add more.

A new endpoint can be added to the common microservice to get global configurations, say GET api/environment?var=A.

This will return the configuration variable named "A" (note that is better not to expose any environmental variable from the runtime, but only the values that are intended to)

filippomc commented 10 months ago

A more powerful approach could be to add am endpoint to return anything in the values.yaml configuration, have to see how much this could expose potentially exploitable information