Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .chloggen/codeboten_dep-azureauth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: 'deprecation'
component: extension/azure_auth
note: Introduce new snake case compliant name `azure_auth`
issues: [46775]
2 changes: 1 addition & 1 deletion .chloggen/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ components:
- extension/awscloudwatchmetricstreams_encoding
- extension/awslogs_encoding
- extension/awsproxy
- extension/azure_auth
- extension/azure_encoding
- extension/azureauth
- extension/basicauth
- extension/bearertokenauth
- extension/cfgarden_observer
Expand Down
16 changes: 8 additions & 8 deletions extension/azureauthextension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Stability | [alpha] |
| Distributions | [contrib] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fazureauth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fazureauth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fazureauth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fazureauth) |
| Code coverage | [![codecov](https://codecov.io/github/open-telemetry/opentelemetry-collector-contrib/graph/main/badge.svg?component=extension_azureauth)](https://app.codecov.io/gh/open-telemetry/opentelemetry-collector-contrib/tree/main/?components%5B0%5D=extension_azureauth&displayType=list) |
| Code coverage | [![codecov](https://codecov.io/github/open-telemetry/opentelemetry-collector-contrib/graph/main/badge.svg?component=extension_azure_auth)](https://app.codecov.io/gh/open-telemetry/opentelemetry-collector-contrib/tree/main/?components%5B0%5D=extension_azure_auth&displayType=list) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@constanca-m](https://www.github.com/constanca-m) |

[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha
Expand All @@ -31,7 +31,7 @@ User based:

```yaml
extensions:
azureauth:
azure_auth:
managed_identity:
client_id: ${CLIENT_ID}
```
Expand All @@ -40,15 +40,15 @@ System based (leave `client_id` field empty):

```yaml
extensions:
azureauth:
azure_auth:
managed_identity:
```

### Workload identity

```yaml
extensions:
azureauth:
azure_auth:
workload_identity:
client_id: ${CLIENT_ID}
federated_token_file: ${FILE}
Expand All @@ -61,7 +61,7 @@ With client secret:

```yaml
extensions:
azureauth:
azure_auth:
service_principal:
client_id: ${CLIENT_ID}
tenant_id: ${TENANT_ID}
Expand All @@ -72,7 +72,7 @@ With client certificate path:

```yaml
extensions:
azureauth:
azure_auth:
service_principal:
client_id: ${CLIENT_ID}
tenant_id: ${TENANT_ID}
Expand All @@ -85,7 +85,7 @@ Not recommended for production.

```yaml
extensions:
azureauth:
azure_auth:
use_default: true
```

Expand All @@ -96,7 +96,7 @@ This is useful for Azure Monitor Workspaces since the workspace hostname is spec

```yaml:
extensions:
azureauth:
azure_auth:
scopes:
- https://monitor.azure.com/.default
```
2 changes: 1 addition & 1 deletion extension/azureauthextension/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (r *roundTripper) RoundTrip(request *http.Request) (*http.Response, error)

token, err := r.auth.getTokenForHost(req.Context(), host)
if err != nil {
return nil, fmt.Errorf("azureauth: failed to get token: %w", err)
return nil, fmt.Errorf("azure_auth: failed to get token: %w", err)
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))

Expand Down
4 changes: 3 additions & 1 deletion extension/azureauthextension/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ import (

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/extension/xextension"

"github.com/open-telemetry/opentelemetry-collector-contrib/extension/azureauthextension/internal/metadata"
)

func NewFactory() extension.Factory {
return extension.NewFactory(
return xextension.NewFactory(
metadata.Type,
createDefaultConfig,
createExtension,
metadata.ExtensionStability,
xextension.WithDeprecatedTypeAlias(metadata.DeprecatedType),
)
}

Expand Down
2 changes: 1 addition & 1 deletion extension/azureauthextension/generated_component_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions extension/azureauthextension/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
go.opentelemetry.io/collector/extension v1.53.1-0.20260306010043-a44ab254898b
go.opentelemetry.io/collector/extension/extensionauth v1.53.1-0.20260306010043-a44ab254898b
go.opentelemetry.io/collector/extension/extensiontest v0.147.1-0.20260306010043-a44ab254898b
go.opentelemetry.io/collector/extension/xextension v0.147.1-0.20260306010043-a44ab254898b
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.1
golang.org/x/oauth2 v0.35.0
Expand Down
2 changes: 2 additions & 0 deletions extension/azureauthextension/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion extension/azureauthextension/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
display_name: Azure Authenticator Extension
type: azureauth
type: azure_auth
deprecated_type: azureauth

status:
class: extension
Expand Down
24 changes: 12 additions & 12 deletions extension/azureauthextension/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
azureauth:
azure_auth:

azureauth/use_default:
azure_auth/use_default:
use_default: true

azureauth/valid_service_principal_secret:
azure_auth/valid_service_principal_secret:
service_principal:
client_id: test
client_secret: test
tenant_id: test

azureauth/valid_service_principal_certificate:
azure_auth/valid_service_principal_certificate:
service_principal:
client_id: test
client_certificate_path: test
tenant_id: test

azureauth/service_principal_mutually_exclusive:
azure_auth/service_principal_mutually_exclusive:
service_principal:
client_id: test
client_certificate_path: test
tenant_id: test
client_secret: test

azureauth/service_principal_empty_client_id:
azure_auth/service_principal_empty_client_id:
service_principal:
client_secret: test
tenant_id: test

azureauth/service_principal_empty_tenant_id:
azure_auth/service_principal_empty_tenant_id:
service_principal:
client_id: test
client_secret: test

azureauth/service_principal_empty_client_credential:
azure_auth/service_principal_empty_client_credential:
service_principal:
client_id: test
tenant_id: test

azureauth/valid_workload_identity:
azure_auth/valid_workload_identity:
workload_identity:
client_id: test
federated_token_file: test
tenant_id: test

azureauth/workload_identity_empty_client_id:
azure_auth/workload_identity_empty_client_id:
workload_identity:
federated_token_file: test
tenant_id: test

azureauth/workload_identity_empty_tenant_id:
azure_auth/workload_identity_empty_tenant_id:
workload_identity:
client_id: test
federated_token_file: test

azureauth/workload_identity_empty_federated_token_file:
azure_auth/workload_identity_empty_federated_token_file:
workload_identity:
client_id: test
tenant_id: test
4 changes: 2 additions & 2 deletions receiver/azureeventhubreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ receivers:
event_hub:
name: hubName
namespace: namespace.servicebus.windows.net
auth: azureauth
auth: azure_auth

extensions:
azureauth:
azure_auth:
service_principal:
client_id: ${env:AZURE_CLIENT_ID}
client_secret: ${env:AZURE_CLIENT_SECRET}
Expand Down
4 changes: 2 additions & 2 deletions receiver/azuremonitorreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ receivers:
azure_monitor:
subscription_ids: ["${subscription_id}"]
auth:
authenticator: azureauth
authenticator: azure_auth

extensions:
azureauth:
azure_auth:
managed_identity:
client_id: ${client_id}
```
Expand Down
2 changes: 1 addition & 1 deletion reports/distributions/contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ components:
- awscloudwatchmetricstreams_encoding
- awslogs_encoding
- awsproxy
- azureauth
- azure_auth
- basicauth
- bearertokenauth
- cgroupruntime
Expand Down
Loading