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

Add ability to send Client Key to parse server. #57

Merged
merged 2 commits into from
Aug 2, 2016

Conversation

cleever
Copy link

@cleever cleever commented Aug 1, 2016

The client keys used with Parse are no longer necessary with Parse Server, however you could still require them.

The parse push plugin wasn't able to send the client key.

This pull request try to fix this issue.

@cleever cleever changed the title -Add the ability to send Client Key to parse server. Add the ability to send Client Key to parse server. Aug 1, 2016
@taivo
Copy link
Owner

taivo commented Aug 2, 2016

Can you help me understand what this is for?

@cleever
Copy link
Author

cleever commented Aug 2, 2016

Sure.

The code assumed that Client Key is not needed anymore, but it is not true. It's optional.
Actually you can configure your own parse server instance to require this key.

Now the push plugin could send the key to the server for correct authentication if the key is needed for your server.

@cleever cleever changed the title Add the ability to send Client Key to parse server. Add ability to send Client Key to parse server. Aug 2, 2016
@taivo
Copy link
Owner

taivo commented Aug 2, 2016

I was hoping to understand your usecase. ParsePlatform docs/guide says that client keys provide no additional security. They mentioned that the client keys are now only useful to manually distinguish different clients. Since apps that use this plugin are Cordova javascript apps, using the js key for that purpose might be better.

I kept things simple and dropped the client key in native Parse initialization because this plugin doesn't interact with user cloud code at all and there isn't really a path where the client key is needed.

I could be wrong. Do your usecases require client keys for functions related to this plugin's API?

@cleever
Copy link
Author

cleever commented Aug 2, 2016

Sorry @taivo I could be wrong too.

There are some documentation about this;
https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#keys
https://github.com/ParsePlatform/parse-server#client-key-options

In other words, if your server is configured to use them, the clients should provide them.

There are some test cases that demonstrated it:
https://github.com/ParsePlatform/parse-server/pull/1789/files

Like you said, ClientKey doesn't provide additional security, because is easy do open the code and extract them. However we must remember that applicationId is sent by e-mail in reset password request and confirm account/email process.

If you are sure about the process of saving a installationId doesn't need the client key even if the server is configured to use them, you should ignore this pull request.

@cleever cleever mentioned this pull request Aug 2, 2016
@taivo taivo merged commit 619f0e8 into taivo:master Aug 2, 2016
@taivo
Copy link
Owner

taivo commented Aug 2, 2016

You're right on this! Thanks for this PR and the excellent discussion on issue #52.

@cleever
Copy link
Author

cleever commented Aug 2, 2016

Thank you @taivo for your excellent work and your great support.

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

Successfully merging this pull request may close these issues.

2 participants