Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Add configuration for controlling ACL (permissions) of uploaded screenshots/pdfs #330

Merged
merged 3 commits into from
Jan 3, 2018
Merged

Add configuration for controlling ACL (permissions) of uploaded screenshots/pdfs #330

merged 3 commits into from
Jan 3, 2018

Conversation

berzniz
Copy link
Contributor

@berzniz berzniz commented Nov 7, 2017

The pdf feature currently uploads files to S3 with the ACL of public-read which is open for everyone to download. In some scenarios it is desirable to have better privacy for the generated files, for example when capturing sensitive information.

The suggested change keeps the default public-read and adds a CHROMELESS_S3_OBJECT_ACL configuration to the serverless.yml file.

Note: Running npm test locally works so I'm not sure what happens on the CI environment. I see other PRs are also having similar problems with the tests.

@berzniz
Copy link
Contributor Author

berzniz commented Nov 19, 2017

Is there anything I can do more to help this get into master? As I noted in the original message, the tests fail on the CI for me and other PRs and not because of this change.

Copy link
Collaborator

@adieuadieu adieuadieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @berzniz — Thank you for this! Sorry about the delayed response.

@adieuadieu adieuadieu merged commit 2edd92c into schickling:master Jan 3, 2018
@berzniz
Copy link
Contributor Author

berzniz commented Jan 3, 2018

Oh no... I seem to introduce a bug here where the env-var name isn't consistent. It doesn't break anything, but the new functionality doesn't apply.

It should be:

function getS3FilesPermissions() {
  return process.env['CHROMELESS_S3_OBJECT_ACL'] || 'public-read'
}

And not:

function getS3FilesPermissions() {
  return process.env['CHROMELESS_S3_FILES_PERMISSIONS'] || 'public-read'
}

Should I issue a new PR?

@adieuadieu
Copy link
Collaborator

Ah. Shoot. Yes; a PR would be great.

@berzniz
Copy link
Contributor Author

berzniz commented Jan 7, 2018

Added #382

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants