Amazon IAM
|
October 15, 2017
|
Development,
AWS
AWS Identity and Access Management (IAM)
IAM manages permission for AWS resources and not the applications deployed to them. IAM Controlled through- Console
- CLI
- SDK
An IAM entity that is allowed to interact with AWS resources
- permanent or temporary
- human or application
Types
ROOT userThe first AWS account
IAM userPersistent identities setup in the IAM service to represent people
ROLES/Temporary Security Tokensused to grant specific privileges to specific actors for a set duration of time
Use Cases:
- EC2 Roles
- Cross Account Access
- Federation (trusted authentication system)
- Grant the role to the resource
- assign the role to the actor that is accessing the resource
- Actor (Application) gets token to send to the API without worry about authentication
- granting IAM users access to AWS resources in another AWS account
- Identity, repository outside AWS
- Two types
- OpenID (Facebook, Google, etc)
- Security Assertion Markup Language 2.0 (SAML) (AD, LDAP, etc)
- authenticate a principal
- username//password
- access key
- access key / session token
- when under and assumed role
- after authentication, IAM must manage access of the principal
- Policies
- JSON doc fully defines set of permissions to access and manipulate AWS resources
- Effect (Allow, Deny)
- Service
- Resource (ARN)
- Action (Get, Put, List, Delete, etc)
- Condition
- everything (*) or specific item such as IP
- defines restrictions that limit the action
associate directly with an IAM User
- user policy
- entered on the console on the IAM user page
- manged policy
- exist independently of users
- can be associated to many user and group
- Assign policies to groups
- Assign users to groups
- these two rules will simplify management of users
- group policy
- assigned to groups
Multi-Factor Authentication (MFA)
extra layer of security
Rotating Keys
rotate access keys
Resolving Multiple permissions
- initially denied request
- all policies evaluated
- explicit deny will deny request
- no explicit deny but explicit allow
- request is allowed
- no explicit allow or deny
- request is denied
- Exception: AssumeRole ( is a role and a policy )
- Policy cannot override any permission that is denied by default in the role
