Cloud permissions
This page is for the security team that reviews a cloud connection before an Admin creates it. It lists each permission Nimzo asks for on AWS, Azure and Google Cloud, and what Nimzo does with it.
Nimzo only reads. It never creates, changes or deletes a resource in your cloud account. To create a connection, see Cloud connections.
What Nimzo does with the access
Section titled “What Nimzo does with the access”Nimzo uses a cloud connection for three tasks:
- Test the connection. Nimzo signs in and reads the identity of the account, subscription or project.
- Build the inventory. Nimzo lists the resources of the account and stores them. See Inventory.
- Read the Terraform state of your stacks. This task is optional and needs one more permission. Nimzo uses the state to know which stack manages each resource.
Amazon Web Services
Section titled “Amazon Web Services”How Nimzo signs in
Section titled “How Nimzo signs in”With the recommended method, you create an IAM role in your account. Nimzo stores the role ARN and no secret.
| What you create | Why Nimzo needs it |
|---|---|
Trust policy with sts:AssumeRole |
The AWS account of Nimzo assumes the role. |
Condition on sts:ExternalId |
The role accepts only the external ID that Nimzo generates for your organization. |
ReadOnlyAccess policy on the role |
Nimzo reads the resources of the account. See the calls below. |
Each session lasts one hour. The session name starts with nimzo-, so you can find each session in CloudTrail.
With the Access keys method, Nimzo stores the access key of an IAM user, encrypted. Nimzo exchanges the key for a one-hour session with sts:GetSessionToken.
What Nimzo calls
Section titled “What Nimzo calls”ReadOnlyAccess is a policy that AWS manages. It allows more read actions than Nimzo calls. Nimzo calls only the actions in this table.
| Task | Calls |
|---|---|
| Test the connection | sts:GetCallerIdentity |
| Build the inventory | sts:GetCallerIdentity, iam:ListAccountAliases, ec2:DescribeRegions, then List, Describe and Get actions on the services below |
| Read the state | s3:GetObject on the state object of each stack |
The inventory reads these services: ACM, API Gateway, Auto Scaling, Backup, CloudFormation, CloudFront, CloudTrail, CloudWatch, CloudWatch Logs, Cognito, DynamoDB, EC2, ECR, ECS, EFS, EKS, ElastiCache, Elastic Load Balancing, EventBridge, Firehose, Glue, IAM, Kinesis, KMS, Lambda, OpenSearch, RDS, Redshift, Route 53, S3, Secrets Manager, SNS, SQS, Step Functions, Systems Manager and WAF.
For Secrets Manager and Systems Manager Parameter Store, Nimzo lists the secrets and parameters with their metadata and tags. It never reads the value of a secret or of a parameter. For S3, the inventory lists the buckets with their location and tags. It does not read objects.
Read the state
Section titled “Read the state”ReadOnlyAccess already allows s3:GetObject, so an S3 bucket needs no other policy.
If the bucket uses a customer-managed KMS key, add the kms:Decrypt permission on that key. Without it, S3 refuses the read and the stack shows a missing permission.
Microsoft Azure
Section titled “Microsoft Azure”How Nimzo signs in
Section titled “How Nimzo signs in”With the recommended method, an admin of your Microsoft Entra tenant signs in with Microsoft and adds the Nimzo app to the tenant. Nimzo stores the tenant ID and the subscription ID, and no secret.
- The sign-in asks Microsoft for the
openidscope only. - From the sign-in, Nimzo reads the tenant ID and the directory roles of the admin. Nimzo accepts only a Global Administrator or a Privileged Role Administrator.
- Nimzo then gets tokens for the Nimzo app in your tenant: one for Azure Resource Manager, and one for Azure Storage when it reads a state.
With the Client secret method, you create an app registration and Nimzo stores its client secret, encrypted.
What Nimzo calls
Section titled “What Nimzo calls”You give the Reader role on the subscription. Reader allows the read of every resource and no write.
| Task | Calls |
|---|---|
| Test the connection | A read of the subscription in Azure Resource Manager |
| Build the inventory | Two Azure Resource Graph queries: the subscriptions the app can read, and the resources of each one |
| Build the inventory | A read of the permissions of the app on each subscription, to make sure that it can read every resource |
| Read the state | A read of the state blob of each stack in Azure Storage |
Read the state
Section titled “Read the state”Give the Storage Blob Data Reader role on the storage account that holds the state. Reader does not allow the read of blob content, so the state needs this role.
The role allows the read of every blob in the storage account. Nimzo reads only the state blob of each stack.
Google Cloud
Section titled “Google Cloud”How Nimzo signs in
Section titled “How Nimzo signs in”With the recommended method, a workload identity pool in your project trusts Nimzo. Nimzo stores the name of the pool provider and the email of the service account, and no secret.
| What you create | Why Nimzo needs it |
|---|---|
| Workload identity pool and OIDC provider | Google Cloud accepts the tokens that Nimzo signs. |
Attribute condition on assertion.sub |
The pool accepts only the subject that Nimzo generates for your organization. |
Service account nimzo-read |
Nimzo reads the project as this service account. |
roles/iam.workloadIdentityUser on the service account |
The identity from the pool can use the service account, and no other identity. |
With the Service account key method, Nimzo stores a JSON key of the service account, encrypted.
The setup also enables five APIs in the project:
| API | Why Nimzo needs it |
|---|---|
iam.googleapis.com |
You create the pool and the service account. |
sts.googleapis.com |
Google Cloud exchanges the token of Nimzo. |
iamcredentials.googleapis.com |
Nimzo gets an access token of the service account. |
cloudresourcemanager.googleapis.com |
Nimzo reads the project. |
cloudasset.googleapis.com |
The inventory lists the resources of the project. |
What Nimzo calls
Section titled “What Nimzo calls”You give two roles to the service account on the project.
| Role | Task | Calls |
|---|---|---|
roles/viewer |
Test the connection | A read of the project in Cloud Resource Manager |
roles/viewer |
Build the inventory | A search of the projects that the service account can see |
roles/cloudasset.viewer |
Build the inventory | A list of the resources of each project in the Cloud Asset API |
Read the state
Section titled “Read the state”Give the roles/storage.objectViewer role on the bucket that holds the state. Nimzo then reads the state object of each stack in Cloud Storage.
The role allows the read of every object in the bucket. Nimzo reads only the state object of each stack.
How Nimzo reads a state
Section titled “How Nimzo reads a state”Nimzo finds the location of the state in the backend block of the code of each stack. It reads s3, azurerm and gcs backends.
- Nimzo reads one object for each stack: the state of the
defaultworkspace. - Nimzo never lists the objects of a bucket or of a container.
- Nimzo reads the object at the public endpoint of the cloud. It does not read a backend that has a custom endpoint.
- Nimzo stops the read of an object that is larger than 50 MB.
- Nimzo does not decrypt a state that OpenTofu encrypted. The stack shows that its state is encrypted.
- No
planand norefreshruns.
What Nimzo stores
Section titled “What Nimzo stores”From the state
Section titled “From the state”A state can contain secrets. Nimzo reads the state in memory, keeps only the fields in this table, and discards all other data.
| Field of the state | What it is |
|---|---|
serial, lineage |
The version of the state. |
module, type, name, index_key |
The address of each resource instance. |
provider |
The provider of each resource. |
attributes.id |
The ID of the resource in the cloud. |
attributes.arn |
The ARN of an AWS resource. |
attributes.self_link |
The link of a Google Cloud resource. |
attributes.unique_id |
The numeric ID of a Google Cloud service account. |
- Nimzo keeps the four ID attributes only for resources of the AWS, Azure and Google Cloud providers.
- If the state marks an ID attribute as sensitive, Nimzo does not keep it.
- If an ID attribute contains a sensitive value of the same resource, Nimzo does not keep it.
- Nimzo keeps no other attribute, no output and no data source.
- Nimzo never stores the full state and never writes it to a log.
For each stack, Nimzo also stores the backend type, the connection that read the state, the time of the read, and the reason when a read fails.
From the inventory
Section titled “From the inventory”For each resource, the inventory stores its ID, type, name, region, tags and configuration, as the cloud API returns them. On Azure, the configuration is the resource as Azure Resource Graph returns it, with its properties. On Google Cloud, it is the resource as the Cloud Asset API returns it.
What Nimzo never does
Section titled “What Nimzo never does”- Nimzo never creates, changes or deletes a resource in your cloud account. It makes no write call.
- Nimzo never reads the value of a secret in AWS Secrets Manager or of a parameter in AWS Systems Manager.
- Nimzo never stores or logs a full Terraform state.
Remove the access
Section titled “Remove the access”When you disconnect a connection, Nimzo stops all reads and deletes the secret it stored. To remove the access in your cloud account too, see When you disconnect for each provider in Cloud connections.