Skip to content
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

Permission for creating privileged users #30

Open
whatsthebeef opened this issue Jun 2, 2017 · 0 comments
Open

Permission for creating privileged users #30

whatsthebeef opened this issue Jun 2, 2017 · 0 comments

Comments

@whatsthebeef
Copy link

whatsthebeef commented Jun 2, 2017

I have a rails web app where I configure Parse without a master key and then rely on ACLs to manage access to objects.

Standard users can register themselves but there is a privileged user role and to acquire the privileges associated with this role the user must pay. The way I see it is that the user must signup and then assign themselves to the users list in the privileged user role, however to do this the user must be able to write to the role which creates a vulnerability where a standard user can just set themselves in the privileged user role.

I have thought of the following options

  1. Create a admin (like sudoer) user that has the privileges to do this and just as I am about the create the privileged user I login as the admin create and then logout again. To me this seems strange as there might be multiple admin sessions open at one time and I can't see in the parse docs if this is even permitted.

  2. Switch to use master key when creating the privileged user and then switch it off again. I think this might affect concurrent users and also seems quite ugly.

  3. Create a separate role system in the rails app. I think this is the worst option because it just adds complexity and bypasses what seems like a reasonable role mechanism for the sake of a small issue.

My proposal would be to add an optional argument for all actions where you can pass a master_key for that specific operation. This seems like a clean and simple way to resolve my problem. I have also encountered this problem elsewhere like when seeding the data so it's not just in a single area.

Do you have any thoughts on the conundrum and would you be willing for me to try implement my suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant