spring-cloud / spring-cloud-dataflow

A microservices-based Streaming and Batch data processing in Cloud Foundry and Kubernetes
https://dataflow.spring.io
Apache License 2.0
1.11k stars 580 forks source link

Service to store user settings #3923

Open jvalkeal opened 4 years ago

jvalkeal commented 4 years ago

As a user I'd like to store my personalised settings on a server side. Settings would be stored in a database and accessed via a rest api for logged in users.

Main user of this settings store would be UI as for example user could save preference for theme(the most important future UI development to add dark mode!). After that every UI component could potentially work differently depending on user settings and what settings we'd like to add.

Database entity would simply store setting key/value as a string columns. We additionally need to store some info about which logged in user owns a setting. Storing a username would be enough if only one identity provider is used. There is a theoretical attach vector if system is somehow configured to use multiple identity providers as same username can actually be totally different physical user. For this case we could also store some info from where user came from(i.e. uaa/azure, etc).

jvalkeal commented 4 years ago

There is a working prototype of this concept in https://github.com/jvalkeal/github-actions-dashboard which is using clarity UI which for logged in users loads settings from a backend and changes some settings via UI's global state handled with ngrx.