Session7 AWS Security
Session7 AWS Security
Agenda
IAM
●
Introduction of IAM
●
IAM Identities
●
IAM Use Cases
●
IAM Users, Groups, Roles, STS and APIs
●
IAM Workflow of Federated User
●
IAM Policies
●
IAM Best Practice
●
Account security
●
Credentials Types
●
MFA
●
Limits of IAM
●
Identity – Who can use your AWS resources (Authentication)
●
Access – What resources the user can use and in what ways
(Authorization)
IAM Components
●
Users (Root user and IAM user) and groups
●
Roles
●
Permissions and Policies
●
Tokens (STS)
●
Access keys (user API keys)
●
Tags
IAM - Identities
IAM Use Cases
●
Federated Users – Non AWS IAM users
●
Federated users are external identities
●
Have temporary security credentials to access AWS resources
●
Eg: Microsoft AD, Facebook, Google, etc
●
Groups - Collection of IAM users
●
Can manage permissions with groups
IAM - Roles, STS and API Keys
●
Roles – Type of identity used in Resource level (eg. EC2)
●
Can assign policies similar to like IAM users.
●
No associated credentials – access key and Secret key
●
AWS Security Token Service (AWS STS) – Short-term temporary
credentials
●
We can configure temporary credentials from few minutes to
several hours
●
Access keys (user API keys) – Long-term credentials
●
Combination Access and Secret Keys
●
Used to access AWS services through API, CLI or SDK
IAM – Workflow of Federated users
IAM - Policy
●
IAM policies specify what
actions are allowed or denied
on what AWS resources
●
Set of Rules
●
User-based Policies – Policy which is assigned to IAM users, groups
and roles
●
Resource-based Policies – Policy which is assigned to resources
●
S3 bucket policies
IAM – AWS Managed Policies
● Standalone policy which is created and administered by AWS. It is a predefined policies, we
can assign to any IAM users, groups and roles
● Easy to assign policy to specific user rather than creating own policy
● Root user or IAM user can't modify the AWS managed policies
IAM – AWS Managed Policies
IAM – Customer Managed Policies
IAM - Policy anatomy
●
JSON-formatted documents
●
Statement (Permissions) specifies:
✔
Effect
✔
Principal
{
✔
Action "Version": "2012-10-17",
✔
Resource "Statement": {
"Effect": "Allow",
✔
Condition "Principal": {"AWS": "arn:aws:iam::777788889999:user/bob"},
"Action": [
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::example-bucket/*"
}
}
IAM Best Practices
● Lock Away Your AWS Account Root User Access Keys – Access and Secret Keys is a
credentials for AWS accout, it used when we access through program
● By using Access key user can control complete AWS account
● Do not share access key and secret key
● Make inactive access keys whenever you are not using
● Create Individual IAM users – Create IAM user and provide required policies then use
the IAM user for access AWS account
● Use AWS Mangaed policies
● Use groups to assign Permissions to IAM users
● Grant least Privileges
● Review IAM permissions
● Configure Strong password policy to IAM user – Rotating password periodically, length
and characters
● Use MFA for privileged users
● Use IAM roles for AWS Resources
● Rotate Credentials Regularly
● Monitor Activity of your AWS Account - CloudTrail
Account security
Protect the API / access keys
AWS root account or IAM A six-digit single-use code that is required in addition to
MFA user account login to the your password to log in to your AWS Account or IAM
AWS Management Console user account.
• Works with
• Aws Root Account
• IAM users
• No additional cost
• Except for hardware option
Limitations on IAM Entities and Objects
Description Limit
Groups in an AWS account 100