spring-projects / spring-projects/spring-ai
Spring AI 2 regression authentication to Azure Open AI with custom Credential Builder
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
Bug description
Switching from Spring Ai 1 to Spring AI 2.0.1 removes UAMI authentication for Azure Foundry models.
->
static Credential getAzureCredential() {
return getAzureCredential(new DefaultAzureCredentialBuilder().build());
}
There is no way to override that.
Environment
Spring AI 2.0.1, Java 25
Steps to reproduce
Authenticate against Azure OpenAI with Managed Identity
Expected Behavior
Spring AI 2 supports authentication to Azure Open AI with custom credential builder (UAMI, AASP)
Current Behavior
Spring AI 2 supports only API Key Based auth authentication OR AZURE_CLIENT_ID - single env variable, which limits our multi model configuration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with models/spring-ai-openai/src/main/java/org/springframework/ai/openai/setup/OpenAiSetup.java around line 191 and AzureInternalOpenAiHelper.java around line 51. Trace how Azure credentials are selected and compare the Spring AI 1 to 2.0.1 behavior. Done means custom credential-builder authentication works for managed identity and multi-model configuration without relying only on an API key or AZURE_CLIENT_ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, java, spring
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100