Skip to content

ADR 0012 — Cluster workload / managed identity for Azure egress

Status: Accepted (first slice: Azure Service Bus)
Date: 2026-08-10 (accepted 2026-08-14)
Related: #128, Logic Apps Standard import, Egress Azure Service Bus, Egress HTTP, Secrets management


Context

Azure Logic Apps often call Azure APIs with Managed Identity (MSI). MeshFlows clusters typically use connection secrets ($secret:) and provider credentials instead. Operators migrating from Logic Apps asked whether a cluster-equivalent identity is worth pursuing.

Product choice (#128): Azure AD Workload Identity federated to a user-assigned managed identity. System-assigned MI is not the primary model.


Decision

  1. Identity on the pod, not a long-lived secret in storage. Egress pods that talk to Azure obtain short-lived Entra tokens via Kubernetes workload identity (projected federated token + DefaultAzureCredential). Connection documents choose the auth mode; they do not embed MSI resource IDs from Logic Apps.
  2. User-assigned MI + Azure Workload Identity is the supported shape: ServiceAccount annotation azure.workload.identity/client-id, pod label azure.workload.identity/use: "true". Optional connection field client_id selects the same UAMI when the pod env does not already set AZURE_CLIENT_ID.
  3. SAS / connection strings remain valid. Workload identity is opt-in per connection (and per trigger-subscriber env). On-prem and secret-only clusters are unchanged.
  4. Not a Logic Apps compatibility layer. Import still records MSI nodes as a P2 gap. Operators map those workflows onto MeshFlows connections (auth: workload_identity + namespace), not onto Azure identity resource IDs inside workflow JSON.
  5. First implementation slice: Azure Service Bus topics / subscriptions / trigger subscriber. Later Azure connectors (HTTP to ARM, Blob, Event Hubs, …) reuse the same connection fields (auth, fully_qualified_namespace / resource hostname, optional client_id).

Connection document

name: azure-servicebus
type: azure-servicebus
auth: workload_identity
fully_qualified_namespace: myns.servicebus.windows.net
# client_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"  # optional; else pod AZURE_CLIENT_ID

SAS (default):

name: azure-servicebus
type: azure-servicebus
auth: connection_string
connection_string: "$secret:azure-servicebus-connection-string"

Trigger subscriber has no connection YAML — set pod env AZURE_SERVICEBUS_AUTH=workload_identity and AZURE_SERVICEBUS_FULLY_QUALIFIED_NAMESPACE.

Azure RBAC on the identity: Azure Service Bus Data Sender / Data Receiver for publish/receive; Data Owner (or SAS Manage) for POST /test.


Consequences

  • Service Bus service_call steps can authenticate without a SAS connection string.
  • Operators must install the Azure Workload Identity webhook and federate a UAMI to meshflows-azure-workload-identity (example: engine/deploy/k8s/azure-workload-identity.example.yaml). Not enabled by default.
  • Local az login still works for developers: DefaultAzureCredential is used (interactive browser excluded in-cluster).
  • Logic Apps importer does not auto-convert MSI HTTP actions in this slice.

Non-goals (still later)

  • Parsing Azure identity resource IDs from Logic Apps into MeshFlows connections
  • Requiring Entra / cloud IAM for on-prem or secret-only deployments
  • HTTP egress MSI / ARM token audience as a generic egress-http auth mode
  • Other clouds’ workload identity (AWS IRSA, GCP WIF) — same value, separate design
  • System-assigned managed identity as the primary product path