Onboard Microsoft Azure
Let Ringleader run workstation VMs in one of your Azure resource groups, with a custom role and no client secret.
Let Ringleader run workstation VMs in one of your Azure resource groups, with a custom role and no client secret. Use this when you want workstations on your bill and inside your network.
Prerequisites
- Ringleader installed, for the
rlcommands in the last two tasks. - Two values from Ringleader, which you receive when your organization is set up: the issuer URL, written with no trailing slash, and your organization’s id, a UUID and never its name. If you do not have them, ask us. Fix a sign-in that your cloud refuses says what to check if Entra rejects them.
- A resource group for the workstations, which you create first. The module and the script do not. Use a new, empty one that holds nothing else. Workstations are billed to it, and everything Ringleader may do is limited to it. A dedicated resource group keeps the bill and the risk in one place.
- Permission to create an app registration in your Entra tenant, for this setup only.
- The subscription feature
Microsoft.Compute/UseStandardSecurityType, registered on the subscription. Someone with Contributor or Owner on the subscription registers it once. Register the subscription feature shows how. - The examples use the resource group
ringleader-workstationsand the CloudAccountmy-azure-account. Replace them with yours.
Register the subscription feature
Ringleader creates VMs with securityType=Standard, because the Trusted Launch default does not
allow the nested virtualization that workstations rely on. Without this feature, every VM create
fails: everything else looks right, and no workstation ever starts. Register it once per
subscription.
Register the feature:
az feature register --namespace Microsoft.Compute --name UseStandardSecurityTypePoll until the state is
Registered. This can take several minutes.az feature show --namespace Microsoft.Compute --name UseStandardSecurityType \ --query properties.state -o tsvPropagate the registration:
az provider register --namespace Microsoft.ComputeConfirm that your chosen region has capacity for the VM size you intend to use. Without it, every create returns
SkuNotAvailable.
Set up keyless access
Onboarding creates the identity Ringleader signs in as, a custom role and its assignment on your resource group, and the federated credential that lets Entra accept Ringleader’s tokens. It can also create a network. The Microsoft Azure permissions and resources page lists everything it creates and why it is safe.
Choose the tool your team already runs. All three do the same thing, and the ARM and Terraform paths live in github.com/ringleader-dev/cloud-onboarding. Both finish by printing the values you send back in the next task.
ARM
An ARM template cannot create an app registration or a federated credential, because they live in
Entra and not in a resource group. A script creates them with az, then deploys the role, its
assignment and the network as templates.
Clone the repository and change into the ARM folder:
git clone https://github.com/ringleader-dev/cloud-onboarding cd cloud-onboarding/azure/armSet the variables.
SSH_SOURCE_CIDRadds an SSH rule of your own for the addresses your engineers connect from. Cloud accounts and reachability says who can connect without it.export RG=ringleader-workstations # the resource group you created export ISSUER_URL='https://oidc-app.ringleader.dev' export ORG_UID='0192f5bf-af83-7178-8d0a-f1c7aea06bde' export SSH_SOURCE_CIDR=203.0.113.0/24 # where your engineers connect fromSign in to Azure:
az loginRun the script. It prints the values to send back. It is safe to run again if something goes wrong partway.
./deploy.sh
Names for a second resource group in the same tenant
deploy.sh takes two more optional variables, and both matter as soon as a second
resource group in the same Entra tenant is onboarded (a second team, a second
environment, prod alongside dev). Left at their defaults, one fails loudly and the
other fails silently:
export APP_NAME='Ringleader Admin (team-b)' # default: ringleader-workstations
export ROLE_NAME='Ringleader Workstation Operator (team-b)' # default: Ringleader Workstation OperatorROLE_NAME. Azure requires a custom role’s display name to be unique across the whole tenant, even when the roles are scoped to different resource groups. Re-using the default for a second onboarding fails the deployment withRoleDefinitionWithSameNameExists.APP_NAME.deploy.shfinds its app registration by display name and reuses the first match, which is what makes re-runs safe. Left at the default, a second onboarding silently adopts the first onboarding’s application and adds the new federated credential to it, so two boundaries end up sharing one identity. Name the application per team or per environment and the lookup stays honest.
One resource group in a tenant needs neither variable.
Terraform
Terraform creates everything, end to end.
Clone the repository and change into the example folder:
git clone https://github.com/ringleader-dev/cloud-onboarding cd cloud-onboarding/azure/terraform/examples/standaloneCopy the example variables file:
cp terraform.tfvars.example terraform.tfvarsIn
terraform.tfvars, set your subscription id, the resource group you created and the two values from Ringleader. Uncommentssh_source_rangesand list the addresses your engineers connect from.Sign in to Azure:
az loginApply the module:
terraform init && terraform applyPrint the values to send back:
terraform output handoff
The portal
The portal gives the same result without deploy.sh. The app registration and its federated
credential live in Entra, so you create them in the Entra portal. The role and its assignment are
one template, which you deploy to the resource group.
Clone the repository, which holds the template you deploy in step 5:
git clone https://github.com/ringleader-dev/cloud-onboardingCreate the application. In Microsoft Entra ID, go to App registrations and choose New registration. Give it a name, choose Accounts in this organizational directory only, and register. Copy the Application (client) ID, which is the application client id you send back.
Add the federated credential. On that application, go to Certificates & secrets, then Federated credentials, choose Add credential and pick the scenario Other issuer. Enter these values, with no trailing slash on the issuer:
Field Value Issuer <issuer-url>/org/<org-id>Subject identifier org:<org-id>Name ringleader-oidcAudience api://AzureADTokenExchangeAll three of issuer, subject and audience must match exactly.
Find the service principal’s object id. In Microsoft Entra ID, go to Enterprise applications, open your application and copy its Object ID. This is not the client id, and it is the value the template wants.
Deploy the role. In the portal search, choose Deploy a custom template, then Build your own template in the editor, load
azure/arm/azuredeploy.jsonfrom the repository you cloned and choose Save. Choose your resource group, because the template is resource-group scoped, and setprincipalIdto the object id from step 4. The template defaultsenableWorkstationIdentitiesto true, so set it to false unless you use Cloud runtime identities.
If you are onboarding a second resource group in this tenant, give roleName a distinct value in
step 5, as the note under ARM explains.
Send the values to your organization administrator
Send the values that Values you hand back lists to whoever administers Ringleader for your organization, which may be you. They are public identifiers, and no secret is among them. How Ringleader uses them is in Keyless cloud access.
Create the CloudAccount
An organization administrator records which application Ringleader signs in as by creating a CloudAccount. The Spec fields table lists every field.
Save this as
my-azure-account.yaml, with your organization, application client id and tenant id:apiVersion: core.ringleader.dev/v1 kind: CloudAccount metadata: name: my-azure-account spec: org: acme provider: azure azure: # The Entra application (client) id that holds the workstation permissions on # your resource group, and whose federated identity credential trusts # Ringleader's per-organization issuer. targetAppClientId: ec6d0a82-536f-463e-baa5-a10221befa86 # Your Azure AD tenant. tenant: bb90f2d3-842d-41ea-8c0c-0e6671775ef7Apply it. Apply it before the CloudIdentity that references it. A multi-document
applyorders them for you.rl apply -f my-azure-account.yamlList the account to confirm it exists. The alias is
rl ca get.rl cloudaccount get
Create the CloudIdentity from the remaining values, as CloudIdentity describes.
Check the setup
Check the Azure side first, then Ringleader’s use of it. Replace <client-id> with the application
client id.
Confirm that the federated credential accepts only Ringleader’s tokens, for your organization:
az ad app federated-credential list --id <client-id> \ --query "[].{name:name, issuer:issuer, subject:subject, audiences:audiences}"Confirm that the custom role has exactly the actions that Microsoft Azure permissions and resources lists. If you set a custom
ROLE_NAME, pass that name instead of the default.az role definition list --name "Ringleader Workstation Operator" \ --query "[0].permissions[0].actions" -o tsvConfirm that the application holds that role on your resource group, and nothing else:
az role assignment list --assignee <client-id> \ --resource-group ringleader-workstations \ --query "[].roleDefinitionName" -o tsvAfter an administrator has created the CloudAccount and the CloudIdentity from the values you sent, wait for the CloudIdentity to be ready. Do this before anyone creates a workstation. Replace
azureanddevwith the CloudIdentity’s name and namespace:rl cloudidentity wait azure -n dev --for Ready --timeout 2mRead its status:
rl cloudidentity get azure -n dev -o yamlstatus.valid: truemeans Ringleader can use the identity.
Optional: Revoke Ringleader’s access
Revoking removes Ringleader’s ability to act in your resource group. Skipping it keeps the access in place. Once you delete the federated credential or the application, Ringleader can get no new Azure token. A token it already holds can work until it expires, usually within 90 minutes.
To remove Ringleader’s access but keep the application:
az ad app federated-credential delete --id <client-id> \
--federated-credential-id ringleader-oidcTo remove the application entirely:
az ad app delete --id <client-id>Both of these leave the custom role and its assignment behind. Delete them with
az role assignment delete and then az role definition delete, using your role name and the scope
/subscriptions/<subscription-id>/resourceGroups/<resource-group>. If your subscription also has a
role from an earlier setup,
A role on your subscription
shows how to delete it.
If you set up with Terraform, run terraform destroy, which removes everything it created.
There is no client-secret alternative
CloudIdentity naming one is refused at apply. The keyless setup on this page is the
only one.Troubleshoot
If a workstation fails to create with AADSTS700211: No matching federated identity record found
on its status, one of the three values Entra checks does not match. Compare them against what was
created, starting with the trailing slash. Entra compares the issuer character for character.
Checks Entra makes lists the three
values.
If every workstation fails to create, and everything else looks right, the subscription feature is probably not registered. Follow Register the subscription feature.
If a create returns SkuNotAvailable, your region has no capacity for the VM size. Choose a
region that has it.
If the deployment fails with RoleDefinitionWithSameNameExists, a second onboarding in the same
tenant reused the default role name. Set ROLE_NAME, as the note under ARM shows.
If Terraform stops with Unsupported argument on enable_machine_type_list, your configuration
sets a switch the module no longer has. Delete it as
A role on your subscription
shows, then apply again.
If status.valid is false, Ringleader cannot use the identity. Run
rl cloudidentity describe azure -n dev to see why, replacing azure and dev with the
CloudIdentity’s name and namespace. The usual causes are a wrong application client id or a mismatch
in one of the three values Entra checks.
Next steps
- Microsoft Azure permissions and resources explains what onboarding created, what the role allows and what you handed back.
- Cloud accounts and reachability explains who can reach your workstations, and how public addresses work.
- Cloud runtime identities explains how to give workstations an Azure identity of their own.
- Storage buckets explains how to keep session transcripts and uploaded files in your resource group.