2
0
mirror of https://github.com/cderche/greenlock-challenge-s3 synced 2026-01-14 13:28:40 +00:00
acme-http-01-s3.js/README.md

66 lines
2.5 KiB
Markdown
Raw Normal View History

2019-05-08 17:20:10 +01:00
[![CircleCI](https://circleci.com/gh/cderche/greenlock-challenge-s3.svg?style=svg)](https://circleci.com/gh/cderche/greenlock-challenge-s3)
2019-05-08 17:45:55 +01:00
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0cbe184e285649a98452fbcc1228ff5a)](https://www.codacy.com/app/c.derche/greenlock-challenge-s3?utm_source=github.com&utm_medium=referral&utm_content=cderche/greenlock-challenge-s3&utm_campaign=Badge_Grade)
2019-05-08 17:20:10 +01:00
[![Known Vulnerabilities](https://snyk.io/test/github/cderche/greenlock-challenge-s3/badge.svg)](https://snyk.io/test/github/cderche/greenlock-challenge-s3)
[![BCH compliance](https://bettercodehub.com/edge/badge/cderche/greenlock-challenge-s3?branch=master)](https://bettercodehub.com/)
2019-05-08 18:21:25 +01:00
!["Lifetime Downloads"](https://img.shields.io/npm/dt/greenlock-challenge-s3.svg "Lifetime Download Count can't be shown")
!["Monthly Downloads"](https://img.shields.io/npm/dm/greenlock-challenge-s3.svg "Monthly Download Count can't be shown")
!["Weekly Downloads"](https://img.shields.io/npm/dw/greenlock-challenge-s3.svg "Weekly Download Count can't be shown")
2019-05-08 17:20:10 +01:00
2019-05-08 17:17:20 +01:00
# greenlock-challenge-s3
S3 backed challenge strategy for greenlock-express.js (and greenlock.js)
2019-05-08 18:27:15 +01:00
## Requirements
You will need a s3 bucket and the corresponding credentials.
## Integration
### greenlock-express.js
```javascript
let challenge = require('greenlock-challenge-s3').create({
accessKeyId: accessKeyId // Replace with your accessKeyId
, secretAccessKey: secretAccessKey // Replace with your secretAccessKey
, regionName: regionName // Replace with your regionName
, bucketName: bucketName // Replace with your bucketName
2019-05-08 18:34:59 +01:00
, directory: 'acme-challenge/' // Recommended
2019-05-08 18:27:15 +01:00
, debug: true // Debug
});
var Greenlock = require("greenlock-express");
var greenlock = Greenlock.create({
// Other options
2019-05-08 18:35:59 +01:00
, challenges: {
'http-01': challenge
}
2019-05-08 18:27:15 +01:00
});
// Continue your greenlock setup
```
## Testing
2019-05-08 18:29:29 +01:00
The strategy is tested against the [greenlock-challenge-test](https://git.coolaj86.com/coolaj86/greenlock-challenge-test.js)
2019-05-08 18:27:15 +01:00
To run the tests yourself, create a `.env` file with the following
2019-05-09 12:25:25 +01:00
```console
2019-05-08 18:27:15 +01:00
// .env file
AWS_ACCESS_KEY_ID=abc // Replace with your accessKeyId
AWS_SECRET_ACCESS_KEY=abc // Replace with your secretAccessKey
AWS_BUCKET_REGION=abc // Replace with your regionName
AWS_BUCKET_NAME=abc // Replace with your bucketName
```
Run the following command:
```console
$ npm run clean && npm run test && npm run clean
```
## License
ISC