semantic-kernel
semantic-kernel copied to clipboard
Add AAD and API Key auth
Motivation and Context
It is desired to control access to the chat backend / SK service.
Description
- Added AAD auth by using Microsoft libraries
- Added API key auth by creating a custom authenticator
- Added a passthrough "authenticator" to disable auth
Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with
dotnet format - [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone :smile:
How do we stop users from sending credentials over HTTP (not HTTPS) given that HTTPS is disabled in the sample?
I'm concerned about the bad guidance we're giving, considering that many devs will copy and run the app assuming we did the right things. We shouldn't expect that everyone will read READMEs or comments and hope for the best.
This is an excellent question that we are currently evaluating outside the of the scope of this PR.
How do we stop users from sending credentials over HTTP (not HTTPS) given that HTTPS is disabled in the sample? I'm concerned about the bad guidance we're giving, considering that many devs will copy and run the app assuming we did the right things. We shouldn't expect that everyone will read READMEs or comments and hope for the best.
This is an excellent question that we are currently evaluating outside the of the scope of this PR.
Well, now the code needs to be explicitly edited and compiled to allow that to happen!
How do we stop users from sending credentials over HTTP (not HTTPS) given that HTTPS is disabled in the sample?
I'm concerned about the bad guidance we're giving, considering that many devs will copy and run the app assuming we did the right things. We shouldn't expect that everyone will read READMEs or comments and hope for the best.
Also, a change is coming in in parallel to this one to make HTTPS the default again.