parse-community / parse-community/parse-server-s3-adapter

Don't accept Key and Secret as constructor arguments

Open
#20 7 comments 2 reactions 1 assignee View on GitHub

@acinader is already working on this.

Since Aug 6, 2016.

Dominant language
JavaScript
Stars
80
Forks
86
PR merge metrics
No merged PRs in 30d

Description

Introduce a breaking change that would continue to allow a user to configure AWS credentials explicitly during adapter construction, but remove the discreet parameters from the constructor.

See #14 for links to AWS best practice docs and some discussion of this issue.

Currently standard configuration of AWS OR explicit credentials can be used. Accepting both makes both the documentation and argument processing complicated and error prone.

In addition, by not conforming to best practices, it promotes putting secret keys in places where they shouldn't go.

I'm proposing to:

  1. Remove the explicit constructor parameters for key and secret
  2. Remove the env vars S3_ACCESS_KEY & S3_SECRET_KEY as a configuration option for credentials (and make clear in the docs that AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY work)
  3. Rename the member of the config options from: accessKey & secretKey to accessKeyId & secretAccessKey to match the AWS SDK.
  4. Update documentation and tests to reflect change

I don't see anywhere where this change would require a doc change in parse-server, but a decision would have to made about when to either include the revision change in the parse-server package.json, or potentially removing all reference in code to this adapter and updating the documentation to show how to use it (which I think would be preferable as it would be a good model for how to use an adapter that is not explicitly referenced in parse-server.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.