Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guardian/pan-domain-lambda
Custom lambda authenticator using pan-domain for API Gateway.
https://github.com/guardian/pan-domain-lambda
production
Last synced: 4 months ago
JSON representation
Custom lambda authenticator using pan-domain for API Gateway.
- Host: GitHub
- URL: https://github.com/guardian/pan-domain-lambda
- Owner: guardian
- License: other
- Archived: true
- Created: 2016-05-26T16:59:13.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T12:16:11.000Z (almost 2 years ago)
- Last Synced: 2024-05-02T18:49:49.673Z (7 months ago)
- Topics: production
- Language: JavaScript
- Homepage:
- Size: 746 KB
- Stars: 0
- Watchers: 19
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Custom lambda authenticator using pan-domain for API Gateway.
### Custom authorizer
This lambda is meant to be used as a custom authorizer in AWS API GateWay.
It requires the `method.request.header.Cookie` **Identity token source** and is compatible with [pan-domain-authentication](https://github.com/guardian/pan-domain-authentication).
Documentation on custom authorizers can be found [here](https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/) and [here](http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html).
### Output
The lambda's output looks like
```
{
"principalId": "FirstName LastName ",
"policyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "execute-api:Invoke",
"Effect": "Allow|Deny",
"Resource": "arn:full-arn-of-the-requested-api"
}
]
}
}
```