How to implement Basic Authentication in API gateway

0

I have an API proxy, I want to implement Basic Authentication mechanism for it.

curl -v https://example.com/dev/test
-H "Authorization: Basic {clientID:ClientSecret - Base64EncodedValue}"

I do not want to get an access token from Cognito and make another request to the API gateway.

Rohit
feita há 2 meses235 visualizações
1 Resposta
0

You can use API Gateway Lambda authorizers to validate the username and password. The Lambda would receive the request extract the Base64-encoded credentials, decode them, and then verifies the username and password against credentials from a database. The Lambda then generates a policy indicating what the user can and can't do e.g. GET /users. The policy is then cached so the Lambda authorizer isn't called on every request.

AWS
respondido há 2 meses
profile picture
ESPECIALISTA
avaliado há 2 meses
  • What is the use of "API key required" check box under the path API Gateway -> APIs -> Proxy -> Resources?

  • API keys in API Gateway are used to manage access to APIs and monitor API usage. You can configure usage plans and API keys to allow customers to access selected APIs, and begin throttling requests to those APIs based on defined limits and quotas. These can be set at the API, or API method level.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas