-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Feat: Add dashboard router to store Dashboard User Settings #7588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for opening this pull request!
|
Codecov Report
@@ Coverage Diff @@
## master #7588 +/- ##
==========================================
- Coverage 93.94% 84.05% -9.90%
==========================================
Files 181 182 +1
Lines 13281 13355 +74
==========================================
- Hits 12477 11225 -1252
- Misses 804 2130 +1326
Continue to review full report at Codecov.
|
Related: parse-community/parse-dashboard#1618 |
I'm thinking with our focus on security for V5, it could be good to have a |
Do we need an own trigger for that, or should dashboard login be handled the same (and invoke the same triggers) as any other user login? |
I would propose a different trigger, as a dashboard user would have different column requirements and handling to a standard Parse app user. |
What do you mean by column requirements? |
Well if you're using the default login flow, any user that could login to your app, could log into your dashboard. Which i'm not sure is a desired outcome. From a triggers perspective, how would a developer be able to differentiate between an admin logging in to the dashboard, vs the app? Perhaps I meant dashboard specific user settings, such as MFA secret, features, etc. But I guess they could be stored in a different collection as a pointer. |
Not necessarily, I was referring only to the trigger usage. If we found a way to reuse existing auth triggers, we wouldn't have to duplicate triggers just for dashboard.
Yes, we can add a parameter to identify it as you suggested. Maybe we can look at this in context of privacy compliant logging. A topic that we will have to address if we want to make the dashboard a practical tool for production applications (which is currently isn't). There we will probably want to identify a client (dashboard, admin app, etc) by a UUID. Passing such a UUID can allow the server to identify not only the dashboard but any other custom admin app. Currently, the server can only differentiate by user (and SDK type if using client keys), indifferent of where the user signs in.
If we move the dashboard user auth process to the server side, there may be good reasons to not build a parallel auth system with distinct rules. The dashboard can be treated as just another app. Dashboard users can be grouped with roles. It seems we have everything there. This would prepare us for dashboard feature permissions based on roles / users. This approach becomes more obvious if we look at custom admin apps, like dashboard but for app specific admin purposes. They probably already exist today for many parse servers, and they are likely also using the existing user / roles mechanisms. |
New Pull Request Checklist
Issue Description
Currently, creating a Parse Server user has to be done via command line.
Related issue: #7479
Approach
Creates endpoint to signup and login as a dashboard user. This would have to be implemented in the dashboard. Would also allow features per user, beforeDashboardLogin hooks, etc.
Draft PR to get thoughts before I work on Dashboard implementation.
TODOs before merging