Set up APC audit log shipping
This document explains how to enable the Astro Private Cloud (APC) audit log sidecar and ship events to one supported sink. For background on what the feature does and which configurations are supported, see APC audit logging overview.
Exactly one sink can be enabled per installation for this release. Enabling the sidecar with zero or more than one sink causes a Helm validation error.
Prerequisites
- An Astro Private Cloud 2.x installation that you can upgrade with Helm.
- Access to the Helm values file used by the installation.
kubectlconfigured against the target cluster.- Permissions to create or modify cloud resources for the sink you choose:
- CloudWatch on EKS: permissions to create IAM policies and roles, and a CloudWatch log group.
- GCP Cloud Logging on GKE: permissions to create Google service accounts and grant IAM bindings in the target project.
- Elasticsearch: a reachable endpoint and, if required, credentials and a CA certificate.
Choose a sink
Use the AWS CloudWatch Logs sink when the Astro Private Cloud control plane runs on Amazon EKS. Use the GCP Cloud Logging sink when it runs on Google Kubernetes Engine (GKE). Use the Elasticsearch sink on Amazon EKS, GKE, or Azure Kubernetes Service (AKS).
AWS CloudWatch Logs
GCP Cloud Logging
Elasticsearch
Use this sink when the Astro Private Cloud control plane runs on Amazon EKS. The recommended authentication method is IAM Roles for Service Accounts (IRSA). Static AWS credentials held in a Kubernetes secret are supported as a fallback when IRSA isn’t in use on the EKS cluster.
Prerequisites
- The Astro Private Cloud control plane runs on Amazon EKS.
- The AWS CLI is installed and authenticated against the target account.
- For the IRSA path, the EKS cluster has, or can be associated with, an OIDC identity provider.
- For the static-credentials path, an IAM principal with permission to write to the target CloudWatch log group.
Environment variables
The following variables are referenced throughout this section. Set them to match your installation before running the commands.
Configure IRSA (recommended)
Configure static AWS credentials (fallback)
Use this configuration on EKS when IRSA isn’t in use.
Verify
After the upgrade completes, confirm that the Vector sidecar is running and that audit events are reaching CloudWatch:
Perform any action that the APC API audits, such as creating a Workspace, and confirm a matching event appears in the log group within a few seconds.
Disable audit log shipping
To stop shipping audit events, set the sidecar to disabled and run helm upgrade:
helm upgrade removes the Vector sidecar from the next Pod restart. The APC API continues to emit audit events to standard output, so you can still inspect recent events with kubectl logs on the APC API and APC Worker Pods.
Common issues
Helm reports 'supports exactly one sink at a time'
The sidecar is enabled with more than one sink. Edit the values file so that only one of cloudwatch.enabled, gcpCloudLogging.enabled, or elasticsearch.enabled is true, then run helm upgrade again.
Helm reports 'requires at least one supported sink'
The sidecar is enabled but no sink is selected. Set one of cloudwatch.enabled, gcpCloudLogging.enabled, or elasticsearch.enabled to true, or set loggingSidecar.enabled to false.
Helm reports a required GCP Cloud Logging value is missing
gcpCloudLogging.projectId, gcpCloudLogging.resource.location, and gcpCloudLogging.resource.clusterName are required when GCP Cloud Logging is enabled. Whitespace-only values are also rejected. Set all three to concrete values and run helm upgrade again.
Vector reports AccessDenied errors on CloudWatch
The IAM principal that Vector uses can’t write to the target log group.
- For IRSA, check that the IRSA role trust policy names the correct OIDC provider, namespace, and service account, and that
HoustonCloudWatchLogsPolicyis attached to the role. Also verify that theeks.amazonaws.com/role-arnannotation onhouston.serviceAccount.annotationspoints to the same role ARN. - For static credentials, check that
houston-cloudwatch-credscontains validaws_access_key_idandaws_secret_access_keyvalues and that the corresponding IAM user or role is allowed to write to the target log group.
GCP Cloud Logging rejects entries with HTTP 400
The monitored resource is invalid. Confirm that resource.type is k8s_container, and that resource.location and resource.clusterName match the GKE cluster as it appears in Cloud Logging.
Vector can't connect to Elasticsearch
Check that endpoint is reachable from within the cluster and that, if TLS is in use, the CA certificate in caSecretName signs the server certificate presented by the endpoint. If basic auth is enabled, verify that the username and password in houston-elasticsearch-creds are correct.
Next steps
- For a field-by-field description of each value under
houston.logging.loggingSidecar, see Audit logging configuration reference. - For the shape of each audit event and the list of audited operations, see Audit log schema and operations.