Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

471
Vistas
AWS API Gateway + AWS ECS + OAuth2 Password Grant

I’m planning on building a user management Java API and deploy it in Wildfly. The API specification will be done using Swagger.

Then I will create a Docker image with the Wildfly + application and then create a container from that image on AWS ECS (EC2 Container Service).

The next step is to import the API’s Swagger specification into AWS API Gateway and forward the requests to the created AWS ECS container.

My question. What is the best option to implement an OAuth2 server:

  1. Create it in a Lambda Function and use it as a Custom Authorizer in AWS API Gateway?
  2. Create it on a new Java application (on the same or new Wildfly container), therefore not using the AWS API Gateway’s Custom Authorizer option? Is this even possible, since the requests will be received from AWS API Gateway? I ask this because when trying to import a Swagger specification with and OAuth2 security implementation, AWS API Gateway gives the following error:

    Your API was not imported due to errors in the Swagger file. Unsupported security definition type 'oauth2' for 'oauth'. Ignoring.

As a side note, since all the future clients of the API will be developed by myself, I’m planning on using the Resource Owner Password Credentials Grant on my OAuth2 server.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I'm assuming 'Oauth2 Server' in your question means the thing that validates tokens. You don't state if your app is actually issuing tokens, or what type of tokens are issued.

Best option is probably subjective, but my preference has always been to use Custom Authorizers, as this is then a re-usable component for other resources.

Swagger imports into API Gateway aside, you can manage authorization in your app if you wanted to, it just becomes the first thing you deal with when a new request is received, just make sure the authorization header is mapped in API Gateway to head downstream.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda