Skip to main content
A cloud connection is how Ryvn acts in your AWS account, Google Cloud project or Azure subscription. It goes through an identity you create and control, and Ryvn stores no keys for it. Ryvn uses an environment’s cloud connection to provision, upgrade and deprovision that environment’s infrastructure. In Ryvn’s API and CLI, the connection is the environment’s access identity. Each environment has its own cloud connection. A cloud connection is separate from the agent’s infrastructure permissions, which the Ryvn agent uses from inside the cluster to run Terraform services. An audit export connection is another cloud connection: it uses the same mechanism to write audit records to your bucket.

How it works

Cloud connections use OIDC federation. Your cloud trusts your organization’s Ryvn issuer and accepts tokens for one subject, access-identity:<id>, where <id> is the access identity ID.
1

Setup (once)

You run the setup script from the dashboard. It creates the trust in your cloud: a trust for Ryvn’s issuer and an identity that only this subject can use. Running the script again updates the existing resources in place, including the provisioning role’s permissions on Google Cloud and Azure.
2

Sign

For each provisioning run, Ryvn signs an OIDC token with the subject access-identity:<id>. The token is valid for at most 30 minutes.
3

Verify

Your cloud checks the token’s issuer, audience and subject, then returns short-lived credentials for the identity the script created.
4

Expire

The credentials expire on their own. You can revoke the connection at any time by deleting the identity.

What an environment’s setup script creates

The script names each resource with your Ryvn hub’s resource prefix, shown as <prefix> below, and the first 8 characters of the access identity ID. The setup script shows the exact names. It is safe to run again.
  • IAM OIDC identity provider for your organization’s Ryvn issuer, with the audience sts.amazonaws.com. The script creates it or reuses an existing one, so environments in the same account share it.
  • IAM role <prefix>-provisioner-<first 8 of id>, one per environment. Its trust policy allows sts:AssumeRoleWithWebIdentity only when the token’s subject is access-identity:<id>. The role holds the provisioning permissions.
The script refuses to change a role that belongs to another access identity. It prints the role ARN; nothing needs to be pasted back into Ryvn.

Guarantees

  • No static keys. Ryvn stores no access keys, service account keys or client secrets for the connection.
  • Scoped to one environment. Your cloud accepts only the environment’s own subject, access-identity:<id>.
  • Short-lived credentials. Each provisioning run gets new credentials that expire on their own.
  • Revocable by you. Deleting the environment’s identity in your cloud stops Ryvn from getting new credentials.

Revoke a cloud connection

Ryvn also uses the cloud connection to deprovision the environment. To delete an environment, deprovision it first, then remove its identity. ryvn get teardown-script --access-identity-id <id> prints a script that removes the identity. It checks that your CLI targets the environment’s saved account, project or subscription before it deletes anything. Get the script before you delete the environment: it is no longer available afterwards. To remove the identity by hand, sign in to the environment’s account, project or subscription and delete it:
Run this with the AWS CLI signed in to the environment’s account; every account uses the same role name. Detach or delete the role’s policies first; IAM refuses to delete a role that still has them.
The IAM OIDC identity provider (AWS), the workload identity pool and provider (Google Cloud) and the <prefix>-provisioner resource group (Azure) are shared. Deleting them cuts off every environment in that account, project or subscription. If an audit export connection uses the same identity provider or pool, deleting it also stops audit export.
Credentials Ryvn already obtained stay valid until they expire. Ryvn cannot get new ones after you revoke the connection.