Use multiple API Gateway authorizers

0

Hello All, Is there a way to use multiple authorizers in API Gateway or chain the authorizers. For instance, check the signed headers with the default "AWS IAM" authorizer and check a custom token with a custom authorizer executing a Lambda? If this is not possible, what would be the best way to achieve it?

3 réponses
1
Réponse acceptée

You can only have a single authorizer on every endpoint. If you need more than one, you will need to use a Lambda authorizer to verify both.

In addition to the authorizer you can specify a resource policy, include WAF and use mutual TLS. All pf these apply to all endpoints and they are evaluated in addition to the authorizer.

profile pictureAWS
EXPERT
Uri
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a 24 jours
1

I know this is a really old question, but I have a similar issue to which the accepted answer isn't helpful. I AM using a lambda authorizer, of type TOKEN. But there I need to specify the issuer and audience, and I can't specify multiple issuers. So I am still stuck even with a lambda authorizer.... Any thoughts?

Dolf
répondu il y a 10 mois
  • What do you mean by: I need to specify the issuer and audience, and I can't specify multiple issuers? Where do you need to specify them? If you need to look at multiple headers in the request, change the authorizer to REQUEST, which will send the entire request to the function.

0

similar issue. i want to use both mTLS and oAuth2 Cognito User_pool on API Gateway. so first i need to use an authorizer as a lambda authorizer to check the CRL. but then i can't get the Token by launching a second authorizer.

répondu il y a 10 mois
  • As answered above, you can only have a single authorizer. If you need to check multiple things, do all of them in that authorizer. So in your case, you will need to check CRL and the token inside your Lambda authorizer.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions