Skip to main content

Dịch vụ xác thực

Authentication có 3 loại:

  • Internal access: Một dịch vụ gọi tới dịch vụ khác cần xác thực
  • External access: Một khách hàng gọi đến một trong các dịch vụ của chúng ta và cần xác thực
  • Public access: Công khai hoặc sử dụng key cố định

Cách triển khai internal access:

  • Define API permissions with IAM policies

  • Internal Auth API

    • Lambda behind API Gateway using IAM Authentication (SigV4)

    • The API converts IAM caller role into a JWT Token that can be used against all APIs using our custom authorizer

    • Example: A lambda calling this API would get a JWT token with the lambda execution role

  • Extend Custom Authorizer to accept and trust JWT tokens generated by the Internal Auth API

    • Use same method as above “define a check which determines if the request call contains a token which includes an id_token and an access_token or JWT token"

    • The custom authorizer then returns the policy document attached to the role contained in the JWT token

Read more: