Azureauth Extension
contrib
Maintainers: @constanca-m
Source: opentelemetry-collector-contrib
Overview
This extension can be used in two directions:- In exporters (outbound): attaches the collector’s Azure identity as a bearer token to outgoing requests.
- In receivers (inbound): when wired as an
extensionauth.Server(for example,protocols.http.auth.authenticator: azure_auth), validates incoming bearer tokens as OIDC JWTs against a configured issuer and audience. Requires theserverblock (see Inbound JWT validation).
Security advisory: VersionsAdditionally, the extension also implementsv0.124.0throughv0.150.0contain a server-side authentication bypass (GHSA-pjv4-3c63-699f). Do not useazure_authunder a receiverauth:block on those versions. The outbound exporter usage is unaffected.
azcore.TokenCredential so that Azure components can get the token by running the function GetToken. If the component supports HTTP client, then this should not be necessary, as the token will be placed in the authorization header.
It supports 4 different types of authentication:
- Managed identity for Azure resources
- Workload identity for Kubernetes
- Service principal with either a client secret or client certificate path for non Azure.
- And the default credentials. This is not recommended for production.
Examples
Managed identity
User based:client_id field empty):
Workload identity
Service principal
With client secret:Default authentication
Not recommended for production.With custom scopes
You can set custom scopes if the audience required in the token does not match the host you are trying to reach. This is useful for Azure Monitor Workspaces since the workspace hostname is specific to your instance whereas the audience required ishttps://monitor.azure.com/.default
Inbound JWT validation
Theserver block is required only in this specific case:
- A server protocol’s
auth.authenticatorpoints atazure_auth(for example,receivers.otlp.protocols.http.auth.authenticator: azure_auth). This is the only path that validates inbound bearer tokens.
server in any other case, including:
- Exporter-only usage.
- A receiver that loads
azure_authas anazcore.TokenCredentialto call Azure APIs (for example, a receiver reading from Azure Blob Storage). That path does not validate incoming tokens, soserverhas no effect.
iss, aud, exp, and nbf. The audience is pinned from config and never derived from request headers. Requests are rejected on any missing config or failed check.
Fields:
server.issuer_url: Entra ID tenant discovery URL (https://login.microsoftonline.com/<tenant-id>/v2.0).server.audience:audvalue required in valid tokens (for example,api://collector-ingest).
Configuration
Example Configuration
Last generated: 2026-06-01