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

[Azure OpenAI] Migrate to Entra ID authentication, for improved security #1022

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jdubois
Copy link
Contributor

@jdubois jdubois commented Apr 25, 2024

We currently use API Keys to connect to Azure OpenAI, which isn't the best option for security.

Here's a detailed explanation https://techcommunity.microsoft.com/t5/microsoft-developer-community/using-keyless-authentication-with-azure-openai/ba-p/4111521 from my colleague @pamelafox

This PR:

  • Updates the current script for deploying the models:
    • It adds a random number to the resource group name, so we have less naming collisions
    • It uses a new preview feature, to completely remove API Key authentication
    • It gives the role to the current user, using az cli: this is how you would normally test, and run inside GitHub Actions (authentication is now done through Azure CLI)
    • It adds a system managed identity, in the case you want to access the models from another Azure service
  • Updates the test suite, so it uses this new authentication mechanism

@langchain4j langchain4j added the P2 High priority label Apr 29, 2024
@langchain4j
Copy link
Owner

@jdubois pardon for the delayed review, somehow this PR got lost... Could you please check the conflicts? 🙏

@jdubois
Copy link
Contributor Author

jdubois commented Jun 6, 2024

@langchain4j conflicts fixed, but please have a look at this 2 comments:

  • The project name (line 8) uses a $RANDOM name, so we don't have conflicts when deploying the models (otherwise only one person in the world can deploy this)
  • davinci-002 isn't available in eastus so this one won't deploy -> I don't think you use it, so how about deleting it?

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

Successfully merging this pull request may close these issues.

None yet

2 participants