> ## 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.

# RBAC

> What Kubernetes permissions the Sariva platform pod gets, and how to scope or replace them.

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

The Helm chart grants the Sariva platform pod's ServiceAccount the **minimum** Kubernetes API permissions its runtime actually uses — nothing more.

## What the chart grants

With `rbac.create: true` (default), the chart renders a `Role/<release>-secrets-reader` + binding in the release namespace: **`get` on `secrets`** only — no `list`, `watch`, or `create`. The secret loader does a single keyed GET on demand for any cluster registered with a release-namespace `k8s://` reference, and for the cluster reachability probe (credential resolution before its live connection check).

That `get` is the **only** permission the pod strictly needs. Without it the API server returns `403 ... cannot get resource "secrets"` and every `k8s://`-backed cluster is unusable.

> [!NOTE]
>
> **Pod-health monitoring needs no RBAC here.** The pod-health adapter reaches your app clusters via a cross-account AWS STS `AssumeRole` into the `sariva-eks-reader` IAM role, then calls the target EKS API with a short-lived presigned token. Authorization lives in the *target* cluster's access entries and that IAM role — never in this chart. So no app-namespace RBAC is required for monitoring, even when apps share the Sariva platform's cluster.

## `rbac.appNamespaces` (forward-provisioning)

Empty by default — correct for current releases. When the in-cluster K8s Informer feature lands, you'll grant the pod read access to app namespaces by listing them:

```yaml theme={null}
rbac:
  create: true
  appNamespaces: [apps, payments]
```

Each listed namespace gets a `Role/<release>-pod-reader` granting **`get`, `list`, `watch` on `pods` and `events`** — read-only.

> [!WARNING]
>
> Leave the list **empty** until the Informer feature is announced — populating it earlier grants permissions nothing consumes, which a security review will flag.

## Opt out — bring your own RBAC

Set `rbac.create: false` and the chart renders no Role/RoleBinding; you then grant `get secrets` in the release namespace yourself:

```yaml theme={null}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata: { name: byo-secrets-reader, namespace: <release-namespace> }
rules:
  - { apiGroups: [""], resources: ["secrets"], verbs: ["get"] }
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata: { name: byo-secrets-reader, namespace: <release-namespace> }
roleRef: { apiGroup: rbac.authorization.k8s.io, kind: Role, name: byo-secrets-reader }
subjects:
  - { kind: ServiceAccount, name: <platform SA>, namespace: <release-namespace> }
```

Installs using only AWS Secrets Manager / SSM (pod-identity-backed) never touch this path — but `rbac.create: true` stays harmless for them (one in-namespace `get`).

## Verify

```bash theme={null}
kubectl auth can-i get secrets    --as=system:serviceaccount:<release-ns>:<sa> -n <release-ns>   # yes
kubectl auth can-i delete secrets --as=system:serviceaccount:<release-ns>:<sa> -n <release-ns>   # no
kubectl auth can-i create secrets --as=system:serviceaccount:<release-ns>:<sa> -n <release-ns>   # no
```


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