Xác thực khách hàng: Cognito user pool và identity pool
Ứng dụng cần biết khách hàng là ai trước khi cho họ xem đơn hàng hay tải ảnh lên; việc đăng ký, đăng nhập và cấp quyền tạm thời có thể giao cho một dịch vụ managed thay vì tự xây dựng.
User pool là thư mục người dùng: cung cấp chức năng đăng ký, đăng nhập và trả về token (JWT). Identity pool đổi danh tính đã xác thực thành temporary AWS credentials để gọi trực tiếp các dịch vụ AWS như S3. MFTECH có cả hai yêu cầu này. Chọn tình huống và so sánh hai phương án:
- User pool: xác thực người dùng, trả về token, tích hợp được với ALB.
- Identity pool: đổi token lấy temporary AWS credentials (quyền theo IAM role) để gọi S3, DynamoDB…
Authenticating customers: Cognito user pools and identity pools
An application must know who the customer is before showing orders or accepting uploads; sign-up, sign-in and temporary access can be handed to a managed service instead of being built from scratch.
A user pool is a user directory: it provides sign-up and sign-in and returns tokens (JWTs). An identity pool exchanges an authenticated identity for temporary AWS credentials to call AWS services such as S3 directly. MFTECH has both requirements. Pick a scenario and compare the two options:
- User pool: authenticates users, returns tokens, integrates with ALB.
- Identity pool: exchanges a token for temporary AWS credentials (permissions from an IAM role) to call S3, DynamoDB…