-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: Cloud Integrations, SolarUser
-
None
With the introduction of the httpGet() expression function, and relatedly the httpBasic() helper function, sensitive "secrets" like the credentials are written in plain-text in the expression. It would be better if there was a way to look up "secrets" from the expression, so something like this this was possible:
has('irradiance') ? httpGet('https://example.com/my-service', { date: formatDate(timestamp, "yyyy-MM-dd'T'HH:mm:ssZ") }), { 'Authorization': httpBasic('user', secret('example-com-my-service-password')) })?.data?.result : null
The secret(key) function is the new part, and the purpose of that function would be to lookup a key value from some "secret storage". The "secret storage" would need to have a SolarUser API to manage secret values, with basic CRUD operations.