Skip to content

MS Entra authentication #448

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

Closed
wants to merge 22 commits into from

Conversation

williamspindox
Copy link

Thank you for taking time to contribute this pull request!
You might have already read the [contributor guide][1], but as a reminder, please make sure to:

  • Sign the contributor license agreement
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

@tzolov tzolov added enhancement New feature or request RAG Issues related to Retrieval Augmented Generation labels Mar 15, 2024
@tzolov
Copy link
Contributor

tzolov commented Mar 15, 2024

@williamspindox thank you for the contribution
It would help to provide some context before and with the PR?

Microsoft Entra authentication, part of the Entra ID identity platform, enhances security and simplifies user sign-in across devices, applications, and services. It goes beyond basic username and password verification, incorporating features like self-service password reset, multifactor authentication, hybrid integration for password changes, passwordless authentication, and policies to enforce strong passwords. These components work together to protect user identities, reduce help desk dependencies, and offer a more streamlined sign-in experience.
https://learn.microsoft.com/en-us/entra/identity/authentication/overview-authentication
https://learn.microsoft.com/en-us/azure/databricks/dev-tools/service-prin-aad-token
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not related to MS Entra, but it avoid a WARNING during build.

@@ -46,13 +52,50 @@ public class AzureOpenAiAutoConfiguration {
@ConditionalOnMissingBean
public OpenAIClient openAIClient(AzureOpenAiConnectionProperties connectionProperties) {

Assert.hasText(connectionProperties.getApiKey(), "API key must not be empty");
Assert.hasText(connectionProperties.getEndpoint(), "Endpoint must not be empty");
HttpLogOptions options = new HttpLogOptions();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It allow to enable logging on request and response to/from Azure. NB. Response body too huge is automatically hide by azuresdk.

@tzolov tzolov added this to the 1.0.0-M1 milestone Apr 26, 2024
@williamspindox
Copy link
Author

When can you approve my pull request? Thank you

Manni, William added 4 commits May 20, 2024 23:01
# Conflicts:
#	spring-ai-spring-boot-autoconfigure/pom.xml
# Conflicts:
#	spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/azure/openai/AzureOpenAiAutoConfiguration.java
@markpollack
Copy link
Member

Apologies, it is a hard area for me to come up to speed and we let this slip. I'm scheduling for the M2 release now.

@markpollack markpollack modified the milestones: 1.0.0-M1, 1.0.0-M2 May 24, 2024
Manni, William added 2 commits June 3, 2024 14:07
# Conflicts:
#	spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/azure/openai/AzureOpenAiAutoConfiguration.java
#	spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/azure/openai/AzureOpenAiConnectionProperties.java
@markpollack
Copy link
Member

I'm not sure what was intended for this PR. The resulting changes don't have anything to do with MS Entra authentication and the comment that referred to this code

		-Assert.hasText(connectionProperties.getApiKey(), "API key must not be empty");
		-Assert.hasText(connectionProperties.getEndpoint(), "Endpoint must not be empty");
		+HttpLogOptions options = new HttpLogOptions();

also isn't related to auth, but seems incomplate and not there in the final PR.

The resulting change the PR makes is related to where the onxx model is loaded from (http or classpath).

I don't know why using http is better over classpath. I'm closing this PR and wont' merge. Please open up a new PR for any of these specific issues with a description explaining the purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request RAG Issues related to Retrieval Augmented Generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants