Links
Comment on page

AWS: Managing Access to IAM Groups

In this tutorial, you'll learn how to configure Grant Kits to automate access requests to an AWS IAM Group by attaching AWS IAM Group Memberships. This use case models Role-Based Access Control (RBAC) using core AWS IAM components.
We will be using the AWS IAM Starter Kit as a base and replace configuration stubs for our use case.

Before you start

  1. 1.
    Make sure you have:
  2. 2.
    Make sure you setup:

Step 1: Create Your User and Group

In the AWS IAM Console, create a new user and group. Do not add the user to the group at this time.
Add a User
Add a Group

Step 2: Configure Your Grant Kit

We only need to replace 3 stubs in the Grant Kit: region, reviewers and location.
main.tf
1
provider "aws" {
2
- region = "us-west-2" #CHANGEME
3
+ region = "us-west-2" # Use your AWS region
4
}
5
6
resource "abbey_grant_kit" "IAM_membership" {
7
...
8
9
workflow = {
10
steps = [
11
{
12
reviewers = {
13
- one_of = ["[email protected]"] # CHANGEME
14
+ one_of = ["[email protected]"] # Use your own Abbey account [1].
15
}
16
}
17
]
18
}
19
20
output = {
21
- location = "github://replace-me-with-organization/replace-me-with-repo/access.tf" # CHANGEME
22
+ location = "github://example-org/example-repo/access.tf" # Use your own organization and repo.
23
...
24
}
25
}
26
27
...
[1] To find your Primary Identity, visit the Abbey App and click on your Profile Icon on the top right ->
Manage Account -> Look under Email addresses.
Find your Primary Identity on the Abbey App.

Step 3: Configure an Identity

Replace the stub with a name, your Abbey account email, and the IAM user ID that you want to allow to request access.
main.tf
1
resource "abbey_identity" "user_1" {
2
- abbey_account = "[email protected]"
3
+ abbey_account = "[email protected]" # Use your own Abbey account.
4
source = "aws_iam"
5
metadata = jsonencode(
6
{
7
- name = "ReplaceWithAWSIamName" #CHANGEME
8
+ name = "ReplaceWithAWSIamName" #Use your IAM name.
9
}
10
)
11
}

Step 4: Deploy Your Starter Kit

First, add your GitHub-related secrets to your repo's repository secrets:
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • ABBEY_TOKEN
You can find the AWS keys in your AWS account. The ABBEY_TOKEN is your API key.
What should it look like?
To deploy your Starter Kit, follow instructions from Deploy Your Grant Kit.

Step 5: Automate Access Management

🎉
Congratulations! Abbey is now managing permissions to your Resource for you.
🎉
You can now start requesting and approving access by following the Request Access and Approve or Deny Access Requests guides.
Abbey strives to help you automate and secure access management without being intrusive.
To that end, this Pull Request contains native Terraform HCL code using normal open source Terraform Provider libraries. It represents the permissions change. In this case, it's just a simple creation of a new Terraform Resource.
After approving the request, you should be able to see that the User has been added to the Group in the AWS console.

Next Steps

To learn more about what Resources you can configure, try one of the Data Integration tutorials. You can also look at Infrastructure Integrations or get set up with a TACOS of your choice.
For more information on how Abbey works, visit the Key Concepts or Grant Kits page.