+ All Categories
Home > Documents > Identity on AWS.pdf

Identity on AWS.pdf

Date post: 07-Jan-2017
Category:
Upload: trannhan
View: 232 times
Download: 0 times
Share this document with a friend
28
Transcript
Page 1: Identity on AWS.pdf
Page 2: Identity on AWS.pdf

IDENTITY MANAGEMENT IN AWS_

JON TOPPER | @jtopper | he/him/his

Page 3: Identity on AWS.pdf

IDENTITY_

LATIN LATE LATIN

idem same

identitas identity quality of being

identical

Page 4: Identity on AWS.pdf

IDENTITY ENABLES_

Access Control

Trust Delegation

Audit Trail

Security

Compliance

Page 5: Identity on AWS.pdf

IAM CONCEPTS_

Root User

Users

Groups

Roles

Policies

Tokens

Page 6: Identity on AWS.pdf

Alice

PowerUsers

Bob

Carla

ci-server-role

AmazonEC2ReadOnlyAccess

AmazonS3FullAccess

AdministratorAccess

PowerUserAccess

ci

Page 7: Identity on AWS.pdf

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "NotAction": "iam:*", "Resource": "*" } ] }

PowerUserAccess

Page 8: Identity on AWS.pdf

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iam:*LoginProfile", "iam:*AccessKey*", "iam:*SSHPublicKey*" ], "Resource": "arn:aws:iam::00001:user/${aws:username}" }, { "Effect": "Allow", "Action": [ "iam:ListAccount*", "iam:GetAccountSummary", "iam:GetAccountPasswordPolicy", "iam:ListUsers" ], "Resource": "*" } ] }

ManageOwnCredentials

Page 9: Identity on AWS.pdf

Alice

PowerUsers

Bob

Carla

ci-server-role

AmazonEC2ReadOnlyAccess

AmazonS3FullAccess

AdministratorAccess

PowerUserAccess

ci

ManageOwnCredentials

Page 10: Identity on AWS.pdf

Alice

PowerUsers

Bob

Carla

ci-server-role

AmazonEC2ReadOnlyAccess

AmazonS3FullAccess

AdministratorAccess

PowerUserAccess

ci

ManageOwnCredentials

Page 11: Identity on AWS.pdf

EC2 ROLES_

$ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ci-server-role

{ "Code" : "Success", "LastUpdated" : "2012-04-26T16:39:16Z", "Type" : "AWS-HMAC", "AccessKeyId" : "AKIAIOSFODNN7EXAMPLE", "SecretAccessKey" : "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "Token" : "token", "Expiration" : "2012-04-27T22:39:16Z" }

Page 12: Identity on AWS.pdf

Alice

PowerUsers

Bob

Carla

ci-server-role

AmazonEC2ReadOnlyAccess

AmazonS3FullAccess

AdministratorAccess

PowerUserAccess

ci

ManageOwnCredentials

Page 13: Identity on AWS.pdf

MULTI FACTOR AUTHENTICATION_

Page 14: Identity on AWS.pdf

IAM BEST PRACTICE_

User Per Individual

No Root User

Multi-Factor Auth Token

Least Privilege

CloudTrail

Page 15: Identity on AWS.pdf

CROSS-ACCOUNT ROLE ASSUMPTION_

Page 16: Identity on AWS.pdf

AssumeCustomerRole

Bob

CarlaScaleFactoryUser

PowerUserAccess

CUSTOMER MGMT ACCOUNT (00005)SCALE FACTORY SSO ACCOUNT (00001)

AssumeRoleCustomerMgmt Trust Relationship Policy

Page 17: Identity on AWS.pdf

CUSTOMER MGMT ACCOUNT (00005)SCALE FACTORY SSO ACCOUNT (00001)

AssumeRoleCustomerMgmt Trust Relationship Policy

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::00001:root" }, "Action": "sts:AssumeRole", "Condition": { "Bool": { "aws:MultiFactorAuthPresent": "true" } } } ] }

{ "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": ”arn:aws:iam::00005:role/ScaleFactoryUser" } }

Page 18: Identity on AWS.pdf
Page 19: Identity on AWS.pdf

EXTERNAL SOURCE OF IDENTITY_

Page 20: Identity on AWS.pdf
Page 21: Identity on AWS.pdf
Page 22: Identity on AWS.pdf

ScaleFactorySSOUser

PowerUserAccess

Trust Relationship Policy

Identity Providers

https://blog.faisalmisle.com/2015/11/using-google-apps-saml-sso-to-do-one-click-login-to-aws/

Page 23: Identity on AWS.pdf

AWS COGNITO_

Page 24: Identity on AWS.pdf
Page 25: Identity on AWS.pdf

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:BatchGetItem", "dynamodb:Query", "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem", "dynamodb:BatchWriteItem" ], "Resource": [ "arn:aws:dynamodb:us-west-2:123456789012:table/MyTable" ], "Condition": { "ForAllValues:StringEquals": { "dynamodb:LeadingKeys": ["${cognito-identity.amazonaws.com:sub}"] } } } ] }

Page 26: Identity on AWS.pdf

YOUR IAM MIGHT NEED WORK IF YOU_

Log in with the root account

Have >1 identity for each person

Don’t use MFA

Hard-code tokens in app config

Page 27: Identity on AWS.pdf

YOU MAY BENEFIT FROM_

Role Assumption

Cross-Account Access

Federated Identity

Cognito

Page 28: Identity on AWS.pdf

KEEP IN TOUCH_

http://www.scalefactory.com/

https://github.com/scalefactory

@jtopper / @scalefactory

[email protected]


Recommended