Connectors

Connect Azure

One paste into Azure Cloud Shell gives your connector a role. It finds the subscription itself. No secrets.

Your connector runs the actions you allow or approve in your Azure subscription with its own identity (a managed identity, typically). Your agents never hold Azure credentials, no secret is created or stored, Tracehold's cloud cannot act in your subscription, and nothing is pasted into Tracehold: the connector finds the subscription it has a role on, tests it, and reports it.

With the Container Instances installer: nothing to do#

The connector's installer on Azure (Connectors → Add connector → Azure) gives the connector's identity its role on the subscription too. When the connector starts, Connectors shows the subscription under Accounts your connector acts in. The rest of this page is for a connector running anywhere else.

Before you start#

  • A connector that acts in Azure: running with an identity of its own (Azure Container Instances or AKS with a managed identity, or the usual Azure environment variables), with TRACEHOLD_CONNECTOR_CLOUDS including azure. Connectors shows its Azure object ID once it calls in.
  • Sign in to the Azure portal as someone who can assign roles on the subscription (for example Owner).

Connect#

Open Connectors in Tracehold and scroll to Accounts your connector acts in.

  1. Give your connector a role

    Click Open Azure Cloud Shell, choose Bash, paste the command shown and press Enter. It uses your current subscription (to pick another, run az account set --subscription NAME first) and gives your connector's identity the role you chose on it.

  2. Your connector finds it

    The connector looks every minute for the subscription it has a role on; click Check now to have it look straight away. It reads the subscription once with its own identity; nothing is recorded unless that works.

If the connector can reach more than one subscription, set TRACEHOLD_CONNECTOR_AZURE_SUBSCRIPTION where it runs to the one Tracehold should act in.

Permissions#

OptionYour connector can
Contributor (default)Read and write, but not assign roles (Contributor)
ReaderRead only (Reader). Azure refuses writes, even approved ones.

Each call gets its own token for the one Azure API the action uses (Resource Manager, Storage or Key Vault). Azure decides how long the token is valid (usually about an hour) and it cannot be limited to one operation, so the role decides what it can do. The connector uses it for that one call and never passes it on; Audit → One-call keys shows its real expiry.

Remove it#

Delete the connector's role assignment under the subscription's Access control (IAM). Nothing can then run in the subscription.

If something goes wrong#

Connectors shows what each connector found, or why it found nothing:

What you seeWhat to do
"Add a connector with an identity in Azure first"Start a connector with a managed identity and TRACEHOLD_CONNECTOR_CLOUDS including azure.
"has no role on any Azure subscription yet"If you just ran the command, wait a minute and check again. Otherwise run it again.
"can reach N subscriptions"Set TRACEHOLD_CONNECTOR_AZURE_SUBSCRIPTION where the connector runs.
"could not list its Azure subscriptions"The connector has no Azure identity where it runs. Check its managed identity or Azure environment variables.
Cloud Shell says insufficient privilegesYour account cannot assign roles. Ask an Azure administrator.

Azure has been tested against Azure's REST definitions with simulated responses, not yet against a live subscription.