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

Updated to pass masterKey for Config get request #575

Merged
merged 3 commits into from
Jan 31, 2017

Conversation

brndmg
Copy link
Contributor

@brndmg brndmg commented Nov 2, 2016

I believe this will resolve #339. When the masterKey is not being passed on the FETCH, then the server is returning a 401.

I had the same issue with version 1.0.19 of the dashboard and 2.2.24 of the server.

@facebook-github-bot
Copy link

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot
Copy link

@brndmg updated the pull request - view changes

@facebook-github-bot
Copy link

@brndmg updated the pull request - view changes

@brndmg
Copy link
Contributor Author

brndmg commented Nov 3, 2016

I also have this issue with the Jobs store, even though it isn't functional in this edition, the masterKey still needs to be passed to avoid the 401.
https://github.com/ParsePlatform/parse-dashboard/blob/master/src/lib/stores/JobsStore.js#L33

@dvanwinkle
Copy link
Contributor

I'm not sure why you would need to pass in the Master Key here. Are you not using your Master Key in the config? It should pass the Master Key every time.

@flovilmart
Copy link
Contributor

Config should be readable without the masterKey also!

@brndmg
Copy link
Contributor Author

brndmg commented Nov 4, 2016

@flovilmart and @dvanwinkle You just contradicted each other.
Maybe parse-dashboard is highlighting an issue with parse-server. I will see if I can get it back to a bad state outside of parse-dashboard.

@dvanwinkle
Copy link
Contributor

Sorry, I was referring to parse.com, not parse-server. The original ticket that was referenced was parse.com related, which DOES need A key. It cannot be called without any key. I just realized that you were fixing something related to parse-server, in which yes, it should be able to be read anonymously.

@brndmg
Copy link
Contributor Author

brndmg commented Nov 4, 2016

I think it was because I added a clientKey to my parse-server to be able to use it from the Android SDK.
Before I added the clientKey, I could read from the /config without any extra headers (just the appId).
Once I added the clientKey and restarted the parse-server, parse-dashboard could no longer read the config without the masterKey (or the clientKey).

I confirmed this with curl to the parse-server.

@dvanwinkle
Copy link
Contributor

You can use the Client SDKs without adding the clientKey to the Parse server.

With that said, would a better solution be to accept the client keys from the config and then register those with the Node Parse SDK?

@brndmg
Copy link
Contributor Author

brndmg commented Nov 5, 2016

It's hard to say. I know it is possible to avoid using the clientKey, but shouldn't the dashboard work regardless? Isn't that the point of it having the masterKey?

@dvanwinkle
Copy link
Contributor

I don't know the right answer. Thinking of parse.com, you are required to have either a masterKey or one of the SDK keys to have access to the config. The parse server acts identically, except when you don't have and SDK key, you aren't required to pass in any Client keys.

There isn't any harm in passing the masterKey here, so I think that it is okay to merge this in. I am just trying to think of the easiest way to solve all the places that this is happening. You said that the jobs store still had the issue. I am sure that there are a few more places with the same issue.

I am leaning more towards fixing all of the places this issue exists as being the right way, so, if @flovilmart agrees, I don't see any issues with merging this in, but, we should probably create and Issue regarding at least the jobs store.

@j-koenig
Copy link

Any updates on this issue? I'm facing the same problem with parse-server v2.2.25 and parse-dashboard v1.0.19. We're also using a clientKey in our parse-server configuration and simply removing it won't be an appropriate solution.

@redenz
Copy link

redenz commented Dec 5, 2016

Is the only conflict to this issue changelog? Can we get this merged in please?

@flovilmart
Copy link
Contributor

We can't get it merged as there is a conflict.

@natanrolnik
Copy link
Contributor

@flovilmart now we can fix this PR's conflict here on the web and merge it. As the file is only the Changelog, it's pretty easy to do it.

@natanrolnik
Copy link
Contributor

@codegefluester can we fix the conflict and merge this? Now that the Parse.com dashboard is gone, if Parse-Server has any client keys configured, the dashboard doesn’t access config data. Even though config is public, if the request from dashboard doesn’t have any key, it will fail because if the server requires at least one key.

@facebook-github-bot
Copy link

@brndmg updated the pull request - view changes

@steven-supersolid steven-supersolid merged commit cf0c7fb into parse-community:master Jan 31, 2017
@brndmg brndmg deleted the config-request-fix branch July 14, 2017 11:36
koolamusic pushed a commit to koolamusic/parse-dashboard that referenced this pull request Jan 30, 2018
 Updated to pass masterKey for Config get request (parse-community#575)
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.

Error loading Config in Dashboard from apps pointing to api.parse.com/1
8 participants