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

# CI → AWS auth & credentials

> Reference for GitHub Actions OIDC, Terraform state access, and AWS credential-store permissions.

> [!NOTE]
>
> Kubernetes/EKS only. On a VM, skip this page.

> [!NOTE]
>
> This page is a detailed reference. For the supported AWS EKS + GitHub Actions deployment path, use the copy-paste task: [AWS S3/DynamoDB state with GitHub Actions](https://sariva.mintlify.site/install-setup/access-and-state/aws-github-actions.md).

## What the GitHub Actions role does

The GitHub Actions role is a **customer-owned CI runner role**. It is assumed by GitHub Actions through GitHub OIDC. It is not the same identity as the Sariva platform pod.

| Capability | Required when |
| - | - |
| S3/DynamoDB Terraform state access | Always, when Terraform state uses AWS S3 + DynamoDB. |
| Read Kafka admin credential from AWS SM/SSM | When the cluster layer manages topics, ACLs, or observability credential creation. |
| Write Kafka observability credential to AWS SM/SSM | When Sariva creates the observability credential through GitOps. |
| Additional AWS resource permissions | Only if Terraform provisions AWS resources such as MSK, PrivateLink, IAM, or VPC objects. |

## Role naming

Use a customer-owned role name. The documented convention is:

```text theme={null}
<stage>-gha-terraform-deploy-role
```

Example:

```text theme={null}
dev-gha-terraform-deploy-role
```

## OIDC trust

The role trust policy should allow `sts:AssumeRoleWithWebIdentity` from the GitHub OIDC provider for the selected repository. For production, narrow the `sub` condition to a protected branch or environment.

## Base state permissions

At minimum, the role needs:

* `s3:ListBucket`, `s3:GetObject`, `s3:PutObject`, `s3:DeleteObject` on the Terraform state bucket;
* `dynamodb:GetItem`, `dynamodb:PutItem`, `dynamodb:DeleteItem`, `dynamodb:DescribeTable` on the lock table.

## AWS Secrets Manager credential-store permissions

When AWS Secrets Manager stores per-Kafka-cluster credentials, the role needs stage-scoped access to:

```text theme={null}
arn:aws:secretsmanager:<REGION>:<ACCOUNT>:secret:<stage>/*/clusters/*
```

Required actions:

```text theme={null}
secretsmanager:CreateSecret
secretsmanager:DescribeSecret
secretsmanager:GetSecretValue
secretsmanager:PutSecretValue
secretsmanager:TagResource
secretsmanager:GetResourcePolicy
secretsmanager:UpdateSecret
secretsmanager:DeleteSecret
secretsmanager:ListSecretVersionIds
```

> [!WARNING]
>
> `secretsmanager:GetResourcePolicy` is required. Terraform reads the secret policy on create/refresh; omitting it can fail the apply after the secret shell exists and before the secret value is written.

## AWS SSM credential-store permissions

When SSM Parameter Store stores per-Kafka-cluster credentials, grant the role stage-scoped access to:

```text theme={null}
arn:aws:ssm:<REGION>:<ACCOUNT>:parameter/<stage>/*/clusters/*
```

At minimum, grant `ssm:GetParameter` and `ssm:PutParameter`. Add KMS permissions if SecureString parameters use a customer-managed KMS key.

## GitHub Actions repository secrets

The generated workflow needs these repository secrets:

| Secret | Value |
| - | - |
| `AWS_ROLE_TO_ASSUME` | ARN of the GitHub Actions OIDC role. |
| `CONFLUENT_CLOUD_API_KEY` | Confluent Cloud OrganizationAdmin Cloud API key. |
| `CONFLUENT_CLOUD_API_SECRET` | Confluent Cloud OrganizationAdmin Cloud API secret. |

Do not put per-Kafka-cluster admin or observability Kafka credentials in GitHub repository secrets for the AWS-native credential-store path. Store those credentials in AWS Secrets Manager or SSM.

## Runtime pod read permissions are separate

The Sariva platform pod does not use the GitHub Actions role. If the runtime observability credential is in AWS Secrets Manager or SSM, configure the pod AWS identity on [Wire the pod's AWS identity](https://sariva.mintlify.site/install-setup/irsa.md).


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