Skip to content
AnchrasDocumentation
Browse documentation

Integrations / User guide

Cloud and infrastructure

Available

Microsoft Azure

Connect Microsoft Azure subscriptions to Anchras for cloud instance management.

On this page

Connect Microsoft Azure subscriptions to Anchras for cloud instance management, with a client secret or keyless through a federated identity credential.

Before you begin

Create a service principal and grant the required resource permissions in the intended subscription. Record the secret expiry so it can be rotated before connections fail. If your organization forbids client secrets, connect keyless instead (see Keyless: federated identity credential): nothing secret is stored and nothing expires. You need permission to manage integrations in the intended Anchras organization.

Connection settings

SettingWhat to enter
Display nameA recognizable name for this account or environment.
Tenant IDThe Microsoft Entra tenant that owns the service principal.
Client IDApplication ID of the service principal.
Client secretThe secret value, not its identifier.
Subscription IDSubscription containing the target resources.
Default regionAn available Azure region, such as westeurope.

Keyless: federated identity credential

Keyless accounts store no secret. Anchras is an OpenID Connect issuer: for each exchange it signs a five-minute token for the one cloud account and presents it to Microsoft Entra ID as the client assertion of your app registration or user-assigned managed identity. Entra ID accepts it only through a federated identity credential whose issuer, subject and audience match, and the subject names your organization and the cloud account, so a credential you configure for one account accepts no other account's tokens.

SettingWhat to enter
Credential typeKeyless (workload identity).
Tenant IDThe Microsoft Entra tenant (directory) ID.
Client IDThe application (client) ID of the app registration or managed identity.
Subscription IDOptional. Without it the account is identified by its tenant and only validates that the exchange works; compute and Kubernetes need a subscription.

The connection form (or anchras cloud-accounts workload-identity-setup --provider azure) shows the values and reserves the account's ID.

  1. On the app registration (Certificates & secrets > Federated credentials) or the user-assigned managed identity (Federated credentials), add a credential for Other issuer:
  2. Issuer: the issuer URL Anchras shows, ending in /workload-identity. Entra ID fetches its discovery document and keys over public HTTPS (see Private and air-gapped installations).
  3. Subject identifier: the org:…:cloud-account:… subject Anchras shows.
  4. Audience: api://AzureADTokenExchange.
  5. Grant the identity the roles it needs on the subscription.
  6. Save the account in Anchras with the same setup (the form carries the reserved ID; the CLI takes --account-id). Validation exchanges a token and reads the subscription.
bash
anchras cloud-accounts workload-identity-setup --provider azure
anchras cloud-accounts create --region eu-west --provider azure --display-name azure-prod --default-region westeurope \
  --account-id <account_id> --azure-workload-identity \
  --azure-tenant-id <tenant_id> --azure-client-id <client_id> --azure-subscription-id <subscription_id>

Anchras rotates its signing keys monthly and publishes each new key a day before it signs, so Entra ID never sees an unknown key.

Private and air-gapped installations

Entra ID has no way to upload a federated credential's keys: it always fetches them from the issuer URL over public HTTPS. If your Anchras server is not reachable from the internet, publish the two documents at a static location you own that is, such as an Azure Storage static website, and make that location the issuer:

  1. Set ANCHRAS_WORKLOAD_IDENTITY_ISSUER_URL on the server to the HTTPS address the documents will have, ending in /workload-identity (for example https://oidc.example.eu/workload-identity). Do this before you configure any keyless account: changing the issuer URL breaks every credential configured with the old one.
  2. Run anchras cloud-accounts workload-identity-jwks --out-dir ./anchras-issuer and publish the directory at that address, so that <issuer>/.well-known/openid-configuration and <issuer>/jwks.json serve the two files byte for byte, as application/json.
  3. Configure the federated credential with that issuer, as above.

Anchras does not keep the copy in sync for you. Run the export at least daily and republish when it reports rotation_pending: the successor key must be published before the time it shows, or Entra ID refuses the tokens it signs. The JSON output (-o json) carries rotation_pending and successor_activates_at for scripting.

Connect to Anchras

  1. Open Microsoft Azure in the console and start the cloud account connection.
  2. Enter the fields above for the account that should own the resources. Select a supported default region where the form offers one.
  3. Save the account and inspect credential validation. Resolve authentication errors before configuring dependent resources.
  4. Choose the account in the relevant Anchras service and confirm that the required resource profile or storage option is available.

Verify the connection

Check the account identity and validation result in Anchras. Then perform a small resource operation in the target service and inspect its completed state in both Anchras and the provider. Remove test resources after verification; provider charges may apply while resources exist.

Availability and limits

Azure infrastructure credentials and Microsoft Entra SSO are separate integrations. Connecting a subscription does not configure user sign-in.

Troubleshooting

Check the tenant/subscription pairing, service-principal role assignments and secret expiry. Region and resource quotas are evaluated separately from authentication.

  • Entra ID refused the Anchras token (keyless): the federated credential's issuer, subject or audience does not match what the setup shows, it is on a different app or identity than the client ID, or Entra ID cannot reach the issuer URL over HTTPS. Compare it with anchras cloud-accounts workload-identity-setup --provider azure --account-id <id>.

Operate and disconnect

Rotate credentials through the protected account configuration and revalidate afterward. You can rotate a secret-based account to keyless with the same subscription: add the federated credential for the account's existing ID, then rotate its credentials. Revoke keyless access by deleting the federated credential. Before removing the connection, identify workloads and storage that depend on it. Disconnecting an account is not the same as deleting resources at the provider.