many-forest-60185
12/27/2025, 5:41 AMtall-airline-16756
12/27/2025, 5:41 AMtall-airline-16756
12/27/2025, 5:41 AMGOOGLE_APPLICATION_CREDENTIALS to the path of that JSON file in the agent’s environment. The Google Cloud libraries used by LiveKit plugins will pick this up automatically.
◦ In LiveKit Cloud you can store the JSON as a file-mounted secret and set the env var to the mounted path.
• Option B — Pass credentials directly to the plugin (useful for programmatic/ephemeral credentials)
◦ Load the JSON into memory and pass it as credentials_info (a dict/object) or set credentials_file="/path/to/key.json" when constructing Google plugins (STT/TTS or other Google integrations) in the agent.
◦ Example: provide the JSON fields (type, project_id, private_key, client_email, etc.) to the plugin API so it authenticates without relying on env vars.
3) Configure egress to target GCS
• When starting composite egress (TrackCompositeEgress or RoomCompositeEgress), specify the output bucket.
• Use the S3-style output configuration but supply your GCS bucket name; access/secret fields can be left empty when using a service account credential.
• Ensure the service account has Storage Object Creator permission for that bucket and any prefix you use.
4) Security best practices
• Never commit the JSON key to source control.
• Store the JSON in a secret store or file-mounted secret; avoid plaintext in code.
• Use least privilege: grant only required permissions to the service account.
• Rotate keys periodically and revoke old keys.
• Prefer short-lived credentials or workload identity where possible (if you run in GKE/GCE, consider using Workload Identity or instance service accounts instead of long-lived JSON keys).
If you’d like, tell me:
• Where you run the agent (LiveKit Cloud, GKE, VM, etc.) so I can give exact steps for storing the file or setting the env var there.
• Whether you prefer file-mounted secrets or passing credentials in code — I’ll provide the exact config/snippet for your environment. Sources: Google Gemini LLM plugin guide | LiveKit docs | Google Cloud TTS integration guide | LiveKit docs | Google Cloud STT plugin guide | LiveKit docs | server-sdk-ruby | livekit/livekit_composite | DeepWikimany-forest-60185
12/27/2025, 5:43 AMtall-airline-16756
12/27/2025, 5:44 AMGOOGLE_APPLICATION_CREDENTIALS (OAuth) for direct GCS uploads.
◦ Short‑lived credentials, signed URLs, or backend upload on egress_ended webhooks to avoid long‑lived keys.
Questions to tailor guidance
• Where does your agent run (LiveKit Cloud, GKE, GCE, VM)? I can give exact steps for secret storage and env var/config setup.
• Do you need S3 compatibility for other tooling, or can you switch to direct GCS auth (service account or signed URLs)?
Tell me those two details and I’ll give the exact configuration snippet and recommended IAM policy for your chosen path.
Sources: Universal Egress | Data Processing Addendum | LiveKit | Server-side | livekit/livekit_composite | DeepWiki | server-sdk-ruby | livekit/livekit_composite | DeepWiki