Identity and Federation Flashcards

1
Q

An IAM Policy document can contain 5 sections. What are they and which is optional?

A

Effect, Action, Resource, Conditions, Policy Variables (Optional)

EAR Conditions Policy

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

How does an IAM user differ from an IAM role in terms of the term of the policy (I.e. which would be used for long term vs short term)? What do IAM Roles use for issuing credentials?

A

IAM user is for long term IAM credentials. You would use a IAM Role for issuing short term credentials via STS

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

I need to perform an audit over my IAM policies to determine which policies grant which permissions and when they were last used. Which AWS tool would I use,
AWS Access Analyser or AWS Access Advisor?

A

AWS access advisor

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

What is the default Effect for an IAM policy?

A

DENY

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

Which 3 services in AWS support Resource based policies?

A

SQS, S3, SNS Topics

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

When a user assues a role, what happens to that users permissions. I.e If a user has access to a DynamoDB table to perform scans in Account A, and needs to output the results to an S3 bucket Account B if they assumed the role to access S3 in account B would they still be able to scan the DynamoDB table in Account A?

A

A user gives up their permissions for the duration of the assumption of the role. So, if a user assumes the Role in Account B to access the S3 bucket, they will not be able to access the table in DynamoDB

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

By default what belongs in your zone of trust?

A

By default your zone of trust consists of AWS accounts and organisations that you own. Anything outside of that is classified as a third party.

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

What would you use to allow a user access in an account you own to a resource in another account that you own?

A

Typically, you would use STS assume role to allow cross account access in accounts that you own.

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

What mechanism do AWS services use to access AWS resources in terms of authentication and authorisation?

A

Assume Role is used by AWS services to AWS roles.

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

What API is used to provide access for IAM users in other accounts from 3rd parties?

A

the AssumeRole API is used to provide access to AWS resources for IAM users in third party accounts

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

Is it possible to revoke active sessions and credentials for a role? If so how?

A

You can use the AwsRevokeOlderSessions API to revoke all active sessions for a role based on a revocation time stamp.

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

When defining a access for a third party outside your zone of trust what THREE things must you define to allow them to safely access resources inside your account to avoid a confused deputy attack?

A

you need to define:

  1. The 3rd party AWS account ID
  2. Define and External ID
  3. Define an IAM permissions policy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the role of an External ID with respect to granting access for a third party AWS account outside of your zone of trust?

A

An external ID is a shared secret between you and the external third party. It is passed to YOUR account when assuming the role by the third party and it must match.

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

In a third party relationship out side of your zone of trust who chooses the external ID?

A

The third party does

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

Describe a confused deputy attack.

A

A confused deputy attack involves an attacking account providing a role ARN that matches an ARN for a role within my account to a trusted third party. If no external ID is involved, the trusted third party does not know where the ARN submission has come from and will use it to assume a role within my account and allow the attacking account to access that resource.

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

What would you use STS AssumeRole for?

A

AssumeRole is used to access a role within your account, or cross account

17
Q

What would you use STS AssumeRoleWithWebIdentity for?

A

This returns credentials for users who are logged in with a web IdP such as google, face book, cognito or an OpenID provider. AWS recommends using Cognito rather than this API

18
Q

I need to return an MFA token to a user, which STS API would I use?

A

GetSessionToken