> ## Documentation Index
> Fetch the complete documentation index at: https://inframan.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Permissions reference

> Every identity, role and API that Inframan's setup scripts create in your Google Cloud project or AWS account, and how to revoke them.

Inframan holds no static credential for your cloud. Every action it takes in your account runs as an identity that lives in your account, was created by a script you ran, and can be removed by you at any time. This page lists all of them.

Because Inframan acts through identities in your account, every call it makes shows up in your own **Cloud Audit Logs** on Google Cloud or **CloudTrail** on AWS.

Names below use short IDs:

| Placeholder | Meaning |
| - | - |
| `<inst8>` | The first 8 characters of your Inframan instance's ID |
| `<acct8>` | The first 8 characters of the cloud account's ID in Inframan |
| `<infra8>` | The first 8 characters of the infrastructure's ID |

> [tab] Google Cloud
>
> ## How Inframan gets in
>
> Inframan impersonates a service account in your project. The only thing that lets it do so is one grant: your instance's controller service account gets **Service Account Token Creator** (`roles/iam.serviceAccountTokenCreator`) on `im-<inst8>-ca-<acct8>`. Remove that grant and Inframan can no longer act in the project.
>
> ## APIs the script enables
>
> IAM, Cloud Resource Manager, Compute Engine, Kubernetes Engine, Artifact Registry, Network Connectivity and Secret Manager.
>
> ## Created when you connect the account
>
> | Identity | Roles | Used for |
> | - | - | - |
> | `im-<inst8>-ca-<acct8>` (service account) | `roles/container.admin`, `roles/compute.admin`, `roles/compute.networkAdmin`, `roles/artifactregistry.admin`, `roles/storage.admin`, `roles/iam.workloadIdentityUser`, `roles/networkconnectivity.spokeAdmin`, and the two custom roles below | Everything Inframan does in the project: networks, clusters, registries, buckets and secrets |
> | `im-<acct8>-cluster` (service account) | `roles/artifactregistry.reader`, `roles/iam.serviceAccountUser` | The identity your cluster's nodes run as. It pulls images from your registry. |
> | `inframanIamReader` (custom role) | Read the project's IAM policy, custom roles and service-account policies | Lets Inframan check the setup directly when you click **Verify** |
> | `inframanSecretWriter` (custom role) | Create, read, update and delete secrets and secret versions in Secret Manager | Build and runtime secrets, and add-on passwords |
>
> ## Created during provisioning
>
> Each infrastructure pauses once for a setup script that needs the cluster to exist.
>
> | Identity | Roles | Used for |
> | - | - | - |
> | `im-<acct8>-builder` (service account) | `roles/artifactregistry.admin`, `roles/secretmanager.secretAccessor` | Pushing images and reading build secrets |
> | Workload Identity binding for the `inframan-ci/ci-builder` Kubernetes service account | Acts as `im-<acct8>-builder` | Lets builds in the cluster use the builder account without a key |
>
> ## Created later, when you ask for it
>
> * **PostgreSQL and Redis** each use a service account per tier. The App store shows you the script the first time you install one. See [Add-ons](https://inframan.mintlify.site/provision/add-ons/overview.md).
>
> * **Your services** get their own service account when you turn on workload identity for them. See [Workload identity](https://inframan.mintlify.site/secure/workload-identity.md).
>
> * **Storage buckets** are granted to a service by a script you run. Inframan can't grant a bucket to anyone by itself. See [Storage](https://inframan.mintlify.site/provision/add-ons/storage.md).
>
> > [!NOTE]
> >
> > If your instance's control plane runs in your own Google Cloud project, the script also lets the infrastructure's network join your instance's private network hub.

> [tab] AWS
>
> ## How Inframan gets in
>
> Inframan assumes the role `inframan-<inst8>-ca-<acct8>`. The role's trust policy accepts only a Google-signed identity token from your instance's controller, pinned to that controller's unique ID and to your instance as the audience. Sessions last one hour, and each one is named `inframan-<inst8>-<purpose>` in CloudTrail. Delete the role and Inframan can no longer act in the account.
>
> ## Created when you connect the account
>
> | Role | Used for |
> | - | - |
> | `inframan-<inst8>-ca-<acct8>` | Everything Inframan does in the account |
> | `inframan-<acct8>-eks-cluster` | The EKS control plane |
> | `inframan-<acct8>-eks-node`, with an instance profile | Your nodes: EKS worker, VPC CNI, read-only ECR and Systems Manager |
> | `inframan-<acct8>-eks-fargate` | The Fargate pods that run the Karpenter controller |
>
> The script also creates the service-linked roles for EKS, EKS Fargate, Elastic Load Balancing and EC2 Spot, if your account doesn't have them yet.
>
> ## What the account role can do
>
> | Service | Scope |
> | - | - |
> | EC2, EKS, Elastic Load Balancing | The whole account |
> | S3, DynamoDB, ECR, SNS, SQS, EventBridge | Only resources named `inframan-*` |
> | Secrets Manager | Only secrets under `inframan/*` |
> | IAM | Read-only. It can pass `inframan-*` roles to AWS services and create one service-linked role, and nothing else. |
>
> Inframan can't create IAM roles or policies in your account. Every role it uses is created by a script you run.
>
> ## Created during provisioning
>
> Each infrastructure pauses once for a setup script that needs the cluster to exist. It creates the cluster's OIDC provider and these roles:
>
> | Role | Used for |
> | - | - |
> | `inframan-<infra8>-karpenter` | Karpenter, which launches and removes nodes |
> | `inframan-<infra8>-ebs-csi` | The EBS CSI driver, which creates disks for volumes |
> | `inframan-<infra8>-lb-controller` | The AWS Load Balancer Controller |
> | `inframan-<infra8>-ci-builder` | Builds in the cluster: pushing to ECR and reading build secrets |
>
> ## Created later, when you ask for it
>
> * **PostgreSQL** uses a role per tier, created by a script the App store shows you.
> * **Your services** get their own role through EKS Pod Identity when you turn on workload identity. See [Workload identity](https://inframan.mintlify.site/secure/workload-identity.md).
> * **S3 buckets** from the Storage add-on are granted to a service by a script you run in CloudShell. See [Storage](https://inframan.mintlify.site/provision/add-ons/storage.md).

## Revoking access

You can cut Inframan off from a cloud account at any time, from your cloud, without going through Inframan:

* **Google Cloud:** remove the Service Account Token Creator grant on `im-<inst8>-ca-<acct8>`, or delete that service account.
* **AWS:** delete the role `inframan-<inst8>-ca-<acct8>`.

Infrastructures in that account keep running, but Inframan can no longer deploy to them, heal them or destroy them. Restore the grant or the role to give control back.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.