IAM: identity and access management Flashcards
IAM
ID and access management - a global service
root account
created by default - don’t share
users
people within an org. can be grouped.
groups
only contain users; users can belong to multiple groups
IAM permissions
- users / groups can be assigned JSON docs called Policies
- policies define permissions of users
- least privilege principle: don’t give more permissions than users need
IAM Policies Structure
- JSON
- version: policy language version / always include “2022-12-16”
- id: an identifier for the policy
- statement: one or more individual statements (required) + has:
- sid (statement id)
- effect (whether statement allows/denies access)
- principal (account/user/role to which this policy applied to)
- action (list of actions this policy allows/denies)
- resource (list of resources which actions apply to)
- condition (for when policy is in effect - optional)
AWS Access 3 Options
AWS Management Console (generate Access Keys), AWS Command Line Interface (CLI), AWS Software Developer Kit (SDK)
Access Keys
generated through AWS Management Console
- key ID: username
- secret access key: pw
AWS CLI
- direct access to public API of AWS Services
- can develop scripts to manage resources
- open-source, alternate to Management Console (same permissions)
AWS SDK
- language specific APIs (set of libraries)
- enables you to access + manage AWS services programmatically
- supports Js, Python, PHP, .NET, Ruby, Java, Go, Node.js, C++
IAM Roles
common roles: EC2 Instance Roles, Lambda Function Roles, roles for CloudFormation
trusted entity type: AWS Services
IAM Credentials Report (Account Level)
report that lists all your account’s users and status of credentials
IAM Access Advisor (User Level)
shows service permissions granted to a user and when services were last accessed
can use this to revise your policies to the least privilege principle (i.e, if a user isn’t using a service, remove service access)
Shared Responsibility Model
AWS: infrastructure (global network security), configuration + vulnerability analysis, compliance validation
Customer: users/groups/roles policy management, MFA across all accounts, rotate keys often, IAM permissions and access patterns