-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fix keys aren't enforced #1789
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
Fix keys aren't enforced #1789
Conversation
Current coverage is 92.16%
@@ master #1789 diff @@
==========================================
Files 87 87
Lines 6206 6210 +4
Methods 1069 1070 +1
Messages 0 0
Branches 1292 1293 +1
==========================================
+ Hits 5720 5723 +3
- Misses 486 487 +1
Partials 0 0
|
Personally I think we should be removing client keys entirely, they aren't necessary anymore in Parse Server. So I'd rather change the documentation to reflect the current behaviours. If people have specific use cases for client keys, though, I'd happily listen to them. Also, this is a breaking change for people who currently have weird key setups so we would need to bump to 2.3.0 if we do this. |
I understand
Technically, in Parse.com the applicationId alone would be enough also, right? Considering that both are meant to be public as well, what the keys really added there that they don't add here? |
Also, if we remove them completely, people will need to change the server initialization to remove those unneeded parameters - although I don't think it would be breaking as much as enforcing if defined. |
Yep the client keys are pretty much unnecessary. In JS you can provide extra, unused parameters, so people wouldn't need to remove them from the config. |
So should I open a PR fixing the docs? |
I am in favor of that solution but I haven't considered all use cases so if someone has a good reason to keep client keys around, we should merge this instead. I think @lacker had a reason, but I never heard it. |
Can we spell out why we do or don't need the keys? All I can think of for keeping: |
I agree with @steven-supersolid . Even though it's a weak layer, it's another hurdle (small, I agree) to be passed. |
weird key...even Parse blog said it is useless?
|
Why would extracting the client key be any harder than extracting the application ID? |
That's right, I thought about it. |
Actually we probably don't. But, if/when we approach running multiple Parse apps on a single server, the application ID might be necessary depending on the approach we use. Personally I think one app per mount point is the way to go but I don't want to close the door on multiple apps per mount point. |
Fair enough! That's what I imagined. |
I misunderstood that we were talking about removing the application ID as well. If not then the client keys are not so important. I'm fine with removing the client keys. |
Please do not remove client keys. Unfortunately I strongly believe that there are many misconfigured apps out there with messed up db rights that heavily rely on this mechanism. It is not a strong one for sure, but at least a key other than the appid is needed. |
#1733 will happen when only some client keys are defined, like defined
clientKey
,javascriptKey
andrestAPIKey
but missing thedotNetKey
.Added some test cases to demonstrate the fix.