Difference between revisions of "AWS Solutions Architect/training/Section 3: Identity Management and Permissions"

From Freephile Wiki
Jump to navigation Jump to search
Line 32: Line 32:
  
 
Evaluation logic starts with 'Deny'. There is a [https://docs.aws.amazon.com/images/IAM/latest/UserGuide/images/PolicyEvaluationHorizontal111621.png flow diagram] at the [https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html AWS IAM UserGuide policies evaluation logic docs]
 
Evaluation logic starts with 'Deny'. There is a [https://docs.aws.amazon.com/images/IAM/latest/UserGuide/images/PolicyEvaluationHorizontal111621.png flow diagram] at the [https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html AWS IAM UserGuide policies evaluation logic docs]
 +
 +
Steps for authorizing Requests to AWS - which may come from the Console, the CLI, or via an API
 +
 +
# Authentication
 +
# Processing the '''request context''' of
 +
## Actions
 +
## Resources
 +
## Principal
 +
## Environment data
 +
## Resource data
 +
# Evaluating all policies within the account (both identity-based and resource-based)
 +
# Determining whether a request is allowed or denied
 +
 +
Types of Policies
 +
 +
* Identity-based policies - attached to Users, Groups, or Roles
 +
* Resource-based policies - attached to resource; define permissions for a principal accessing the resource.
 +
* IAM Permission boundaries - set the maximum permissions an identity-based policy can grant an IAM entity
 +
* AWS Organizations service control policies (SCP) - specify the maximum permissions for an organization or OU
 +
* Session policies - used with the AssumeRole* API actions
 +
 +
The '''effective''' permissions are the superset when combining an Identity-based policy with a Resource-based policy. But, are only the '''intersection''' when combining with Permissions boundary or Organizations SCP<ref>https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics-id-rdp</ref>
  
 
28. IAM Policy Structure
 
28. IAM Policy Structure

Revision as of 19:53, 7 February 2024

17. Introduction

18. How IAM Works

19. Overview of Users, Groups, Roles and Policies

20. IAM Authentication Methods

21. AWS Security Token Service (STS)

22. Multi-Factor Authentication (MFA)

23. [HOL] Setup Multi-Factor Authentication (MFA)

24. Identity-Based Policies and Resource-Based Policies

25. Access Control Methods - RBAC & ABAC

Users are assigned permissions through policies attached to groups. There are AWS managed policies for job functions designed to closely align to common job functions in the IT industry.

Groups are organized by job function.

Best practice is to grant the minimum permissions required to perform the job (principal of least privilege).

Attribute-Based Access Control (ABAC) can be based on "Tag Key" Department, "Tag Value" DBAdmins. Tags can be applied to people and resources, so the policy can check for both.

26. Permissions Boundaries

A permission boundary policy can limit the permissions that are otherwise granted via groups, roles or directly.

27. IAM Policy Evaluation

Evaluation logic starts with 'Deny'. There is a flow diagram at the AWS IAM UserGuide policies evaluation logic docs

Steps for authorizing Requests to AWS - which may come from the Console, the CLI, or via an API

  1. Authentication
  2. Processing the request context of
    1. Actions
    2. Resources
    3. Principal
    4. Environment data
    5. Resource data
  3. Evaluating all policies within the account (both identity-based and resource-based)
  4. Determining whether a request is allowed or denied

Types of Policies

  • Identity-based policies - attached to Users, Groups, or Roles
  • Resource-based policies - attached to resource; define permissions for a principal accessing the resource.
  • IAM Permission boundaries - set the maximum permissions an identity-based policy can grant an IAM entity
  • AWS Organizations service control policies (SCP) - specify the maximum permissions for an organization or OU
  • Session policies - used with the AssumeRole* API actions

The effective permissions are the superset when combining an Identity-based policy with a Resource-based policy. But, are only the intersection when combining with Permissions boundary or Organizations SCP[1]

28. IAM Policy Structure

29. [HOL] Using Role-Based Access Control (RBAC)

30. [HOL] Using Attribute-Based Access Control (ABAC)

31. [HOL] Apply Permissions Boundary

32. Use Cases for IAM Roles

33. [HOL] Cross-Account Access to S3

34. Access Keys and IAM Roles with EC2

35. [HOL] Amazon EC2 Instance Profile

36. AWS IAM Best Practices