Skip to content

Commit cc67af2

Browse files
authored
Support custom Auth Audience for Azure services (#945)
Add custom audience settings for more Azure services: * Azure AI Document Intelligence * Azure AI Search * Azure Blobs * Azure Queues Rename the param used in Azure OpenAI and use the same `AzureIdentityAudience` param name across Azure services. KM extensions for Azure not supporting custom JWT auth claims: * Azure AI Content Safety * Azure Redis * Azure SQL
1 parent 3701d1a commit cc67af2

File tree

38 files changed

+768
-2379
lines changed

38 files changed

+768
-2379
lines changed

KernelMemory.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{6EF76FD8-4
8282
nuget.config = nuget.config
8383
README.md = README.md
8484
SECURITY.md = SECURITY.md
85+
swagger.json = swagger.json
8586
EndProjectSection
8687
EndProject
8788
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{B8976338-7CDC-47AE-8502-C2FBAFBEBD68}"

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,12 @@ githubcontrib --repo kernel-memory --owner microsoft --showlogin true --sortBy l
559559
:---: |:---: |:---: |:---: |:---: |:---: |
560560
[pawarsum12](https://github.com/pawarsum12) |[pradeepr-roboticist](https://github.com/pradeepr-roboticist) |[qihangnet](https://github.com/qihangnet) |[roldengarm](https://github.com/roldengarm) |[setuc](https://github.com/setuc) |[slapointe](https://github.com/slapointe) |
561561
562-
[<img alt="slorello89" src="https://avatars.githubusercontent.com/u/42971704?v=4&s=110" width="110">](https://github.com/slorello89) |[<img alt="snakex64" src="https://avatars.githubusercontent.com/u/39806655?v=4&s=110" width="110">](https://github.com/snakex64) |[<img alt="spenavajr" src="https://avatars.githubusercontent.com/u/96045491?v=4&s=110" width="110">](https://github.com/spenavajr) |[<img alt="TaoChenOSU" src="https://avatars.githubusercontent.com/u/12570346?v=4&s=110" width="110">](https://github.com/TaoChenOSU) |[<img alt="teresaqhoang" src="https://avatars.githubusercontent.com/u/125500434?v=4&s=110" width="110">](https://github.com/teresaqhoang) |[<img alt="tomasz-skarzynski" src="https://avatars.githubusercontent.com/u/119002478?v=4&s=110" width="110">](https://github.com/tomasz-skarzynski) |
562+
[<img alt="slorello89" src="https://avatars.githubusercontent.com/u/42971704?v=4&s=110" width="110">](https://github.com/slorello89) |[<img alt="snakex64" src="https://avatars.githubusercontent.com/u/39806655?v=4&s=110" width="110">](https://github.com/snakex64) |[<img alt="spenavajr" src="https://avatars.githubusercontent.com/u/96045491?v=4&s=110" width="110">](https://github.com/spenavajr) |[<img alt="TaoChenOSU" src="https://avatars.githubusercontent.com/u/12570346?v=4&s=110" width="110">](https://github.com/TaoChenOSU) |[<img alt="tarekgh" src="https://avatars.githubusercontent.com/u/10833894?v=4&s=110" width="110">](https://github.com/tarekgh) |[<img alt="teresaqhoang" src="https://avatars.githubusercontent.com/u/125500434?v=4&s=110" width="110">](https://github.com/teresaqhoang) |
563563
:---: |:---: |:---: |:---: |:---: |:---: |
564-
[slorello89](https://github.com/slorello89) |[snakex64](https://github.com/snakex64) |[spenavajr](https://github.com/spenavajr) |[TaoChenOSU](https://github.com/TaoChenOSU) |[teresaqhoang](https://github.com/teresaqhoang) |[tomasz-skarzynski](https://github.com/tomasz-skarzynski) |
564+
[slorello89](https://github.com/slorello89) |[snakex64](https://github.com/snakex64) |[spenavajr](https://github.com/spenavajr) |[TaoChenOSU](https://github.com/TaoChenOSU) |[tarekgh](https://github.com/tarekgh) |[teresaqhoang](https://github.com/teresaqhoang) |
565565
566-
[<img alt="v-msamovendyuk" src="https://avatars.githubusercontent.com/u/61688766?v=4&s=110" width="110">](https://github.com/v-msamovendyuk) |[<img alt="Valkozaur" src="https://avatars.githubusercontent.com/u/58659526?v=4&s=110" width="110">](https://github.com/Valkozaur) |[<img alt="vicperdana" src="https://avatars.githubusercontent.com/u/7114832?v=4&s=110" width="110">](https://github.com/vicperdana) |[<img alt="walexee" src="https://avatars.githubusercontent.com/u/12895846?v=4&s=110" width="110">](https://github.com/walexee) |[<img alt="westdavidr" src="https://avatars.githubusercontent.com/u/669668?v=4&s=110" width="110">](https://github.com/westdavidr) |[<img alt="xbotter" src="https://avatars.githubusercontent.com/u/3634877?v=4&s=110" width="110">](https://github.com/xbotter) |
566+
[<img alt="tomasz-skarzynski" src="https://avatars.githubusercontent.com/u/119002478?v=4&s=110" width="110">](https://github.com/tomasz-skarzynski) |[<img alt="v-msamovendyuk" src="https://avatars.githubusercontent.com/u/61688766?v=4&s=110" width="110">](https://github.com/v-msamovendyuk) |[<img alt="Valkozaur" src="https://avatars.githubusercontent.com/u/58659526?v=4&s=110" width="110">](https://github.com/Valkozaur) |[<img alt="vicperdana" src="https://avatars.githubusercontent.com/u/7114832?v=4&s=110" width="110">](https://github.com/vicperdana) |[<img alt="walexee" src="https://avatars.githubusercontent.com/u/12895846?v=4&s=110" width="110">](https://github.com/walexee) |[<img alt="westdavidr" src="https://avatars.githubusercontent.com/u/669668?v=4&s=110" width="110">](https://github.com/westdavidr) |
567567
:---: |:---: |:---: |:---: |:---: |:---: |
568-
[v-msamovendyuk](https://github.com/v-msamovendyuk) |[Valkozaur](https://github.com/Valkozaur) |[vicperdana](https://github.com/vicperdana) |[walexee](https://github.com/walexee) |[westdavidr](https://github.com/westdavidr) |[xbotter](https://github.com/xbotter) |
568+
[tomasz-skarzynski](https://github.com/tomasz-skarzynski) |[v-msamovendyuk](https://github.com/v-msamovendyuk) |[Valkozaur](https://github.com/Valkozaur) |[vicperdana](https://github.com/vicperdana) |[walexee](https://github.com/walexee) |[westdavidr](https://github.com/westdavidr) |
569+
570+
[<img alt="xbotter" src="https://avatars.githubusercontent.com/u/3634877?v=4&s=110" width="110">](https://github.com/xbotter) |

applications/tests/Evaluation.Tests/appsettings.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
2020
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
2121
"Auth": "AzureIdentity",
22-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
22+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
2323
// in which case use this to change the client audience.
24-
"AzureOpenAIAudience": null,
24+
"AzureIdentityAudience": null,
2525
"Endpoint": "https://<...>.openai.azure.com/",
2626
"APIKey": "",
2727
"Deployment": "",
@@ -44,9 +44,9 @@
4444
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
4545
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
4646
"Auth": "AzureIdentity",
47-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
47+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
4848
// in which case use this to change the client audience.
49-
"AzureOpenAIAudience": null,
49+
"AzureIdentityAudience": null,
5050
"Endpoint": "https://<...>.openai.azure.com/",
5151
"APIKey": "",
5252
"Deployment": "",
@@ -65,6 +65,10 @@
6565
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
6666
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
6767
"Auth": "AzureIdentity",
68+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
69+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
70+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisAudience.cs
71+
"AzureIdentityAudience": null,
6872
// Required when Auth == APIKey
6973
"APIKey": "",
7074
"Endpoint": ""
@@ -76,8 +80,13 @@
7680
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
7781
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
7882
"Auth": "AzureIdentity",
79-
"Endpoint": "https://<...>",
83+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
84+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
85+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/src/SearchAudience.cs
86+
"AzureIdentityAudience": null,
87+
// Required when Auth == APIKey
8088
"APIKey": "",
89+
"Endpoint": "https://<...>",
8190
// Hybrid search is not enabled by default. Note that when using hybrid search
8291
// relevance scores are different, usually lower, than when using just vector search
8392
"UseHybridSearch": false,

examples/001-dotnet-WebClient/file9-settings.json

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
2020
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
2121
"Auth": "AzureIdentity",
22-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
22+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
2323
// in which case use this to change the client audience.
24-
"AzureOpenAIAudience": null,
24+
"AzureIdentityAudience": null,
2525
"Endpoint": "https://<...>.openai.azure.com/",
2626
"APIKey": "",
2727
"Deployment": "",
@@ -34,9 +34,9 @@
3434
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
3535
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
3636
"Auth": "AzureIdentity",
37-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
37+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
3838
// in which case use this to change the client audience.
39-
"AzureOpenAIAudience": null,
39+
"AzureIdentityAudience": null,
4040
"Endpoint": "https://<...>.openai.azure.com/",
4141
"APIKey": "",
4242
"Deployment": "",
@@ -95,6 +95,10 @@
9595
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
9696
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
9797
"Auth": "AzureIdentity",
98+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
99+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
100+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisAudience.cs
101+
"AzureIdentityAudience": null,
98102
// Required when Auth == APIKey
99103
"APIKey": "",
100104
"Endpoint": ""
@@ -106,8 +110,27 @@
106110
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
107111
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
108112
"Auth": "AzureIdentity",
113+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
114+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
115+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/src/SearchAudience.cs
116+
"AzureIdentityAudience": null,
117+
// Required when Auth == APIKey
118+
"APIKey": "",
109119
"Endpoint": "https://<...>",
110-
"APIKey": ""
120+
// Hybrid search is not enabled by default. Note that when using hybrid search
121+
// relevance scores are different, usually lower, than when using just vector search
122+
"UseHybridSearch": false,
123+
// Helps improve relevance score consistency for search services with multiple replicas by
124+
// attempting to route a given request to the same replica for that session. Use this when
125+
// favoring consistent scoring over lower latency. Can adversely affect performance.
126+
//
127+
// Whether to use sticky sessions, which can help getting more consistent results.
128+
// When using sticky sessions, a best-effort attempt will be made to target the same replica set.
129+
// Be wary that reusing the same replica repeatedly can interfere with the load balancing of
130+
// the requests across replicas and adversely affect the performance of the search service.
131+
//
132+
// See https://learn.microsoft.com/rest/api/searchservice/documents/search-post?view=rest-searchservice-2024-07-01&tabs=HTTP#request-body
133+
"UseStickySessions": false
111134
}
112135
},
113136
"Retrieval": {

examples/002-dotnet-Serverless/appsettings.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
2121
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
2222
"Auth": "AzureIdentity",
23+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
24+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
25+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisAudience.cs
26+
"AzureIdentityAudience": null,
2327
// Required when Auth == APIKey
2428
"APIKey": "",
2529
"Endpoint": ""
@@ -31,8 +35,13 @@
3135
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
3236
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
3337
"Auth": "AzureIdentity",
34-
"Endpoint": "https://<...>",
38+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
39+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
40+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/src/SearchAudience.cs
41+
"AzureIdentityAudience": null,
42+
// Required when Auth == APIKey
3543
"APIKey": "",
44+
"Endpoint": "https://<...>",
3645
// Hybrid search is not enabled by default. Note that when using hybrid search
3746
// relevance scores are different, usually lower, than when using just vector search
3847
"UseHybridSearch": false,
@@ -55,6 +64,9 @@
5564
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
5665
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
5766
"Auth": "AzureIdentity",
67+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
68+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
69+
"AzureIdentityAudience": null,
5870
// Azure Storage account name, required when using AzureIdentity auth
5971
// Note: you can use an env var 'KernelMemory__Services__AzureBlobs__Account' to set this
6072
"Account": "",
@@ -71,9 +83,9 @@
7183
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
7284
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
7385
"Auth": "AzureIdentity",
74-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
86+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
7587
// in which case use this to change the client audience.
76-
"AzureOpenAIAudience": null,
88+
"AzureIdentityAudience": null,
7789
"Endpoint": "https://<...>.openai.azure.com/",
7890
"APIKey": "",
7991
// Your Azure Deployment name
@@ -106,9 +118,9 @@
106118
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
107119
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
108120
"Auth": "AzureIdentity",
109-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
121+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
110122
// in which case use this to change the client audience.
111-
"AzureOpenAIAudience": null,
123+
"AzureIdentityAudience": null,
112124
"Endpoint": "https://<...>.openai.azure.com/",
113125
"APIKey": "",
114126
"Deployment": "",

examples/002-dotnet-Serverless/file9-settings.json

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
2020
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
2121
"Auth": "AzureIdentity",
22-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
22+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
2323
// in which case use this to change the client audience.
24-
"AzureOpenAIAudience": null,
24+
"AzureIdentityAudience": null,
2525
"Endpoint": "https://<...>.openai.azure.com/",
2626
"APIKey": "",
2727
"Deployment": "",
@@ -34,9 +34,9 @@
3434
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
3535
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
3636
"Auth": "AzureIdentity",
37-
// When the service is on sovereign clouds the AZURE_AUTHORITY_HOST env var might not work,
37+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
3838
// in which case use this to change the client audience.
39-
"AzureOpenAIAudience": null,
39+
"AzureIdentityAudience": null,
4040
"Endpoint": "https://<...>.openai.azure.com/",
4141
"APIKey": "",
4242
"Deployment": "",
@@ -95,6 +95,10 @@
9595
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
9696
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
9797
"Auth": "AzureIdentity",
98+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
99+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
100+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisAudience.cs
101+
"AzureIdentityAudience": null,
98102
// Required when Auth == APIKey
99103
"APIKey": "",
100104
"Endpoint": ""
@@ -106,8 +110,27 @@
106110
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
107111
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
108112
"Auth": "AzureIdentity",
113+
// Optional when Auth == AzureIdentity. Leave it null to use the default.
114+
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
115+
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/src/SearchAudience.cs
116+
"AzureIdentityAudience": null,
117+
// Required when Auth == APIKey
118+
"APIKey": "",
109119
"Endpoint": "https://<...>",
110-
"APIKey": ""
120+
// Hybrid search is not enabled by default. Note that when using hybrid search
121+
// relevance scores are different, usually lower, than when using just vector search
122+
"UseHybridSearch": false,
123+
// Helps improve relevance score consistency for search services with multiple replicas by
124+
// attempting to route a given request to the same replica for that session. Use this when
125+
// favoring consistent scoring over lower latency. Can adversely affect performance.
126+
//
127+
// Whether to use sticky sessions, which can help getting more consistent results.
128+
// When using sticky sessions, a best-effort attempt will be made to target the same replica set.
129+
// Be wary that reusing the same replica repeatedly can interfere with the load balancing of
130+
// the requests across replicas and adversely affect the performance of the search service.
131+
//
132+
// See https://learn.microsoft.com/rest/api/searchservice/documents/search-post?view=rest-searchservice-2024-07-01&tabs=HTTP#request-body
133+
"UseStickySessions": false
111134
}
112135
},
113136
"Retrieval": {

0 commit comments

Comments
 (0)