SlideShare uma empresa Scribd logo
1 de 46
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
Foundations: Identity & Access
Management in AWS
Fritz Kunstler
Senior Consultant
AWS Professional Services
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Agenda
• Overview of AWS Identity & Access Management
• IAM Authentication & Authorization
• AWS Identity Federation
• AWS Organizations & Service Control Policies
• Recap of Best Practices
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS Identity & Access Management
IAM
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is IAM?
• IAM is a preventive security control
• What is a security control?
– Any hardware, software, policy or
procedure meant to govern access
to IT resources
• A preventive security control is one
intended to thwart unwanted or
unauthorized activity
Directive
Preventive
Detective
Responsive
CAF Security
Perspective
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is AWS IAM?
• Create and manage AWS users, groups, and permissions to control
access to AWS resources
• Integrates with Microsoft Active Directory using SAML identity
federation and AWS Directory Service
• Roles can be created and assumed to control what operations can be
performed by an entity or AWS service (e.g. EC2 instance)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Why use AWS IAM?
• You can specify permissions to control which operations a user or role
can perform on AWS resources
• IAM service provides access to the AWS Management Console, AWS
API, and AWS Command-Line Interface (CLI)
Note: IAM does not provide authentication for your OS or application
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Planes of access
EC2
Control plane – AWS API
(example: ec2:StartInstances)
Data plane – VPC connection
(example: SSH, RDP)
Different:
• Paths
• Credentials
• Protocols
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Planes of access
DynamoDB
Control plane – AWS API
(example: dynamodb:CreateTable)
Data plane – AWS API
(example: dynamodb:GetItem)
Same:
• Path
• Credential
• Protocol
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM Users?
• IAM users can be an individual, system, or application requiring access
to AWS services
• A user account consists of a unique name and security credentials
such as a password, access key, and/or multi-factor authentication
(MFA)
• IAM users only need passwords when they access the AWS
Management Console
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM Groups?
• IAM Groups are a way to assign permissions to logical and functional
units of your organization
• IAM Groups are a tool to help with operational efficiency
– Bulk permissions management (scalable)
– Easy to change permissions as individuals change teams (portable)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM Roles?
• An IAM role is similar to a user, in that it is an AWS identity with
permission policies that determine what the identity can and cannot
do in AWS.
• You can authorize roles to be assumed by humans, Amazon EC2
instances, custom code, or other AWS services
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
IAM Authentication & Authorization
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM Access Keys?
• IAM access keys are used to make programmatic calls to AWS using
the AWS Command Line Interface (CLI), the AWS SDKs, or direct
HTTPS calls to the APIs for individual AWS services
• Consists of an Access Key ID and a Secret Access Key
• Example:
– Access Key ID: AKIA3R7HGUSSI4BOW
– Secret Access Key: MxQ4QSzT0NsnEO5VNCYjJo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is the signing process?
• AWS Signature Version 4 is the process to add authentication
information to AWS requests.
– The AWS SDKs or CLI tools will construct, sign, and send requests for you,
with the access keys you provide.
– If you are constructing AWS API requests yourself, you will have to
include code to sign the requests.
• http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM passwords?
• IAM passwords are credentials used by IAM users to authenticate to
the AWS Management Console.
• A password policy can be configured for the AWS account
• Alphanumeric and common special characters are allowed:
! @ # $ % ^ & * ( ) _ + - = [ ] { } | ‘
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
When should I use Access Keys vs. passwords?
• Depends on how your users will access AWS
– Console → Password
– API, CLI, SDK → Access keys
• In either case, make sure to rotate credentials regularly
– Use Credential Report to audit credential rotation
– Configure password policy
– Configure policy to allow access key rotation
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is an IAM principal?
• IAM principal refers to a user, account, service, role, or other entity
• In terms of evaluating authorization, a principal is defined as the
entity that is allowed or denied access to a resource.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM policies?
• IAM policies are JSON-based statements that define access control
and permissions
• IAM polices can be “inline” or “managed”
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Example IAM policy
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::example_bucket"
}
}
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM Policies?
• Inline policies are policies that you create and manage, and that are
embedded directly into a single user, group, or role.
• Managed policies are standalone policies that you can manage
separately from the IAM users, groups, or roles to which they are
attached
– AWS managed policies
– Customer managed polices
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Choosing Inline vs Managed Policies
• Use inline policies when you need to:
– Enforce a strict one-to-one relationship between policy and principal
– Avoid the wrong policy being attached to a principal
– Ensure the policy is deleted when deleting the principal
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Choosing Inline vs Managed Policies
• Use managed policies when you need:
– Reusability
– Central change management
– Versioning and rollback
– Delegation of permissions management
– Automatic updates for AWS managed policies
– Larger policy size
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are Resource-based policies?
• To specify resource-based permissions, you attach an inline policy to a
supported resource, such as an Amazon SNS topic, an Amazon S3
bucket, an AWS KMS key, or an Amazon Glacier vault.
• Resource-based policies must specify who is allowed to access the
resource, known as the Principal.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Policy structure
Identity-based policy Resource-based policy
{
"Statement":[{
"Effect":"effect",
"Principal":"principal",
"Action":"action",
"Resource":"arn",
"Condition":{
"condition":{
"key":"value" }
}
}
]
}
{
"Statement":[{
"Effect":"effect",
"Action":"action",
"Resource":"arn",
"Condition":{
"condition":{
"key":"value" }
}
}
]
}
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is the key difference?
• With Identity-based Policies, the Principal is implicit.
• With Resource-based Policies, the Principal is explicit.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
IAM Evaluation Logic
• By default, the decision is default deny
• An allow overrides any default denies
• An explicit deny overrides any allows
• The order in which the policies are evaluated is not important
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
IAM Policy Evaluation Logic
Final decision =“deny”
(explicit deny)
Yes
Final decision =“allow”
Yes
No Is there an
Allow?
4
Decision
starts at Deny
1
Evaluate all
applicable
policies
2
Is there an
explicit
deny?
3
No Final decision =“deny”
(default deny)
5
• AWS retrieves all policies
associated with the user
and resource.
• Only policies that match the
action and conditions are
evaluated.
If a policy statement
has a deny, it trumps all
other policy statements.
Access is granted if
there is an explicit
allow and no deny.
By default, an
implicit (default)
deny is returned.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Prevent Privilege Escalation
• Any principal with full IAM permissions is effectively a super user,
even if no other permissions have been granted.
• Why? The principal can modify its own permissions at any time.
• To prevent this, deny access to at least these IAM actions:
– iam:AttachUserPolicy
– iam:AttachGroupPolicy
– iam:AttachRolePolicy
– iam:PutUserPolicy
– iam:PutGroupPolicy
– iam:PutRolePolicy
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is the IAM Policy Generator?
The AWS IAM Console
has a simple GUI that
helps you build your IAM
policies.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS Identity Federation
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Common Scenarios for IAM
• Most organizations will integrate with IAM using their own corporate
directory (federated users via IAM roles)
• IAM roles are also commonly used to provide granular AWS service
permissions for applications running on EC2 or Lambda
• IAM users are commonly used to provide access to AWS resources in
“break-glass” scenarios
• IAM managed policies should be favored over inline policies as they
can be updated in one place and apply to several entities
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
IAM Users vs. Federated Users
• IAM supports users managed in AWS’s identity management system
• Users managed outside of AWS in your corporate directory are
referred to as “federated users”
– Examples of corporate directories, include Microsoft Active Directory,
PingFederate, Okta Univeral Directory, etc.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What are IAM Identity Providers?
• IAM identity providers allow you to use identities managed outside of
AWS instead of creating IAM users in your AWS account
• You don’t have to create custom sign-in code or manage your own
identities
• This is helpful if your organization already has its own identity
system, such as a corporate user directory like Microsoft Active
Directory
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is SAML 2.0-based Federation?
• SAML 2.0 is an open standard that many Identity Providers (IdPs) use
• This feature enables federated Single Sign-On (SSO), so users can log
into the AWS Management Console or call the AWS APIs without you
having to create an IAM user for everyone in your organization
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is AWS Security Token Service (STS)?
• The AWS Security Token Service (STS) is a web service that enables
you to request temporary, limited-privilege credentials for AWS
Identity and Access Management (IAM) users or for users that you
authenticate (federated users)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Ideas on Identity & Federation
• Do IAM users require a password or access key to call an AWS API?
– Access key, as passwords are only used to log into the AWS Management
Console
• Should code running on an EC2 instance use an access key or IAM role
to access DynamoDB?
– IAM role, as access keys can be challenging to manage
• Which IAM permission is more powerful, “iam:CreatePolicy” or
“iam:AttachRolePolicy”?
– iam:AttachRolePolicy, since you can escalate permissions by attaching any
policy to a role
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS Organizations &
Service Control Policies
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is AWS Organizations?
• Policy-based management of multiple AWS accounts
• Create accounts and invite existing accounts to join your organization
and organize them into groups called organizational units (OUs)
• Attach policy-based controls called Service Control Policies (SCPs) to
centrally control AWS service use across multiple AWS accounts
• Simplify billing for multiple accounts by enabling a single payment
method through consolidated billing
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
AWS Organizations Policies
• A policy is a “document” with one or more statements that define the
controls that you want to apply to a group of AWS accounts.
• Currently, AWS Organizations provides a Service Control Policy (SCP).
– An SCP defines the AWS service actions, such as Amazon EC2
RunInstances, that are available for use in different accounts within an
organization.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
What is a Service Control Policy (SCP)?
• Service Control Policies (SCPs) allow you to control which AWS service
actions are accessible to principals (account root, IAM users, and IAM
roles)
• Authorization on a principal in an account that has an SCP attached is
the intersection of what is allowed explicitly in the SCP and what is
allowed explicitly in the IAM permissions attached to the principal.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Service Control Policy (SCP) Example
• If a SCP applied to an account states that the only ALLOWs Amazon
EC2 actions
• And if a IAM policy on a principal in the same AWS account ALLOWs
both EC2 actions and Amazon S3 actions
• Then the principal is able to access only the EC2 actions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
A1 A2 A4
M
Master Account / Administrative root
Organizational Unit (OU)
AWS Account
Organization
Control
Policy (OCP)
AWS Resources
A3
Dev Test Prod
AWS Organizations
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
A3A1 A2 A4
A
Dev Test Prod
AWS Organizations Service Control Policies
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
IAM Best Practices
• Lock away your AWS account (root) access keys
• Use federated access if you have your own identity provider
• Create individual IAM users (don’t share)
• Use groups to assign permissions to IAM users
• Grant least privilege
• Configure a strong password policy for your users
• Enable MFA for privileged users
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
IAM Best Practices
• Use roles for applications that run on Amazon EC2 instances
• Delegate by using roles instead of by sharing credentials
• Rotate credentials regularly
• Remove unnecessary credentials
• Use policy conditions for extra security
• Monitor activity in your AWS account
• http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Pop-up Loft
aws.amazon.com/activate
Everything and Anything Startups
Need to Get Started on AWS

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Deep Dive - AWS Security by Design
Deep Dive - AWS Security by DesignDeep Dive - AWS Security by Design
Deep Dive - AWS Security by Design
 
Getting Started with AWS Security
Getting Started with AWS SecurityGetting Started with AWS Security
Getting Started with AWS Security
 
Identity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS SecurityIdentity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS Security
 
Managing Security on AWS
Managing Security on AWSManaging Security on AWS
Managing Security on AWS
 
How to Become an IAM Policy Ninja
How to Become an IAM Policy NinjaHow to Become an IAM Policy Ninja
How to Become an IAM Policy Ninja
 
Deep dive into AWS IAM
Deep dive into AWS IAMDeep dive into AWS IAM
Deep dive into AWS IAM
 
Incident Response - Eyes Everywhere
Incident Response - Eyes EverywhereIncident Response - Eyes Everywhere
Incident Response - Eyes Everywhere
 
AWS reInforce 2021: TDR202 - Lessons learned from the front lines of Incident...
AWS reInforce 2021: TDR202 - Lessons learned from the front lines of Incident...AWS reInforce 2021: TDR202 - Lessons learned from the front lines of Incident...
AWS reInforce 2021: TDR202 - Lessons learned from the front lines of Incident...
 
How to Implement a Well-Architected Security Solution.pdf
How to Implement a Well-Architected Security Solution.pdfHow to Implement a Well-Architected Security Solution.pdf
How to Implement a Well-Architected Security Solution.pdf
 
Security@Scale
Security@ScaleSecurity@Scale
Security@Scale
 
AWS_Security_Essentials
AWS_Security_EssentialsAWS_Security_Essentials
AWS_Security_Essentials
 
Monitoring and administrating privilegeMonitoring and administrating privileg...
Monitoring and administrating privilegeMonitoring and administrating privileg...Monitoring and administrating privilegeMonitoring and administrating privileg...
Monitoring and administrating privilegeMonitoring and administrating privileg...
 
Proteggere applicazioni e dati nel cloud AWS
Proteggere applicazioni e dati nel cloud AWSProteggere applicazioni e dati nel cloud AWS
Proteggere applicazioni e dati nel cloud AWS
 
Aws security best practices
Aws security best practicesAws security best practices
Aws security best practices
 
ThreatResponse
ThreatResponseThreatResponse
ThreatResponse
 
Architecting for Enterprise Identity Across Multiple Operating Models (ENT413...
Architecting for Enterprise Identity Across Multiple Operating Models (ENT413...Architecting for Enterprise Identity Across Multiple Operating Models (ENT413...
Architecting for Enterprise Identity Across Multiple Operating Models (ENT413...
 
An Active Case Study on Insider Threat Detection in your Applications
An Active Case Study on Insider Threat Detection in your ApplicationsAn Active Case Study on Insider Threat Detection in your Applications
An Active Case Study on Insider Threat Detection in your Applications
 
AWS Cloud Security & Compliance Basics Webinar
AWS Cloud Security & Compliance Basics WebinarAWS Cloud Security & Compliance Basics Webinar
AWS Cloud Security & Compliance Basics Webinar
 
Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019
Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019 Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019
Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019
 
Best Practices for Encrypting Data on AWS
Best Practices for Encrypting Data on AWSBest Practices for Encrypting Data on AWS
Best Practices for Encrypting Data on AWS
 

Semelhante a Foundations - Understanding the Critical Building Blocks of AWS Identity & Governance

Securing Customer Data from Day 1 - AWS Startup Day Boston 2018.pdf
Securing Customer Data from Day 1 - AWS Startup Day Boston 2018.pdfSecuring Customer Data from Day 1 - AWS Startup Day Boston 2018.pdf
Securing Customer Data from Day 1 - AWS Startup Day Boston 2018.pdf
Amazon Web Services
 

Semelhante a Foundations - Understanding the Critical Building Blocks of AWS Identity & Governance (20)

Understanding the Critical Building Blocks of AWS Identity and Governance
Understanding the Critical Building Blocks of AWS Identity and GovernanceUnderstanding the Critical Building Blocks of AWS Identity and Governance
Understanding the Critical Building Blocks of AWS Identity and Governance
 
Foundations: Understanding the Critical Building Blocks of AWS Identity and G...
Foundations: Understanding the Critical Building Blocks of AWS Identity and G...Foundations: Understanding the Critical Building Blocks of AWS Identity and G...
Foundations: Understanding the Critical Building Blocks of AWS Identity and G...
 
Identity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS SecurityIdentity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS Security
 
IAM for Enterprises: How Vanguard Matured IAM Controls to Support Micro Accou...
IAM for Enterprises: How Vanguard Matured IAM Controls to Support Micro Accou...IAM for Enterprises: How Vanguard Matured IAM Controls to Support Micro Accou...
IAM for Enterprises: How Vanguard Matured IAM Controls to Support Micro Accou...
 
Identity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS SecurityIdentity and Access Management: The First Step in AWS Security
Identity and Access Management: The First Step in AWS Security
 
Deep dive - AWS security by design
Deep dive - AWS security by designDeep dive - AWS security by design
Deep dive - AWS security by design
 
Mastering Identity at Every Layer of the Cake (SEC401-R1) - AWS re:Invent 2018
Mastering Identity at Every Layer of the Cake (SEC401-R1) - AWS re:Invent 2018Mastering Identity at Every Layer of the Cake (SEC401-R1) - AWS re:Invent 2018
Mastering Identity at Every Layer of the Cake (SEC401-R1) - AWS re:Invent 2018
 
External Security Services Round: Security Week at the San Francisco Loft
External Security Services Round: Security Week at the San Francisco LoftExternal Security Services Round: Security Week at the San Francisco Loft
External Security Services Round: Security Week at the San Francisco Loft
 
Identity Round Robin Workshop - Serverless Round: Security Week at the SF Loft
Identity Round Robin Workshop - Serverless Round: Security Week at the SF LoftIdentity Round Robin Workshop - Serverless Round: Security Week at the SF Loft
Identity Round Robin Workshop - Serverless Round: Security Week at the SF Loft
 
The Evolution of Identity and Access Management on AWS - AWS Online Tech Talks
The Evolution of Identity and Access Management on AWS - AWS Online Tech TalksThe Evolution of Identity and Access Management on AWS - AWS Online Tech Talks
The Evolution of Identity and Access Management on AWS - AWS Online Tech Talks
 
AWSome Day Online Conference 2018 - Module 3
AWSome Day Online Conference 2018 - Module 3AWSome Day Online Conference 2018 - Module 3
AWSome Day Online Conference 2018 - Module 3
 
Introduction to AWS Secrets Manager
Introduction to AWS Secrets ManagerIntroduction to AWS Secrets Manager
Introduction to AWS Secrets Manager
 
Become an IAM Policy Master in 60 Minutes or Less (SEC316-R1) - AWS reInvent ...
Become an IAM Policy Master in 60 Minutes or Less (SEC316-R1) - AWS reInvent ...Become an IAM Policy Master in 60 Minutes or Less (SEC316-R1) - AWS reInvent ...
Become an IAM Policy Master in 60 Minutes or Less (SEC316-R1) - AWS reInvent ...
 
Compliance and Security Mitigation Techniques
Compliance and Security Mitigation TechniquesCompliance and Security Mitigation Techniques
Compliance and Security Mitigation Techniques
 
Module 3: Security, Identity and Access Management - AWSome Day Online Confer...
Module 3: Security, Identity and Access Management - AWSome Day Online Confer...Module 3: Security, Identity and Access Management - AWSome Day Online Confer...
Module 3: Security, Identity and Access Management - AWSome Day Online Confer...
 
Module 3: Security, Identity and Access Management - AWSome Day Online Confer...
Module 3: Security, Identity and Access Management - AWSome Day Online Confer...Module 3: Security, Identity and Access Management - AWSome Day Online Confer...
Module 3: Security, Identity and Access Management - AWSome Day Online Confer...
 
Mitigating techniques
Mitigating techniquesMitigating techniques
Mitigating techniques
 
AWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOne
AWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOneAWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOne
AWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOne
 
Securing Customer Data from Day 1 - AWS Startup Day Boston 2018.pdf
Securing Customer Data from Day 1 - AWS Startup Day Boston 2018.pdfSecuring Customer Data from Day 1 - AWS Startup Day Boston 2018.pdf
Securing Customer Data from Day 1 - AWS Startup Day Boston 2018.pdf
 
AWS STARTUP DAY 2018 I Securing Your Customer Data From Day One
AWS STARTUP DAY 2018 I Securing Your Customer Data From Day OneAWS STARTUP DAY 2018 I Securing Your Customer Data From Day One
AWS STARTUP DAY 2018 I Securing Your Customer Data From Day One
 

Mais de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mais de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Foundations - Understanding the Critical Building Blocks of AWS Identity & Governance

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft Foundations: Identity & Access Management in AWS Fritz Kunstler Senior Consultant AWS Professional Services
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Agenda • Overview of AWS Identity & Access Management • IAM Authentication & Authorization • AWS Identity Federation • AWS Organizations & Service Control Policies • Recap of Best Practices
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Identity & Access Management IAM
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is IAM? • IAM is a preventive security control • What is a security control? – Any hardware, software, policy or procedure meant to govern access to IT resources • A preventive security control is one intended to thwart unwanted or unauthorized activity Directive Preventive Detective Responsive CAF Security Perspective
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is AWS IAM? • Create and manage AWS users, groups, and permissions to control access to AWS resources • Integrates with Microsoft Active Directory using SAML identity federation and AWS Directory Service • Roles can be created and assumed to control what operations can be performed by an entity or AWS service (e.g. EC2 instance)
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Why use AWS IAM? • You can specify permissions to control which operations a user or role can perform on AWS resources • IAM service provides access to the AWS Management Console, AWS API, and AWS Command-Line Interface (CLI) Note: IAM does not provide authentication for your OS or application
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Planes of access EC2 Control plane – AWS API (example: ec2:StartInstances) Data plane – VPC connection (example: SSH, RDP) Different: • Paths • Credentials • Protocols
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Planes of access DynamoDB Control plane – AWS API (example: dynamodb:CreateTable) Data plane – AWS API (example: dynamodb:GetItem) Same: • Path • Credential • Protocol
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM Users? • IAM users can be an individual, system, or application requiring access to AWS services • A user account consists of a unique name and security credentials such as a password, access key, and/or multi-factor authentication (MFA) • IAM users only need passwords when they access the AWS Management Console
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM Groups? • IAM Groups are a way to assign permissions to logical and functional units of your organization • IAM Groups are a tool to help with operational efficiency – Bulk permissions management (scalable) – Easy to change permissions as individuals change teams (portable)
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM Roles? • An IAM role is similar to a user, in that it is an AWS identity with permission policies that determine what the identity can and cannot do in AWS. • You can authorize roles to be assumed by humans, Amazon EC2 instances, custom code, or other AWS services
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved IAM Authentication & Authorization
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM Access Keys? • IAM access keys are used to make programmatic calls to AWS using the AWS Command Line Interface (CLI), the AWS SDKs, or direct HTTPS calls to the APIs for individual AWS services • Consists of an Access Key ID and a Secret Access Key • Example: – Access Key ID: AKIA3R7HGUSSI4BOW – Secret Access Key: MxQ4QSzT0NsnEO5VNCYjJo
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is the signing process? • AWS Signature Version 4 is the process to add authentication information to AWS requests. – The AWS SDKs or CLI tools will construct, sign, and send requests for you, with the access keys you provide. – If you are constructing AWS API requests yourself, you will have to include code to sign the requests. • http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM passwords? • IAM passwords are credentials used by IAM users to authenticate to the AWS Management Console. • A password policy can be configured for the AWS account • Alphanumeric and common special characters are allowed: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ‘
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved When should I use Access Keys vs. passwords? • Depends on how your users will access AWS – Console → Password – API, CLI, SDK → Access keys • In either case, make sure to rotate credentials regularly – Use Credential Report to audit credential rotation – Configure password policy – Configure policy to allow access key rotation
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is an IAM principal? • IAM principal refers to a user, account, service, role, or other entity • In terms of evaluating authorization, a principal is defined as the entity that is allowed or denied access to a resource.
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM policies? • IAM policies are JSON-based statements that define access control and permissions • IAM polices can be “inline” or “managed”
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Example IAM policy { "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::example_bucket" } }
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM Policies? • Inline policies are policies that you create and manage, and that are embedded directly into a single user, group, or role. • Managed policies are standalone policies that you can manage separately from the IAM users, groups, or roles to which they are attached – AWS managed policies – Customer managed polices
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Choosing Inline vs Managed Policies • Use inline policies when you need to: – Enforce a strict one-to-one relationship between policy and principal – Avoid the wrong policy being attached to a principal – Ensure the policy is deleted when deleting the principal
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Choosing Inline vs Managed Policies • Use managed policies when you need: – Reusability – Central change management – Versioning and rollback – Delegation of permissions management – Automatic updates for AWS managed policies – Larger policy size
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are Resource-based policies? • To specify resource-based permissions, you attach an inline policy to a supported resource, such as an Amazon SNS topic, an Amazon S3 bucket, an AWS KMS key, or an Amazon Glacier vault. • Resource-based policies must specify who is allowed to access the resource, known as the Principal.
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Policy structure Identity-based policy Resource-based policy { "Statement":[{ "Effect":"effect", "Principal":"principal", "Action":"action", "Resource":"arn", "Condition":{ "condition":{ "key":"value" } } } ] } { "Statement":[{ "Effect":"effect", "Action":"action", "Resource":"arn", "Condition":{ "condition":{ "key":"value" } } } ] }
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is the key difference? • With Identity-based Policies, the Principal is implicit. • With Resource-based Policies, the Principal is explicit.
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved IAM Evaluation Logic • By default, the decision is default deny • An allow overrides any default denies • An explicit deny overrides any allows • The order in which the policies are evaluated is not important
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved IAM Policy Evaluation Logic Final decision =“deny” (explicit deny) Yes Final decision =“allow” Yes No Is there an Allow? 4 Decision starts at Deny 1 Evaluate all applicable policies 2 Is there an explicit deny? 3 No Final decision =“deny” (default deny) 5 • AWS retrieves all policies associated with the user and resource. • Only policies that match the action and conditions are evaluated. If a policy statement has a deny, it trumps all other policy statements. Access is granted if there is an explicit allow and no deny. By default, an implicit (default) deny is returned.
  • 28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Prevent Privilege Escalation • Any principal with full IAM permissions is effectively a super user, even if no other permissions have been granted. • Why? The principal can modify its own permissions at any time. • To prevent this, deny access to at least these IAM actions: – iam:AttachUserPolicy – iam:AttachGroupPolicy – iam:AttachRolePolicy – iam:PutUserPolicy – iam:PutGroupPolicy – iam:PutRolePolicy
  • 29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is the IAM Policy Generator? The AWS IAM Console has a simple GUI that helps you build your IAM policies.
  • 30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Identity Federation
  • 31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Common Scenarios for IAM • Most organizations will integrate with IAM using their own corporate directory (federated users via IAM roles) • IAM roles are also commonly used to provide granular AWS service permissions for applications running on EC2 or Lambda • IAM users are commonly used to provide access to AWS resources in “break-glass” scenarios • IAM managed policies should be favored over inline policies as they can be updated in one place and apply to several entities
  • 32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved IAM Users vs. Federated Users • IAM supports users managed in AWS’s identity management system • Users managed outside of AWS in your corporate directory are referred to as “federated users” – Examples of corporate directories, include Microsoft Active Directory, PingFederate, Okta Univeral Directory, etc.
  • 33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What are IAM Identity Providers? • IAM identity providers allow you to use identities managed outside of AWS instead of creating IAM users in your AWS account • You don’t have to create custom sign-in code or manage your own identities • This is helpful if your organization already has its own identity system, such as a corporate user directory like Microsoft Active Directory
  • 34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is SAML 2.0-based Federation? • SAML 2.0 is an open standard that many Identity Providers (IdPs) use • This feature enables federated Single Sign-On (SSO), so users can log into the AWS Management Console or call the AWS APIs without you having to create an IAM user for everyone in your organization
  • 35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is AWS Security Token Service (STS)? • The AWS Security Token Service (STS) is a web service that enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users that you authenticate (federated users)
  • 36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Ideas on Identity & Federation • Do IAM users require a password or access key to call an AWS API? – Access key, as passwords are only used to log into the AWS Management Console • Should code running on an EC2 instance use an access key or IAM role to access DynamoDB? – IAM role, as access keys can be challenging to manage • Which IAM permission is more powerful, “iam:CreatePolicy” or “iam:AttachRolePolicy”? – iam:AttachRolePolicy, since you can escalate permissions by attaching any policy to a role
  • 37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Organizations & Service Control Policies
  • 38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is AWS Organizations? • Policy-based management of multiple AWS accounts • Create accounts and invite existing accounts to join your organization and organize them into groups called organizational units (OUs) • Attach policy-based controls called Service Control Policies (SCPs) to centrally control AWS service use across multiple AWS accounts • Simplify billing for multiple accounts by enabling a single payment method through consolidated billing
  • 39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved AWS Organizations Policies • A policy is a “document” with one or more statements that define the controls that you want to apply to a group of AWS accounts. • Currently, AWS Organizations provides a Service Control Policy (SCP). – An SCP defines the AWS service actions, such as Amazon EC2 RunInstances, that are available for use in different accounts within an organization.
  • 40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved What is a Service Control Policy (SCP)? • Service Control Policies (SCPs) allow you to control which AWS service actions are accessible to principals (account root, IAM users, and IAM roles) • Authorization on a principal in an account that has an SCP attached is the intersection of what is allowed explicitly in the SCP and what is allowed explicitly in the IAM permissions attached to the principal.
  • 41. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Service Control Policy (SCP) Example • If a SCP applied to an account states that the only ALLOWs Amazon EC2 actions • And if a IAM policy on a principal in the same AWS account ALLOWs both EC2 actions and Amazon S3 actions • Then the principal is able to access only the EC2 actions
  • 42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved A1 A2 A4 M Master Account / Administrative root Organizational Unit (OU) AWS Account Organization Control Policy (OCP) AWS Resources A3 Dev Test Prod AWS Organizations
  • 43. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved A3A1 A2 A4 A Dev Test Prod AWS Organizations Service Control Policies
  • 44. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved IAM Best Practices • Lock away your AWS account (root) access keys • Use federated access if you have your own identity provider • Create individual IAM users (don’t share) • Use groups to assign permissions to IAM users • Grant least privilege • Configure a strong password policy for your users • Enable MFA for privileged users
  • 45. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved IAM Best Practices • Use roles for applications that run on Amazon EC2 instances • Delegate by using roles instead of by sharing credentials • Rotate credentials regularly • Remove unnecessary credentials • Use policy conditions for extra security • Monitor activity in your AWS account • http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
  • 46. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Pop-up Loft aws.amazon.com/activate Everything and Anything Startups Need to Get Started on AWS