Skip to content

Commit dd5e2ce

Browse files
jlheardjasonheard
andauthored
[Auth0] - Add multi-environment support (#14718)
Co-authored-by: jasonheard <jasonheard@microsoft.com>
1 parent 6a69b9d commit dd5e2ce

9 files changed

Lines changed: 776 additions & 527 deletions

File tree

Lines changed: 121 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,123 @@
11
{
2-
"name": "Auth0LogsDCR",
3-
"apiVersion": "2021-09-01-preview",
4-
"type": "Microsoft.Insights/dataCollectionRules",
5-
"location": "{{location}}",
6-
"kind": null,
7-
"properties": {
8-
"streamDeclarations": {
9-
"Custom-Auth0Logs": {
10-
"columns": [
11-
{
12-
"name": "date",
13-
"type": "datetime"
14-
},
15-
{
16-
"name": "type",
17-
"type": "string"
18-
},
19-
{
20-
"name": "description",
21-
"type": "string"
22-
},
23-
{
24-
"name": "connection",
25-
"type": "string"
26-
},
27-
{
28-
"name": "connection_id",
29-
"type": "string"
30-
},
31-
{
32-
"name": "client_id",
33-
"type": "string"
34-
},
35-
{
36-
"name": "client_name",
37-
"type": "string"
38-
},
39-
{
40-
"name": "ip",
41-
"type": "string"
42-
},
43-
{
44-
"name": "user_agent",
45-
"type": "string"
46-
},
47-
{
48-
"name": "hostname",
49-
"type": "string"
50-
},
51-
{
52-
"name": "user_id",
53-
"type": "string"
54-
},
55-
{
56-
"name": "user_name",
57-
"type": "string"
58-
},
59-
{
60-
"name": "audience",
61-
"type": "string"
62-
},
63-
{
64-
"name": "scope",
65-
"type": "string"
66-
},
67-
{
68-
"name": "strategy",
69-
"type": "string"
70-
},
71-
{
72-
"name": "strategy_type",
73-
"type": "string"
74-
},
75-
{
76-
"name": "location_info",
77-
"type": "dynamic"
78-
},
79-
{
80-
"name": "details",
81-
"type": "dynamic"
82-
},
83-
{
84-
"name": "log_id",
85-
"type": "string"
86-
},
87-
{
88-
"name": "tenant_name",
89-
"type": "string"
90-
},
91-
{
92-
"name": "isMobile",
93-
"type": "boolean"
94-
}
95-
]
96-
}
97-
},
98-
"destinations": {
99-
"logAnalytics": [
100-
{
101-
"workspaceResourceId": "{{workspaceResourceId}}",
102-
"name": "clv2ws1"
103-
}
104-
]
105-
},
106-
"dataFlows": [
107-
{
108-
"streams": [
109-
"Custom-Auth0Logs"
110-
],
111-
"destinations": [
112-
"clv2ws1"
113-
],
114-
"transformKql": "source| extend TimeGenerated = ['date'] , EventType = type | project-rename Description = description, Connection = connection, ConnectionId = connection_id, ClientId = client_id, ClientName = client_name, SrcIpAddr = ip, HttpUserAgent = user_agent, SrcHostname = hostname, ActorUserId = user_id, ActorUsername = user_name, Audience = audience, Scope = scope, Strategy = strategy, StrategyType = strategy_type, LocationInfo = location_info, Details = details, LogId = log_id, TenantName = tenant_name, IsMobile = isMobile | project-away ['date'], type",
115-
"outputStream": "Custom-Auth0Logs_CL"
116-
}
117-
2+
"name": "Auth0LogsDCR",
3+
"apiVersion": "2023-04-01-preview",
4+
"type": "Microsoft.Insights/dataCollectionRules",
5+
"location": "{{location}}",
6+
"properties": {
7+
"dataCollectionEndpointId": "{{dataCollectionEndpointId}}",
8+
"streamDeclarations": {
9+
"Custom-Auth0Logs_CL": {
10+
"columns": [
11+
{
12+
"name": "date",
13+
"type": "datetime"
14+
},
15+
{
16+
"name": "type",
17+
"type": "string"
18+
},
19+
{
20+
"name": "description",
21+
"type": "string"
22+
},
23+
{
24+
"name": "connection",
25+
"type": "string"
26+
},
27+
{
28+
"name": "connection_id",
29+
"type": "string"
30+
},
31+
{
32+
"name": "client_id",
33+
"type": "string"
34+
},
35+
{
36+
"name": "client_name",
37+
"type": "string"
38+
},
39+
{
40+
"name": "ip",
41+
"type": "string"
42+
},
43+
{
44+
"name": "user_agent",
45+
"type": "string"
46+
},
47+
{
48+
"name": "hostname",
49+
"type": "string"
50+
},
51+
{
52+
"name": "user_id",
53+
"type": "string"
54+
},
55+
{
56+
"name": "user_name",
57+
"type": "string"
58+
},
59+
{
60+
"name": "audience",
61+
"type": "string"
62+
},
63+
{
64+
"name": "scope",
65+
"type": "string"
66+
},
67+
{
68+
"name": "strategy",
69+
"type": "string"
70+
},
71+
{
72+
"name": "strategy_type",
73+
"type": "string"
74+
},
75+
{
76+
"name": "location_info",
77+
"type": "dynamic"
78+
},
79+
{
80+
"name": "details",
81+
"type": "dynamic"
82+
},
83+
{
84+
"name": "log_id",
85+
"type": "string"
86+
},
87+
{
88+
"name": "tenant_name",
89+
"type": "string"
90+
},
91+
{
92+
"name": "isMobile",
93+
"type": "boolean"
94+
},
95+
{
96+
"name": "Auth0Domain",
97+
"type": "string"
98+
}
99+
]
100+
}
101+
},
102+
"destinations": {
103+
"logAnalytics": [
104+
{
105+
"workspaceResourceId": "{{workspaceResourceId}}",
106+
"name": "clv2ws1"
107+
}
108+
]
109+
},
110+
"dataFlows": [
111+
{
112+
"streams": [
113+
"Custom-Auth0Logs_CL"
118114
],
119-
"dataCollectionEndpointId": "[concat('/subscriptions/',parameters('subscription'),'/resourceGroups/',parameters('resourceGroupName'),'/providers/Microsoft.Insights/dataCollectionEndpoints/',parameters('workspace'))]"
120-
}
121-
}
115+
"destinations": [
116+
"clv2ws1"
117+
],
118+
"outputStream": "Custom-Auth0Logs_CL",
119+
"transformKql": "source | extend TimeGenerated = iff(isnull(['date']), now(), todatetime(['date'])) , event_date = ['date'] , EventType = ['type'] , Description = ['description'] , Connection = ['connection'] , ConnectionId = ['connection_id'] , ClientId = ['client_id'] , ClientName = ['client_name'] , SrcIpAddr = ['ip'] , HttpUserAgent = ['user_agent'] , SrcHostname = ['hostname'] , ActorUserId = ['user_id'] , ActorUsername = ['user_name'] , Audience = ['audience'] , Scope = ['scope'] , Strategy = ['strategy'] , StrategyType = ['strategy_type'] , LocationInfo = ['location_info'] , Details = ['details'] , LogId = ['log_id'] , TenantName = ['tenant_name'] , IsMobile = ['isMobile'] | project TimeGenerated , event_date , EventType , Description , Connection , ConnectionId , ClientId , ClientName , SrcIpAddr , HttpUserAgent , SrcHostname , ActorUserId , ActorUsername , Audience , Scope , Strategy , StrategyType , LocationInfo , Details , LogId , TenantName , IsMobile , Auth0Domain"
120+
}
121+
]
122+
}
123+
}

0 commit comments

Comments
 (0)