Skip to content

Commit 7f31667

Browse files
authored
Update README.md
1 parent 1e68d64 commit 7f31667

File tree

1 file changed

+4
-34
lines changed

1 file changed

+4
-34
lines changed

README.md

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,7 @@
1-
# upload.prx.org
1+
# S3 Signing Service
22

3-
This service is built on Amazon's API Gateway and AWS Lambda. When deploying the Lambda function code, the secret key ID must be inserted for the service to work correctly. That key is kept in LastPass.
3+
This service is built on Amazon's API Gateway and AWS Lambda. It can generate signatures for both v2 and v4 AWS API requests (though v2 is deprecated by AWS and should not be used). It only creates signatures valid with the S3 API. Signatures are created based on the secret access key defined in `ACCESS_KEY`. Signed requests will have permissions allowed by the user or role associated with that secret access key.
44

5-
The `buildspec.yml` file included in the repo is intended to be used for PRX CI.
6-
7-
The important parts of the API Gateway configuration, in addition to CORS, are:
8-
9-
### Method Request
10-
11-
#### URL Query String Parameters
12-
13-
- `to_sign`
14-
15-
### Integration Request
16-
17-
#### Mapping Templates
18-
19-
(for `application/json`)
20-
21-
```
22-
{
23-
"to_sign_encoded" : "$util.base64Encode($input.params('to_sign'))"
24-
}
25-
```
26-
27-
### Integration Response
28-
29-
#### Mapping Templates
30-
31-
(for `text/plain`)
32-
33-
```
34-
#set($inputRoot = $input.path('$'))
35-
${inputRoot.signature}
36-
```
5+
For PRX's standard deployment of this service, the `ACCESS_KEY` is managed in the [CloudFormation template](https://github.com/PRX/Infrastructure/blob/main/spire/templates/apps/s3-signing.yml#L108), along with the [policy](https://github.com/PRX/Infrastructure/blob/main/spire/templates/apps/s3-signing.yml#L112) that grants it permissions. For that particular deployment, if requests need to be signed for additional S3 destinations, they should be added to that policy.
376

7+
The signature is generated for the data passed into the service using the HTTP GET `to_sign` parameter.

0 commit comments

Comments
 (0)