Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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"
}
]
}
}
```