Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
parse-server-s3-adapter
Advanced tools
parse-server adapter for AWS S3
npm install --save parse-server-s3-adapter
the ability to explicitly pass credentials to this adapter is deprecated and will be removed in a future release.
You may already be compatible with this change. If you have not explicitly set an accessKey
and secretKey
and you have configured the environment variables AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
, then you're all set and this will continue to work as is.
If you explicitly configured the environment variables S3_ACCESS_KEY
S3_SECRET_KEY
OR
If you explicitly configured the accessKey
and secretKey
in your adapter configuration, then you'll need to...
For non AWS hosts:
aws configure
in a terminal which will step you through configuring credentials for the AWS SDK and CLIFor an AWS host:
Then
accessKey
and secretKey
from your configurationIf for some reason you really need to be able to set the key and secret explicitly, you can still do it using s3overrides
as described below and setting accessKeyId
and secretAccessKey
in the s3Overrides
object.
Although it is not recommended, AWS credentials can be explicitly configured through an options object, constructor string arguments or environment variables (see below). This option is provided for backward compatibility and will be removed in the forthcoming version 2.0 of this adapter.
The preferred method is to use the default AWS credentials pattern. If no AWS credentials are explicitly configured, the AWS SDK will look for credentials in the standard locations used by all AWS SDKs and the AWS CLI. More info can be found in the docs. For more information on AWS best practices, see IAM Best Practices User Guide.
{
"appId": 'my_app_id',
"masterKey": 'my_master_key',
// other options
"filesAdapter": {
"module": "parse-server-s3-adapter",
"options": {
"bucket": "my_bucket",
// optional:
"region": 'us-east-1', // default value
"bucketPrefix": '', // default value
"directAccess": false, // default value
"baseUrl": null, // default value
"baseUrlDirect": false, // default value
"signatureVersion": 'v4', // default value
"globalCacheControl": null, // default value. Or 'public, max-age=86400' for 24 hrs Cache-Control
"ServerSideEncryption": 'AES256|aws:kms' //AES256 or aws:kms, or if you do not pass this, encryption won't be done
}
}
}
Set your environment variables:
S3_BUCKET=bucketName
the following optional configuration can be set by environment variable too:
S3_SIGNATURE_VERSION=v4
And update your config / options
{
"appId": 'my_app_id',
"masterKey": 'my_master_key',
// other options
"filesAdapter": "parse-server-s3-adapter"
}
var S3Adapter = require('parse-server-s3-adapter');
var s3Adapter = new S3Adapter('accessKey',
'secretKey', bucket, {
region: 'us-east-1'
bucketPrefix: '',
directAccess: false,
baseUrl: 'http://images.example.com',
signatureVersion: 'v4',
globalCacheControl: 'public, max-age=86400' // 24 hrs Cache-Control.
});
var api = new ParseServer({
appId: 'my_app',
masterKey: 'master_key',
filesAdapter: s3adapter
})
Note: there are a few ways you can pass arguments:
S3Adapter("bucket")
S3Adapter("bucket", options)
S3Adapter("key", "secret", "bucket") -- Deprecated, see notice above
S3Adapter("key", "secret", "bucket", options) -- Deprecated, see notice above
S3Adapter(options) // where options must contain bucket.
S3Adapter(options, s3overrides)
If you use the last form, s3overrides
are the parameters passed to AWS.S3.
In this form if you set s3overrides.params
, you must set at least s3overrides.params.Bucket
or with an options hash
var S3Adapter = require('parse-server-s3-adapter');
var s3Options = {
"bucket": "my_bucket",
// optional:
"region": 'us-east-1', // default value
"bucketPrefix": '', // default value
"directAccess": false, // default value
"baseUrl": null // default value
"signatureVersion": 'v4', // default value
"globalCacheControl": null // default value. Or 'public, max-age=86400' for 24 hrs Cache-Control
}
var s3Adapter = new S3Adapter(s3Options);
var api = new ParseServer({
appId: 'my_app',
masterKey: 'master_key',
filesAdapter: s3Adapter
})
FAQs
AWS S3 adapter for parse-server
The npm package parse-server-s3-adapter receives a total of 149 weekly downloads. As such, parse-server-s3-adapter popularity was classified as not popular.
We found that parse-server-s3-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.