Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Azure TokenCredential for authentication against Azure OpenAI #1624

Open
asaikali opened this issue Oct 29, 2024 · 1 comment
Open
Labels

Comments

@asaikali
Copy link

asaikali commented Oct 29, 2024

The current AzureOpenAI auto-configuration code assume that the users will provide a static api key if no key is set, then an exception is throw see

public OpenAIClientBuilder openAIClientBuilder(AzureOpenAiConnectionProperties connectionProperties) {

Azure supports a keyless authentication mode that uses Azure Active Directory and system identity. Some users of Azure will disable key based accessed for the Azure Open AI service and those users can't use spring-ai with azure open ai.

Todo:

  • Enhance the the AzureOpenAiAutoConfiguration to support keyless authentication.
  • Document how users can configure keyless authentication

Reference https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/authentication

Resources:

@KKulma
Copy link

KKulma commented Nov 7, 2024

I second this—at the very least, please provide documentation on how to update relevant scripts to enable authentication via Service Principal. We're wrestling with it at the moment, and autoconfiguration is stubbornly hard to override!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants