This section describes how authentication, authorization, network security, and secret management are handled in the IMS system.

Hình IAM cho phần IAM Roles & Permissions trong module 6.6.

Hai hình SG‑ALB dùng cho phần Network Security (ALB security group) của module 6.6.

Hai hình SG‑ECS dùng cho phần Network Security (ECS security group) của module 6.6.

Hai hình SG‑RDS dùng cho phần Network Security (RDS security group) của module 6.6.

Hai hình Secrets Manager và KMS cho phần Secrets Management & KMS trong module 6.6.

Hình CloudWatch Alarm dùng chung cho phần Network Security/Monitoring của module 6.6 và liên kết với module 6.7 Observability & CI/CD.
These diagrams show how IAM, security groups, Secrets Manager and KMS are configured to implement least-privilege access and protect sensitive data.
ADMIN – system administration features.MANAGER – production planning and monitoring.LINE_LEADER – shop-floor task execution.authService and stores tokens client-side.You can extend the current auth design by integrating Amazon Cognito as the identity provider:
For password reset and account verification, the backend can expose endpoints like:
POST /auth/forgot-password – generate a short-lived OTP, send via SES to the user email.POST /auth/verify-otp – validate the OTP and allow password change.The OTP code and expiry timestamp should be stored server-side (for example in a database table or cache such as Redis) and never embedded directly in JWTs.
IAM is used to give each component just enough access to AWS resources.
ECS task execution role (for example ecsTaskExecutionRole-ims-prod):
AmazonECSTaskExecutionRolePolicy.ECS task role (for example ecsTaskRole-ims-backend-prod):
imagedefinitions.json, frontend bundles) to S3.For SMTP-based email sending, a dedicated IAM user is used only for SES:
ims-ses-smtp-user.ses:SendEmail / ses:SendRawEmail.Follow the principle of least privilege and avoid using overly broad *:* policies in production.
Use AWS Secrets Manager to store sensitive information such as:
Secrets are encrypted at rest using AWS KMS keys (AWS managed or a
customer-managed key such as alias/ims-secrets-key). The ECS task role
is allowed to call secretsmanager:GetSecretValue and kms:Decrypt so
that the backend can load secrets securely at startup.
In ECS Task Definitions, reference these secrets via:
Never hard-code secrets in:
By structuring authentication, OTP/email verification, IAM roles, network boundaries, and KMS-encrypted secrets properly, the IMS system can satisfy common security expectations for enterprise workloads.