AWS Security Identity and compliance Flashcards

1
Q

What does IAM stand for?

A

Identity and security access management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is IAM purpose?

A

To manage:

  • users
  • groups
  • access policies
  • roles
  • user credentials
  • user password policies
  • multi-factor authentication (MFA)
  • API key for programmatic access (CLI)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What kind of access do users have by default to AWS services at first?

A

By default, new users are created with NO access to any AWS services

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Who are IAM users?

A

IAM users are people who have been granted access to an AWS account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the components of an IAM user?

A

The components of an IAM user are:

  • username
  • password
  • permissions to access different resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is identity federation used for

A

Identity federation is used to allow secure access to resources in AWS account without creating an IAM user account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is MFA?

A

MFA (Multi Factor Authentication) uses an authentication device that continually generates random, six-digit, single-use authentication codes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is IAM specific to a given region?

A

IAM is universal (global) and does not apply to regions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What should the root account be used for?

A

It is a best practice to not use the root account for anything other than billing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a root account?

A

The “root account” is the account created when you setup the AWS account. It has complete Admin access and is the only account that has this access by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a principal?

A

A principal is an entity that can take an action on an AWS resource.

IAM users, roles, federated users, and applications are all AWS principals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What do requests contain?

A

Requests contain:

  • actions (or operations) that the principal wants to perform
  • resources upon which the actions are performed
  • principal information including the environment from which the request was made (IP address, user agent, SSL status, etc.)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What condition should a principal satisfy to send a request?

A

In order to send a request a principal must be authenticated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can a principal get authenticated?

A
  • A principal can get authenticated via console with username and password.
  • In addition it can be authenticated via API or CLI with access key and secret key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How is authorization implemented in AWS IAM?

A

By means of IAM policies which are stored in IAM as JSON documents and specify the permissions that are allowed or denied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How are requests evaluated?

A

IAM checks each policy that matches the context of your request. If a single policy has a deny action IAM denies the request and stops evaluating (explicit deny).

If a single policy has a deny action IAM denies the request and stops evaluating (explicit deny).

By default, all requests are denied (implicit deny).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are actions?

A

Actions are operations that can be performed on resources like: create, viewing, editing, deleting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What happens to an action on a resource if it is not explicitly allowed?

A

An action on a resource that is not explicitly allowed gets denied.

19
Q

How does a principal get allowed to perform an action?

A

In order for a principal to perform an action on a resource you must include the necessary actions in a policy that applies to the principal or the affected resource.

20
Q

What is a resource?

A

A resource in entity that exists within a service.

E.g.: EC2 instances, S3 buckets, IAM users, and DynamoDB tables.

21
Q

What are groups?

A

Groups are collections of users and have policies attached to them.

Use groups to assign permissions to users. Use the principal of least privilege when assigning permissions.

You cannot nest groups (groups within groups).

22
Q

What is a role?

A

A role is a set of permissions that grant access to actions and resources in AWS. These permissions are attached to the role, not to an IAM user or group.

23
Q

What are roles used for?

A

IAM roles are used to delegate access to users, applications, or services that do not normally have access to your AWS resources.

  • users in your AWS account can have access to resources they normally have not.
  • users in AWS account can access resources in another account.
  • a mobile web app needs to use some AWS resources, but you don’t wanna embed AWS keys within the app.
  • users who have identities defined outside of AWS, such as in your corporate directory.
  • third parties so that they can perform an audit on your resources.
24
Q

What are policies?

A

Policies are entities that define permissions and can be applied to principals (users, groups and roles) or to resources (S3 Bucket, etc.) in order to determine if a request should be allowed or denied.

Policies are stored in AWS within JSON documents.

25
Q

What is STS (Secure Token Service)?

A

The AWS Security Token Service (STS) is a web service that enables you to request temporary, limited-privilege credentials for IAM users or for users that you authenticate (federated users).

26
Q

What is an ARN and what is it made of?

A

ARN (Amazon Resource Name) is a format to specify resources which is required by the permission policy language.

arn:partition:service:region:account:resource

  • partition: the resource that a partition is in. For standard AWS regions the partition is aws. In case of other regions it become aws-partitionname. E.g. in the case of China (Beijing) it is aws-cn.
  • service: it is the aws product.
  • region: is the region that the resource is in. In case of IAM (since it’s a global resource, it’s always blank.
  • account: aws account id without hyphens.
  • resource: the name of the resource.
27
Q

Is it possible to rename a user?

A

Yes, via CLI or API but not via console.

28
Q

What are identity based policies?

A

They are policies that can be attached to a principal or an identity, such as an IAM user, role or group.

29
Q

What is the difference between managed policies and inline policies regarding identity based policies?

A

Managed policies are standalone, identity based policies that you can attach to multiple user, roles, groups in an aws account.

The managed policies created and managed by AWS are called AWS managed policies.

Whereas the policies created and maintained by AWS users are the customer managed policies. The customer managed policies provide more customer control over your policies than AWS managed policies.

The inline policies are the policies that you can create an manage and that are embedded in a single user or role.

30
Q

What are resource based policies?

A

Resource based polciies are policies that are attached to a resource such as a S3 bucket.

These policies specify what actions a specified principal can perform on that resource and under what conditions.

These are inline policies and there are no managed resource-based policies.

31
Q

What is the template of an IAM policy?

A
  • Version: optional policy wide information (it can be the date when the policy was issued)
  • Statement: there can be one or more
  • Actions: the list of actions that are allowed or denied
  • Resources: the list of the resources on which actions can occur.
  • Principal: who is granted the permission.
32
Q

Why to use a role?

A
  • It allows you to delegate (hand over) access with defined permissions to trusted entities without having to share long-term access keys.
  • When EC2 accesses AWS resources such as S3 via IAM User, the user’s security credentials get stored on that EC2 instance. This should be avoided.
  • When the same EC2 instance assumes a role, its credentials are not stored, making it the most secure way to access the resource.
33
Q

When to use IAM roles?

A
  • Provide access for services offered by AWS to AWS resources.
  • Provide access for an IAM user in one AWS account that you own to another AWS account that you own.
  • Provide access for externally authenticated users (identity federation)
  • Provide access to IAM users in AWS accounts owned by third parties.
34
Q

What is an AWS service role?

A

A role that a service assumes to perform actions i nyour account on your behalf.

35
Q

What is an AWS service role for an EC2 instance?

A

A special type of service role that a service assumes to launch an Amazon EC2 instance that runs your application.

36
Q

What is an AWS service-linked role?

A

A role predefined by a service and includes all the permissions that the service requires to call other AWS services on your behalf.

37
Q

What is role chaining?

A

Role chaining occurs when you use a role to assume a second role through the AWS CLI or API.

E.g. User1 -> Role A & Role B, additionally Role A -> Role B

-> means “has permission to assume”

38
Q

What is delegation?

A

Delegation means granting permissions to someone in order to allow access to resources that you control.

39
Q

What is federation?

A

Federation is the creation of a trust relationship between an external identity provider and AWS.

40
Q

What is a trust policy?

A

A trust policy is a document in JSON format where you define who is allowed to asusme the role.

41
Q

What is a permissions policy?

A

A permissions document in JSON format in which you define what actions and resources the role can use.

42
Q
A
43
Q

What is a role for cross-account access?

A

It means granting acces to resources in one account to a trusted principal in a different account.

44
Q
A