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

feat: enable workload identity for aoai auth #60

Merged
merged 3 commits into from
Sep 11, 2023

Conversation

pauldotyu
Copy link
Contributor

@pauldotyu pauldotyu commented Sep 8, 2023

Purpose

This change is to enable Azure AD auth support in the ai-service so that auth can use either OpenAI API key or Azure AD Workload Identity.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
  • Log into Azure CLI
  • Open terminal and run make azure-ai from root of the repo
git clone https://github.com/pauldotyu/aks-store-demo
cd aks-store-demo
git checkout aoai-workload-identity

# set the region and only build the ai-service
export LOC_NAME=westeurope BUILD_AI_SERVICE=true GPT_35_TURBO_VERSION=0301 && make azure-ai
  • To test workload identity, run through sections 3 and 4 in this lab guide

What to Check

Verify that the following are valid

  • Get the public IP of the store-admin service and browse to the site
  • Ensure you can add a new product with an OpenAI generated product description when using either OpenAI API key or Azure AD workload identity

Other Information

This will address #59

To clean up deployment

# set your resource group name and run make clean-azure
export RG_NAME=rg-store-demo-14268 && make clean-azure && unset RG_NAME

@chzbrgr71 chzbrgr71 self-requested a review September 11, 2023 21:18
Copy link
Collaborator

@chzbrgr71 chzbrgr71 left a comment

Choose a reason for hiding this comment

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

Tested this end to end and it worked beautifully

@chzbrgr71
Copy link
Collaborator

Merging like a Los Angeles freeway

@chzbrgr71 chzbrgr71 merged commit d8b4993 into Azure-Samples:main Sep 11, 2023
1 check passed
@pauldotyu pauldotyu deleted the aoai-workload-identity branch September 18, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants