[Feature Request] Adding extra configuration to widgets #1229
Replies: 7 comments
-
Can you give a little more context? We’ve talked about different ways to do this, info widgets (as opposed to service widgets) for example, strip “sensitive” keys ie it’s more of a blacklist than a whitelist. I guess one question is you foresee this being needed on a lot of widgets? I think idea 1 sounds a little complex for users. Again, a bit more context might help |
Beta Was this translation helpful? Give feedback.
-
I think there are a lot of info widget that could use at least a selector to define which of multiple things are included in the stats. There is The same idea applies to a lot of widgets:
What was the original idea behind cleaning/filtering the configuration? Is it just to not pass secrets to the client? If so, I think a way for a widget to provide keys that should not be passed to the client would be a cleaner way to hide secrets but allow widgets all the configuration they need to be fully featured. |
Beta Was this translation helpful? Give feedback.
-
I am not the original architect but we have talked about it a bit. Yes the idea of cleaning as a whitelist was to sanitize things in a more protected forward-compatible way. And in general I know that a goal here is balance usefulness with complexity, i.e. ben didnt want every widget using its own bespoke set of options etc. But of course I will defer to him on all this, and about the idea of refactoring the widget config. I know hes had a lot going on, but Im sure he will chime in at some point |
Beta Was this translation helpful? Give feedback.
-
currently, the service's config is not sanitized so configuration could go there. However, it makes more sense for config for the widget to be in the widget. I totally get not wanting to make things complicated, but having the ability for a widget to have some configuration I think is a must. As long as whatever sanitization specialization is delegated to the widget, each widget can be as complex as it wants without interfering with the simplicity of other widgets. ofc, if ben thinks differently, I'd love to discuss the best path forward. |
Beta Was this translation helpful? Give feedback.
-
I know that when Ben and I were talking about this as well, one of the concerns was about leaking keys / secrets out to clients. From a security perspective an explicit allow list is the best approach as you aren't chasing each new change and then adding the appropriate changes to the deny list. Regarding your suggestion of delegating that responsibility to the widget itself, there's merit to that, but all it takes is a single typo and now a potential secret could be exposed to clients. It's a tough balance, and I'm glad we're having the conversation. |
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically closed due to lack of community interest. |
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
-
Description
I would like to be able to pass configuration to service widgets to allow greater variability in their presentation and function.
Currently, any extra keys added to the
widget
object in theservices.yaml
are removed withincleanServiceGroups()
.I'm thinking there are two ways to allow this:
allowUncleanServices
insettings.yaml
which would allow any data in the widget's configuration to be available in the component.Which idea should I work on implementing (or do you have another idea)?
Other
No response
Beta Was this translation helpful? Give feedback.
All reactions