Identity and access Management Advanced Flashcards

1
Q

What is the AWS Secure Token Service

What is the AssumeRole API?

What is AssumeRoleWithSaml?

What is AssumeRoleWithWebIdentity?

What is get session token?

A

The AWS Security Token Service (STS) Allows to grant limited temporary access to AWS resources for up to one hour via a token

(Think sudo) Provides enhanced security to allow users to to assume a role within the same account to have additional privileges such as deleting an s3 bucket. You can also assume a role for cross account access in order to perform actions there.

Returns role for users logged in with SAML

Return creds for users logged in with an IdP (Facebook Login, Google Login, etc). However this is not recommended and AWS recommends using Cognito instead.

MFA from a user or AWS account root user

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

How can STS be used to Assume a Role or cross account access?

A
  1. Create an IAM role for that user
  2. Assign that role to a principal (user)
  3. The user will request to retrieve credentials and impersonat teh IAM Role you have access to.
  4. Credentials are granted for 15 min - 1hr
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does Identity Federation in AWS do?

Do you need to create IAM users when using federation?

A

It allows users outside AWS to assume a temporary role for accessing AWS resources. These users assume identity provided access role. Note - Even though these users are outside of AWS, they are still on-prem users

No, the user management is outside of AWS.

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

Describe the flow for accessing an S3 bucket via SAML federation.

A
  1. Log into the SAML iDP
  2. Receive a SAML assertion
  3. Pass the assertion the the secure token service STS AssumeRole API
  4. STS will validate the token and return temporary credentials
  5. The temporary credentials can then be used to access the S3 bucket
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you configure SAML

A

You begin by registering AWS with your IdP. In your organization’s IdP you register AWS as a service provider (SP) by using the SAML metadata document that you get from the following URL:

https://signin.aws.amazon.com/static/saml-metadata.xml

Using your organization’s IdP, you generate an equivalent metadata XML file that can describe your IdP as an IAM identity provider in AWS. It must include the issuer name, a creation date, an expiration date, and keys that AWS can use to validate authentication responses (assertions) from your organization.

In the IAM console, you create a SAML identity provider entity. As part of this process, you upload the SAML metadata document that was produced by the IdP in your organization in Step 2. For more information, see Creating IAM SAML identity providers.

In IAM, you create one or more IAM roles. In the role’s trust policy, you set the SAML provider as the principal, which establishes a trust relationship between your organization and AWS. The role’s permission policy establishes what users from your organization are allowed to do in AWS. For more information, see Creating a role for a third-party Identity Provider (federation).

In your organization’s IdP, you define assertions that map users or groups in your organization to the IAM roles. Note that different users and groups in your organization might map to different IAM roles. The exact steps for performing the mapping depend on what IdP you’re using. In the earlier scenario of an Amazon S3 folder for users, it’s possible that all users will map to the same role that provides Amazon S3 permissions. For more information, see Configuring SAML assertions for the authentication response.

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

How does the flow work if you have a custom identity provider (not SAML or OIDC)?

A

If the application is not compatible with SAML, the flow then changes to:

  1. User authenticates with the custom IdP
  2. The IdP will make a request to the secure token service (STS) to get security credentials via the GetFederationToken API
  3. The IdP will then return these credentials the the browser
  4. The browser can then use these credentials to access AWS resources

You must call the GetFederationToken operation using the long-term security credentials of an IAM user

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

How do you use AssumeRoleWithWebIdentity?

A

You shouldn’t, you should use Cognito instead, however, if you must, the flow is:

  1. Log into web application and receive token
  2. Send the token from the browser to STS - AssumeRoleWithWebIdentity API. This will return temporary credentials
  3. These temporary credentials can then be used to access AWS resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the goal of cognito?

A

To provide direct access to AWS resources from the Client Side (Mobile, web app) without creating IAM users for our app users.

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

What is AWS AD Connector?

What is AWS Managed AD?

What is Simple AD?

Which service can support MFA?

A

It allows AWS to broker (proxy) authentication to an on-prem active directory. (Users only stored in AD)

It is similar to AWS AD Connector, except user can exist in both ADs (AWS and on prem). And can authenticate at either. SUPPORTS MFA

AWS managed AD usefule when you have EC2 instances running windows you want users logging into the instances to be able to authenticate with AD

AWS Managed AD.

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

What is an AWS organization?

What is the structure of an AWS organization?

How man organizations can a member account belong to?

If you wanted to have separate per-account service limits or an isolated account for logging how would you do that?

A

It allows you to manage multiple AWS accounts under one. This allows you to have consolidated billing for all accounts.

There is one master account and other member accounts.

One, but they can be migrated to another account.

User member accounts in an organization

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

How can you organize or nest member accounts?

A

By using organizational units

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

What are service control policies.

When would you use a service control policy?

Which can an SCP not be applied to?

How does inheritance work for service control policies

A

They are policies to restrict access to services. They are applied at the OU or account level. They default to no access and access must be added to the policy.

You would use a service control policy to restrict access to certain service. Ex restrict access to services that are not PCI compliant.

The master account and service linked roles.

Service control policies that are applied at the organizational level are inherited by accounts and other organizations below them. This applies to both allow and deny policies.

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

How do you migrate an account from one organization to another?

How do you migrate a master account?

A
  1. Remove the member from the old organization
  2. Send an invite to the new organization
  3. Accept the invite to the new organization from the member account
  4. Migrate all of the member accounts below it
  5. Remove the master account from it’s organization
  6. Migrate the master account.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can you use an IAM policy restrict the source IPs that are allowed to call a service?

How can you restrict the outgoing APIs calls that are made from an AWS service to specific regions?

How can you apply tag based restrictions via an IAM policy?

How can you force MFA?

On an S3 bucket, what does the trailing /* indicate?

What is a Resource-based policy?

A

Use the SourceIP attribute in the condition in the IAM policy.

Use the RequestedRegion attribute in the condition in the IAM policy.

Use the ResourceTag or PrincipalTag attributes in the condition in the IAM policy to restrict based on the tag of the resource or the tag of the Principal (user)

Use the MultiFactorAuthPresent attribute in the condition in the IAM policy.

To apply the policy to the bucket objects.

It allows you to specify a policy directly on an aws resource. Through this mechanism, you can provide accesss to external AWS accounts.

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

What is an IAM permission boundary?

What is the order that policies are evaluated?

A

Allows out to restrict policies that can be applied to a user or group to a specific subset of all available policies.

Deny - Check all explicit denies
Organization SCP
Resource based policy
Permission Boundary
Session based policies (Assumed roles)
Identity based policies (User orGroup)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the AWS Resource Access Manager (RAM)?

A

It allows you to share AWS resources between accounts such as a VPC. This is useful for making the resources of different accounts be able to communicate privately.

17
Q

What is AWS SSO?

What is the main difference between AWS SSO and AssumeRoleWithSAML

A

A single sign on portal for AWS

AssumeRoleWithSAML requires you to set up a role per account