All Projects → iagcl → bakery

iagcl / bakery

Licence: Apache-2.0 license
(Not maintained anymore) Bakery - Centralised AWS identity and access management solution for multiple accounts

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to bakery

terraform-aws-organization-access-group
Terraform module to create an IAM Group and Policy to grant permissions to delegated IAM users in the Organization's master account to access a member account
Stars: ✭ 16 (-68%)
Mutual labels:  iam, iam-policy, iam-role
aws-iam-slack-notifer
Notifies slack when an IAM policy is created, changed or assigned to a role
Stars: ✭ 35 (-30%)
Mutual labels:  iam, iam-policy
terraform-aws-cloudtrail-s3-bucket
S3 bucket with built in IAM policy to allow CloudTrail logs
Stars: ✭ 38 (-24%)
Mutual labels:  iam, iam-policy
terraform-aws-iam-assumed-roles
Terraform Module for Assumed Roles on AWS with IAM Groups Requiring MFA
Stars: ✭ 33 (-34%)
Mutual labels:  iam, iam-role
ec2-tags-env
☁️ Import AWS EC2 tags as environment variables
Stars: ✭ 59 (+18%)
Mutual labels:  iam
gtoken
Securely access AWS services from GKE cluster
Stars: ✭ 43 (-14%)
Mutual labels:  iam
alks-cli
CLI for working with the ALKS service.
Stars: ✭ 40 (-20%)
Mutual labels:  iam
holochrome
Use your IAM role (from instance metadata) to open the AWS console
Stars: ✭ 102 (+104%)
Mutual labels:  iam-role
terraform-aws-iam-user
A Terraform module to create and manage Identity and Access Management (IAM) Users on Amazon Web Services (AWS). https://aws.amazon.com/iam
Stars: ✭ 17 (-66%)
Mutual labels:  iam
aws-cdk-github-oidc
CDK constructs to use OpenID Connect for authenticating your Github Action workflow with AWS IAM
Stars: ✭ 59 (+18%)
Mutual labels:  iam
iam-role-injector
Assumes an IAM role via awscli STS call, injecting temporary credentials into shell environment
Stars: ✭ 27 (-46%)
Mutual labels:  iam
awscredswrap
awscredswrap uses temporary credentials for the specified iam role to set a shell environment variable or execute a command.
Stars: ✭ 15 (-70%)
Mutual labels:  iam-role
Transformer-ocr
Handwritten text recognition using transformers.
Stars: ✭ 92 (+84%)
Mutual labels:  iam
cognises-flask
Flask Cognises: AWS Cognito group based authorization with user management
Stars: ✭ 16 (-68%)
Mutual labels:  iam-role
iam
企业级的 Go 语言实战项目:认证和授权系统
Stars: ✭ 1,900 (+3700%)
Mutual labels:  iam
mod authnz jwt
An authentication module for Apache httpd using JSON Web Tokens
Stars: ✭ 74 (+48%)
Mutual labels:  iam
aws-security-test
No description or website provided.
Stars: ✭ 14 (-72%)
Mutual labels:  iam
aa-policy-validator
Validate all your Customer IAM Policies against AWS Access Analyzer - Policy Validation
Stars: ✭ 42 (-16%)
Mutual labels:  iam
terraform-aws-frontend
Collection of Terraform modules for frontend app deployment on AWS.
Stars: ✭ 31 (-38%)
Mutual labels:  iam
kube-secrets-init
Kubernetes mutating webhook for `secrets-init` injection
Stars: ✭ 106 (+112%)
Mutual labels:  iam-role

Bakery and Burgers

Bakery is a centralised AWS identity and access management solution to avoid the duplication of user accounts/policies across multiple AWS accounts. In a nutshell, you just use one AWS account (called Bakery) for managing IAM users and assign right policies to gain access to other AWS account(s) which we call Burgers.

Terminologies

  • Bakery: An AWS Account to manage IAM Users and Groups.
  • Burger: An AWS Account where Bakery Users federate into.
  • AccessType: Level of access. Defaults are 'Admin', 'PowerUser', 'ReadOnly'.
  • Environment Groups:
    • These are AWS IAM Groups designated for each environment type. Defaults are 'Prod', 'NonProd', 'Mgmt' (aka Management)
    • Environment Groups use 'AccessType' for defining different level of access while forming IAM groups.

Key Concepts

  • IAM Users and IAM Groups are created ONLY in Bakery Account
  • IAM Users are members of IAM Groups created in same Bakery Account
  • Bakery Account manages various privileged access to Burger Accounts
  • IAM policies assigned to IAM Group grants AssumeRole access to associated Burger Role

Architectural overview

architecture

As mentioned in the diagram above

  • The NonProd Admin Group is a Bakery Environment Group. A Bakery Environment Group is composed of an IAM Group and a STS Policy that is assigned to the group. The STS Policy gives privilege to assume AdminRole.
  • In this example any member in NonProd Admin Group can assume AdminRole in any Burger Account that belongs to NonProd Environment Group.

How it works

Bakery and Burger implementation is nothing but a process of delegating right level of access across multiple AWS accounts as mentioned in this AWS documentation.

Below are a few key steps which explains the workflow of Bakery

  1. Firstly, a trust between two AWS accounts i.e. Bakery & Burgers is created. This process involves creation of IAM access policies & IAM roles.

trust

  1. IAM users get created in Bakery account with right level of access. The users can then download AWS access keys from Bakery account.

creds

  1. Using downloaded AWS credentials, IAM users can assume relevant role in Burger account.

assume role

Quickstart

  1. Modify configuration/config.yml by adding the data relevant to you. Refer to config README for more information.

  2. Setup Bakery AWS account

    1. Ensure your Bakery AWS account's credentials are within the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
    2. Run the following commands from the root of the repo
    $ export bakery_cf_bucket=<Name of your S3 bucket>  # Must be already created in your Bakery Account
    
    $ make deploy-bakery-cf-in-docker

    This process will dynamically create CloudFormation templates and then deploy IAM groups along with policies using the newly created CloudFormation templates.

  3. Setup Burger AWS account

    The below steps need to be run for each Burger account you want to assume roles into.

    1. Ensure your Burger AWS account's credentials are within the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
    2. Run following commands from the root of the repo
    $ export account_name=<Name of your burger account>  # E.g. TestAccount
    
    $ export aws_env=<Environment of your burger account>  # E.g. NonProd
    
    $ make deploy-burger-cf-in-docker

    This process will dynamically create a CloudFormation template and then deploy IAM roles using the newly created CloudFormation template.

  4. Create IAM Users in Bakery and grant appropriate access

    1. This is a manual process of creating IAM users in your Bakery AWS Account
    2. Once desired IAM users are created, you must associate them to designated Environment Groups so that they get appropriate access level while assuming a role into Burger AWS Accounts

Bakery Environment Groups

Bakery Environment Groups (or Environments) are AWS account groupings. We group accounts depending on workloads, security requirements or account classification. Each group will have AssumeRole access to Access Type Roles in Burger Accounts.

Default Bakery Environment Groups:

  • NonProd
  • Prod
  • Mgmt

Access Types

Access Types are types of access that a user can assume.

Default Access Types:

  • Admin
  • PowerUser
  • ReadOnly

CloudFormation Templates

Bakery

  • Has tmpl files which are used to create the CloudFormation templates using config.yml for the source information
  • bakery_stack is the main stack that calls bakery_account and bakery_env nested stacks mentioned below
  • bakery_account is a nested stack created by bakery_stack which creates AdminGroup and UserGroup for managing Bakery Account
  • bakery_env is a nested stack created by bakery_stack which creates IAM Groups and IAM Policies according to Bakery Environment Groups and Access Types.
    • IAM User that belongs to the IAM Group will have Access Type privileges to Burger Accounts in the Bakery Environment Groups

Burger

  • Has a tmpl file which is used to create the CloudFormation template using config.yml for the source information
  • burger_account stack is deployed to each Burger account you want to onboard. By default, it creates three IAM roles in Burger account, i.e. AdminRole, PowerUserRole and ReadOnlyRole.

Customizability and Scalability

We can scale the solution in three directions

  • Adding Bakery Environment Groups
  • Adding Burger Accounts
  • Adding Access Types

Check Admin Access

Please view README for for more information regarding Check Admin Access.

Utils

Please view README for command line helper tool to assume roles in burger accounts.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].