Skip to main content
Connect a bucket you own to receive Ryvn API audit logs for your organization. Each organization has one audit export connection to an S3 or GCS bucket. These records describe covered Ryvn API requests, not Kubernetes or cloud-provider activity. For those logs, see infrastructure auditing. Audit capture is best effort; this is not a complete record of every endpoint, authentication failure or malformed request. The exporter checks for new audit records about once a minute (54–66 seconds), leaving a 30-second settling delay for recent events. This is the polling cadence, not a guaranteed delivery time; backlogs and retries can delay delivery.

Before you begin

  • You need permission to manage integrations in Ryvn. Read access lets you inspect the connection; write access is required to create, test or delete it.
  • Have an existing bucket and credentials that can apply the generated permissions. Ryvn does not create the bucket.
  • S3: have the bucket’s commercial AWS region and the 12-digit ID of the AWS account that will own the export role. GovCloud and China regions are not supported. Use credentials that can create an IAM OIDC provider and role and attach a role policy. If you use an S3 KMS key, also have its key ARN.
  • GCS: have the project ID and project number that will own the service account and workload identity pool. The bucket must use uniform bucket-level access. Use credentials that can create workload identity pools and service accounts in the project and update the bucket’s IAM policy.
To enable audit export, create the connection, apply the setup script and successfully test access. If the service is unavailable, contact Ryvn support. Choose a short prefix such as audit/. Each slash-separated segment must be nonempty and contain only ASCII letters, digits, ., _ or -; . and .. cannot be entire segments. End the prefix with /. The maximum is 900 ASCII characters, but the backend may require a shorter prefix to leave room for the rest of each object key.

Configure the connection

1

Create the connection

Open Settings > Connections > Audit export. Choose S3 or GCS and enter the Bucket and Prefix. For S3, also enter Region, AWS account ID and, if needed, KMS key ARN. For GCS, enter Project ID and Project number.Click Create connection.
Creating the connection creates its access identity in Ryvn. The connection shows it as Access identity ID; your role or service account trusts it as the subject access-identity:<id>. Creating the connection makes no change in your cloud account, does not test bucket access and does not enable export. These settings cannot be changed later. Apply the returned setup next, then test access to enable audit export; no access test runs automatically.
2

Apply the setup

Review Setup script, then use Copy to paste it into your cloud shell, or Download to save it. The displayed text exactly matches Copy, including its quoted shell wrapper. Download saves the raw script returned by Ryvn without the wrapper.Sign in to the bucket’s account or project with permission to apply the changes. For a downloaded file, run sh ryvn-audit-export-setup.sh after reviewing it.
If setup is missing, stop and contact Ryvn support.Reading the connection or its setup does not change cloud access. The setup shows the exact role or service account name. It is your hub’s resource prefix, which is unrelated to the bucket prefix above, followed by -audit- and the first 8 characters of the access identity ID. The script is safe to run again; a second run makes no further changes.
  • S3: the script creates or reuses an IAM OIDC provider for your organization’s Ryvn issuer and creates the role. The role trusts only the connection’s access identity and can only create new objects under your prefix (s3:PutObject with If-None-Match). It cannot read, list or delete objects. If you set a KMS key, the role can also generate data keys for objects under the prefix; a key in another account also needs a key policy for the role.
  • GCS: the script creates or reuses a workload identity pool and OIDC provider for your organization’s Ryvn issuer and creates the service account. Only the connection’s access identity can impersonate the account, which gets roles/storage.objectCreator on objects under your prefix. For bucket CMEK, grant the key to the bucket project’s Cloud Storage service agent, as the setup describes.
The script stops before changing anything if the role or service account belongs to another access identity, or if a workload identity provider with the same name trusts a different issuer, including a soft-deleted one. A different issuer means another Ryvn organization or hub uses that project; use another project.An audit export connection is a cloud connection; see that page for how the token exchange works.Trust and provider conditions match only the issuer, audience and subject. Conditions on other token claims or session tags, such as the connection ID, are not supported.If your organization restricts allowed workload identity pool providers with the iam.workloadIdentityPoolProviders constraint, allow your organization’s Ryvn issuer URL shown in the setup. If it uses domain-restricted sharing (iam.allowedPolicyMemberDomains), allow your Google Cloud organization’s principal set (is:principalSet://iam.googleapis.com/organizations/ORGANIZATION_ID), which includes workload identity pools in its projects, so the impersonation binding can be added.
3

Test access

Return to the connection and click Test access.
The test writes a unique object under <prefix>.ryvn-probe/. It leaves the object in your bucket for you to remove. A successful test enables audit export for your organization; it does not confirm that audit records have arrived. Check status and your bucket separately.

Status and troubleshooting

Use Refresh on the connection page or ryvn describe connection --type audit-export to read the latest returned status. Add -o json for structured output. The dashboard and CLI show the returned status and Reason without inferring success from activity or a successful access test. Other returned values are shown as received. Processed through (exclusive) is a historical processing boundary: it excludes the timestamp shown and may come from a previous destination. It does not prove that every event reached the current bucket. Expired interval start/end bound gaps in retained history; they do not mean every moment between them is missing or give an event-loss count. Delivery health is not currently reported for this connection. A successful access test confirms write access. To check delivery, look for exported .jsonl.gz files under your configured bucket prefix. If expected records are missing, contact Ryvn support. If an access test fails, read Reason and the test error, check the bucket, prefix and generated permissions, and allow IAM changes to propagate before retrying. For S3, confirm the region, the role and OIDC provider from the setup and any KMS requirements. For GCS, confirm uniform bucket-level access, the workload identity provider and the exact service account shown in setup. If a prefix is rejected for object-key length, use a shorter prefix. Export starts when the connection is created; records from before that are not exported. Exports are limited to the applicable log-retention period; outages do not extend it. Capture can miss records before export. Exports are gzip-compressed JSON Lines (.jsonl.gz) under your configured prefix, with one audit_log.v1 record per line. Records of the exporter obtaining its own credentials to write to your bucket (workload_identity.issue with operation audit-export) are not exported; they remain in Ryvn’s audit log. Other workload_identity.issue records are exported. Duplicate records are possible; deduplicate by eventId. You control retention and processing after delivery to your bucket.

Export object layout

Objects use this key layout under your configured prefix:
For example:
Timestamps are UTC with exactly nine fractional digits. The interval is the actual source-read window, inclusive of its start and exclusive of its end, not the first and last event timestamps in the file. Multiple objects can cover the same or overlapping time windows, and records can appear in more than one object. Deduplicate by eventId when processing files.

Replace or delete the connection

Deleting the connection disables audit export for your organization. Changing the bucket, prefix or other destination settings requires deleting and recreating the connection. Changing destinations keeps saved export progress; it does not restart the full history in the new bucket. A connection recreated later continues from that saved progress; records older than the retention period are reported as an expired interval. Some recent records may be repeated.
Open the connection menu and click View teardown script, then save or run it. Click Delete connection, then Confirm delete. To replace it, create the new connection, apply its setup and test access again.
Deletion removes the connection and retires its access identity, so Ryvn can no longer obtain credentials for it. Nothing in your cloud account changes: your bucket, data, role or service account, OIDC provider or workload identity pool and bucket binding remain. The teardown script removes the role and its policy, or the service account, its workload identity binding and its bucket binding. It leaves the shared OIDC provider or workload identity pool. Run it before or after deleting; Ryvn only returns it while the connection exists. A new connection gets a new access identity and a new role or service account name, so apply its setup before testing.