-
Notifications
You must be signed in to change notification settings - Fork 55
Fix typo that cause AWS auth to fail. #7
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 typo that cause AWS auth to fail. #7
Conversation
PS its now running...... |
Oh! That's scary! You sure you should do that that early in the morning ? |
meh |
@acinader Thanks for patching up all my code! 😀 |
team effort ftw! |
BTW how is it going on your dev app? |
@flovilmart glad you asked. -- it ran all the way through, so that is good. I created my test environment by
Good news I didn't screw up anything irreversibly! So I deleted the dev db and I am now loading a new one with fresh data so I can test again. I really have no idea how file, master, app key interact with the file/filename in the db or what really happened, so I am going to have to put some time into grokking it. In any event, I'm pretty sure this is all just user error? |
403 on the images? still hosted on parse.com or uploaded on S3? maybe that's your bucket read policy that's borked? Before running the script, we should maybe add a small file on the adatper, and try to fetch it without the access keys to ensure they are publicly accessible? |
uploaded to s3. i deleted everything (hasty.) will try again and report On Wed, Jul 20, 2016 at 1:53 PM, Florent Vilmart notifications@github.com
Arthur Cinader Jr. 111 Sutter St. |
where did you get the 403? From parse-server? what were the URL's? |
no, from s3. ok, and as i am looking at it now, i see the file key in there. I think my id suggest you not waste your time thinking about it, i think i see the On Wed, Jul 20, 2016 at 2:06 PM, Florent Vilmart notifications@github.com
Arthur Cinader Jr. 111 Sutter St. |
@acinader Take this url as an example The url parts are broken into: |
@JeremyPlease yeah, that's it all right, and i kinda saw what was going on, but didn't realize the implications. OK, so i checked the source code and I'm pretty sure that I'm safe, but one question before i f'up my world ;) in the config, i use parse.com as the server url, but it is never used for writes. so i am ok using my master and app id keys, nothing will get changed. the ONLY thing I have to be careful of is that I am using a backup db and not our prod db. I'm like 99.9999% sure i've got this right, but.... ;) i.e. the only Parse. string is for getting the schema. |
Maybe one last thingy thing... The Content-Type of the files? is that set anywhere? |
@acinader I'll give you that extra 0.0001% 😉 Your understanding is absolutely right. The applicationId, masterKey, and serverUrl are all only used for reads (fetching the schema and all objects). The mongoURL is used for all writes. So, as long as you put in a backup db there, then you're good to go (I used a bunch of localhost mongo urls in my testing). @flovilmart The content type is read from server response when fetching the file and then passed as 3rd argument in |
👍 |
@JeremyPlease would be awesome to add tests on that :) |
Tests would indeed be awesome 😁 Maybe this weekend. |
Just before we release a proper NPM package. |
ok. running again. optimistic. will take a couple of hours.
|
I'll open a branch for the ci configuration and code coverage, so we'll be all set |
ok, so it ran, and all image requests are still failing with a 403. BUT! all of the images are on s3 with the correct content-type and acl. so that's good. when i look at the records in dashboard (my own dashboard running on my box against my parse-server), the url's for files look like this: and they 403. BUT!!!! works just fine, so it is clearly just MY config error
thanks for the help guys. |
@acinader I wrote the Example:
Then, Parse Server runs this code and determines that the new filename is hosted on Parse's legacy file server 😖 I'll submit a PR with this fix. Unfortunately, you'll need to reset your database and try the migration again to test. |
Addresses issue mentioned in comments of PR parse-server-modules#7
No description provided.