Parse S3 File Access with No Credentials
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
@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.
@Cliffordwh for now we don't have a support for those env variables :(
@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
I'm on it!
@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}
),
});
@nkranes Thanks. Was just informed it wont work yet with env.
So @flovilmart , is open S3 file access through Parse intentionally open?
@Cliffordwh - yeah, @flovilmart types faster than I do. :)
@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/.
Hat would need to be the full path to the module I believe
like parse-server/Adapters/Files/S3Adapter
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 so there is no real difference between directAccess true or false. if the file url is known, the file is accessible. i am right?