Skip to content

New component: azure authentication extension #38908

Closed
@constanca-m

Description

@constanca-m

The purpose and use-cases of the new component

This extension authenticator would work in a similar way googleclientauth extension.

Currently, there already several azure exporters and receivers, and each have their own authentication ways:

  • azureblobreceiver: needs service_principal or connection_string
  • azureeventhubreceiver: connection
  • azuremonitorreceiver: service_principal, workload_identity, managed_identity, default_credentials.
  • azureblobexporter: connection_string, system_managed_identity,
    user_managed_identity, service_principal.
  • azuredataexplorerexporter: Service principal, managed identity, default.
  • azuremonitorexporter: connection_string.

With this authenticator extension, we could have a common approach to all of them. This way we have:

  • Only one configuration for all the Azure components.
  • Supports different authentication methods (see below).
  • Implements (auth.Server interface and auth.Client interface), so it can be used in both receivers and exporters.

Example of integration with some existent components:

  • Before:
receivers:
  azureeventhub:
    connection: "..." # connection string is discouraged
    
exporters:
  azureblob:
    auth:
      connection_string: "..." # connection string is discouraged
  azuremonitor:
    connection_string: "..." # connection string is discouraged
  • After:
extensions:
  # see in next section example configurations
  azureauth/blob:
  azureauth/monitor:
  azureauth/eventhub:

exporters:
  azureblob:
    auth:
      authenticator: azureauth/blob
  azuremonitor:
    auth:
      authenticator: azureauth/monitor

receivers:
  azureeventhub:
    name: ...
    namespace: ...
    auth:
      authenticator: azureauth/eventhub

We could start with the following options for authentication:

  • Managed identity support for Azure resources
  • Workload identity support for Kubernetes
  • Service principal support with client secret/certificate for non Azure.
  • And the default credentials. Discouraged for production. In azidentity, it is mentioned:

In production, it's better to use a specific credential type so authentication is more predictable and easier to debug.

Connection string is not mentioned for optimal security, so there will not be support for that.

See also recommended authentication approach. We will use the credentials to get the token.

Example configuration for the component

  1. Managed identity:
extensions:
  azureauth:
    # resource defines the scope
    resource: "https://<...>.com/.default"
    managed_identity:
      # Types: user or system
      # See https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview#managed-identity-types.
        client_id: ""  # If empty then system-assigned, otherwise user-assigned
  1. Workload identity:
extensions:
  azureauth:
    # resource defines the scope
    resource: "https://<...>.com/.default"
    workload_identity:
      tenant_id: "${AZURE_TENANT_ID}"
      client_id: "${AZURE_CLIENT_ID}"
  1. Service principal support with client secret/certificate:
extensions:
  azureauth:
    # resource defines the scope
    resource: "https://<...>.com/.default"
    service_principal:
      tenant_id: "${AZURE_TENANT_ID}"
      client_id: "${AZURE_CLIENT_ID}"
      client_secret: "${AZURE_CLIENT_SECRET}" # or client_certificate_path
  1. Default credentials, discouraged in production:
extensions:
  azureauth:
    # resource defines the scope
    resource: "https://<...>.com/.default"
    # See DefaultAzureCredential authentication order:
    # https://github.com/Azure/azure-sdk-for-go/blob/54746265023eaf4025bb53f3b869cae2489d1f27/sdk/azidentity/default_azure_credential.go#L48-L57
    use_default: true

Telemetry data types supported

Code Owner(s)

@constanca-m

Sponsor (optional)

@atoulme

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions