IAM for Audit Server on Amazon EKS (IRSA) in a Self-Managed Deployment¶
When Audit Server runs on Amazon EKS and needs to call AWS (for example, sending audits to Amazon SQS), use IAM Roles for Service Accounts (IRSA) instead of static access keys.
Create the IAM role and policies in your AWS account, then provide the role ARN to Privacera Manager. Manager annotates the Audit Server ServiceAccount with eks.amazonaws.com/role-arn so the pod receives short-lived credentials through the AWS SDK default chain.
This is applicable only for self-managed deployments. For PrivaceraCloud, please reach out to your contact at Privacera.
Related topics
Send Audits to Amazon SQS describes queue configuration through Audit Server (vars.auditserver.yml).
Prerequisites¶
| Prerequisite | Description |
|---|---|
| EKS OIDC provider | The cluster has an OIDC identity provider registered in IAM for IRSA. |
| IAM role | A role whose trust policy allows sts:AssumeRoleWithWebIdentity for your cluster OIDC issuer and the Audit Server ServiceAccount. |
| IAM permissions | Policies attached to that role for the AWS services Audit Server needs to call (for example, Amazon SQS). |
ServiceAccount name¶
Privacera Manager creates a dedicated ServiceAccount named auditserver-<workload-sa>. With the default workload service account privacera-sa, the name is auditserver-privacera-sa.
Use this subject in the IAM trust policy:
system:serviceaccount:<K8S_NAMESPACE>:auditserver-privacera-sa
IAM policy templates¶
Replace the angle-bracket placeholders with your AWS account ID, region, EKS OIDC ID, queue ARN/prefix, and Kubernetes namespace.
Trust policy¶
SQS permission policy¶
Only sqs:SendMessage is required to publish audits. The other actions are included for operators who need to inspect or clean up the queue from inside the Audit Server pod, and can be removed if your security model does not allow them.
Configure Privacera Manager¶
Set these variables in custom-vars/vars.auditserver.yml (copy from sample-vars/vars.auditserver.yml if needed):
| Property | Description |
|---|---|
AUDITSERVER_USE_POD_IAM_ROLE | Set to "true" to use the dedicated Audit Server ServiceAccount for IRSA. |
AUDITSERVER_IAM_ROLE_ARN | ARN of the IAM role you created (for example, arn:aws:iam::<AWS_ACCOUNT_ID>:role/<ROLE_NAME>). |
Then apply the change with Privacera Manager and restart Audit Server.
Validation¶
Verify that the IAM role is attached to the Audit Server pod through its ServiceAccount:
| Bash | |
|---|---|
The command returns the ARN you set in AUDITSERVER_IAM_ROLE_ARN.