Sampathkumar
Sampathkumar

Reputation: 121

How to configure Keycloak in AWS API Gateway

I am setting up a Keycloak server to authorize the api requests. Keycloak also need to be configured in AWS API Gateway.

If I configure the Keycloak endpoint using HTTP proxy method, some of the page redirection are not working properly.

Can you please suggest the guideliness to configure Keycloak admin web page via API Gateway?

Upvotes: 2

Views: 9988

Answers (3)

bkr388
bkr388

Reputation: 1

Abdennours answer is only for HTTP APIs. If you want to use REST API then you have to use Lambda Authorizer. Your Lambda Authorizer must do the validation against your keycloak server.

Upvotes: 0

Abdennour TOUMI
Abdennour TOUMI

Reputation: 93193

Besides Lambda, JWT is now available as built-in authorizer:

enter image description here

Upvotes: 1

Tobias
Tobias

Reputation: 701

You can add custom authorizers to your API-Gateway. Basically you send a request to keycloak in order to get for example your JWT-Token. API-Gateway then has a custom authorizer (a lambda) which validates the token and returns an IAM policy.

See https://aws.amazon.com/de/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/ for more information.

Upvotes: 3

Related Questions