Skip to content

Commit d40c7eb

Browse files
tanmaya-panda1esmereleschabell
authored
out_azure_kusto: added workload identity (#1631)
* Update azure_kusto.md for buffering commits Signed-off-by: Tanmaya Panda <108695755+tanmaya-panda1@users.noreply.github.com> * Update pipeline/outputs/azure_kusto.md Signed-off-by: esmerel <6818907+esmerel@users.noreply.github.com> * out_azure_kusto: added workload identity auth mode Signed-off-by: Tanmaya Panda <tanmayapanda@microsoft.com> --------- Signed-off-by: Tanmaya Panda <108695755+tanmaya-panda1@users.noreply.github.com> Signed-off-by: esmerel <6818907+esmerel@users.noreply.github.com> Signed-off-by: Tanmaya Panda <tanmayapanda@microsoft.com> Signed-off-by: Eric D. Schabell <eric@schabell.org> Co-authored-by: esmerel <6818907+esmerel@users.noreply.github.com> Co-authored-by: Eric D. Schabell <eric@schabell.org>
1 parent 9d4bab9 commit d40c7eb

1 file changed

Lines changed: 65 additions & 1 deletion

File tree

pipeline/outputs/azure_kusto.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,41 @@ description: Send logs to Azure Data Explorer (Kusto)
66

77
The _Kusto_ output plugin lets you ingest your logs into an [Azure Data Explorer](https://azure.microsoft.com/en-us/products/data-explorer/) cluster, using the [Queued Ingestion](https://learn.microsoft.com/en-us/kusto/api/netfx/about-kusto-ingest?view=azure-data-explorer&preserve-view=true&tabs=csharp#queued-ingestion) mechanism. This output plugin can also be used to ingest logs into an [Eventhouse](https://blog.fabric.microsoft.com/en-us/blog/eventhouse-overview-handling-real-time-data-with-microsoft-fabric/) cluster in Microsoft Fabric Real Time Analytics.
88

9-
## Ingest into Azure Data Explorer: create a Kusto cluster and database
9+
## Authentication Methods
10+
11+
Fluent-Bit can use various authentication methods to connect to your Azure Data Explorer cluster:
12+
13+
### Service Principal Authentication (Default)
14+
15+
For service principal authentication, you'll need to create an Azure AD application:
16+
17+
- [Register an Application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#register-an-application)
18+
- [Add a client secret](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#add-a-client-secret)
19+
- [Authorize the app in your database](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/management/access-control/principals-and-identity-providers#azure-ad-tenants)
20+
21+
Configure Fluent Bit with your application's `tenant_id`, `client_id`, and `client_secret`.
22+
23+
### Managed Identity Authentication
24+
25+
When running on Azure services that support Managed Identities (such as Azure VMs, AKS, or App Service):
26+
27+
1. [Assign the managed identity appropriate permissions to your Kusto database](https://learn.microsoft.com/en-us/azure/data-explorer/configure-managed-identities-cluster)
28+
2. Configure Fluent Bit with `auth_type` set to `managed_identity`
29+
3. For system-assigned identity, set `client_id` to `system`
30+
4. For user-assigned identity, set `client_id` to the managed identity's client ID (GUID)
31+
32+
### Workload Identity Authentication
33+
34+
For Kubernetes environments using Azure Workload Identity:
35+
36+
1. [Set up Azure Workload Identity in your Kubernetes cluster](https://learn.microsoft.com/en-us/azure/aks/workload-identity-deploy-cluster)
37+
2. Configure your pod to use a service account with Workload Identity Federation
38+
3. Configure Fluent Bit with:
39+
- `auth_type` set to `workload_identity`
40+
- `tenant_id` and `client_id` of your Azure AD application
41+
- `workload_identity_token_file` pointing to your token file path (typically `/var/run/secrets/azure/tokens/azure-identity-token`)
42+
43+
## For ingesting into Azure Data Explorer: Creating a Kusto Cluster and Database
1044

1145
Create an Azure Data Explorer cluster in one of the following ways:
1246

@@ -197,6 +231,36 @@ pipeline:
197231
Io_Timeout 60s
198232
```
199233

234+
#### Managed Identity Authentication
235+
236+
```
237+
[OUTPUT]
238+
Match *
239+
Name azure_kusto
240+
Auth_Type managed_identity
241+
Client_Id <managed_identity_client_id> # Use 'system' for system-assigned managed identity
242+
Ingestion_Endpoint https://ingest-<cluster>.<region>.kusto.windows.net
243+
Database_Name <database_name>
244+
Table_Name <table_name>
245+
# Additional parameters as needed
246+
```
247+
248+
#### Workload Identity Authentication
249+
250+
```
251+
[OUTPUT]
252+
Match *
253+
Name azure_kust
254+
Auth_Type workload_identity
255+
Tenant_Id <tenant_id>
256+
Client_Id <client_id>
257+
Workload_Identity_Token_File /var/run/secrets/azure/tokens/azure-identity-token
258+
Ingestion_Endpoint https://ingest-<cluster>.<region>.kusto.windows.net
259+
Database_Name <database_name>
260+
Table_Name <table_name>
261+
# Additional parameters as needed
262+
```
263+
200264
{% endtab %}
201265
{% endtabs %}
202266

0 commit comments

Comments
 (0)