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

Parse S3 File Access with No Credentials #832

Closed
nkranes opened this issue Mar 4, 2016 · 13 comments
Closed

Parse S3 File Access with No Credentials #832

nkranes opened this issue Mar 4, 2016 · 13 comments

Comments

@nkranes
Copy link

nkranes commented Mar 4, 2016

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

-[X] You've met the prerequisites.

-[X] You're running the latest version of Parse Server.

-[X] You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

AWS, Parse 2.1.4, using S3 File Adapter

Steps to reproduce

Upload file through parse. Url is returned.

Hit new file through Parse (directAccess: false) with no credentials and it returns properly. I believe in previous versions this request required Parse credentials. Is this by design?

Logs/Trace

@Cliffordwh
Copy link

@nkranes I think it is. I noticed that too.

Just out of curiosity where did you set the credentials for the S3Adaptor?. Im using a config JSON file to run with pm2 but cant seem to configure it now with 2.1.4.

@flovilmart
Copy link
Contributor

@Cliffordwh for now we don't have a support for those env variables :(

@Cliffordwh
Copy link

@flovilmart OOOo makes sense. Where could i then hard code a quick fix to get it to work. in 2.1.3 i managed to just code it into /usr/bin/parse-server

@flovilmart
Copy link
Contributor

I'm on it!

@nkranes
Copy link
Author

nkranes commented Mar 4, 2016

@Cliffordwh I don't use env vars. My config looks like:

var api = new ParseServer({
  databaseURI: 'mongodb://localhost:27017/dev',
  cloud: {path}'
  appId: 'myAppId',
  masterKey: 'myMasterKey', // Keep this key secret!
  fileKey: 'optionalFileKey',
  serverURL: 'http://localhost:' + port, // Don't forget to change to https if needed
  allowClientClassCreation: 'false',
  filesAdapter: new S3Adapter(
    '{access_key}',
    '{secret_key}',
    '{bucket_name}',
    { directAccess: false}
  ),
});

@Cliffordwh
Copy link

@nkranes Thanks. Was just informed it wont work yet with env.

@nkranes
Copy link
Author

nkranes commented Mar 4, 2016

So @flovilmart , is open S3 file access through Parse intentionally open?

@nkranes
Copy link
Author

nkranes commented Mar 4, 2016

@Cliffordwh - yeah, @flovilmart types faster than I do. :)

@Cliffordwh
Copy link

@flovilmart Thanks for that. So is it safe to run "PARSE_SERVER_FILES_ADAPTER" : "S3Adapter", in my config with the other env's?

Cause that didnt work for me/.

@flovilmart
Copy link
Contributor

Hat would need to be the full path to the module I believe

@flovilmart
Copy link
Contributor

like parse-server/Adapters/Files/S3Adapter

@gfosco
Copy link
Contributor

gfosco commented Mar 6, 2016

If I understand the issue correctly, this is the intended behavior of files. If you have a file URL, you have access to the file. This is also how it worked on Parse.com.

@gfosco gfosco closed this as completed Mar 6, 2016
@chderen
Copy link
Contributor

chderen commented Apr 5, 2016

@gfosco so there is no real difference between directAccess true or false. if the file url is known, the file is accessible. i am right?

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

5 participants