Skip to content

Commit

Permalink
Merge pull request #24 from bitesinbyte/feature/ai-prob
Browse files Browse the repository at this point in the history
feat: Added new open ai blogs
  • Loading branch information
manishtiwari25 authored Aug 10, 2024
2 parents ca64a79 + 2466d6e commit bae9802
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "Ruby 3",
"dockerFile": "Dockerfile",
"customizations":{
"name": "Ruby 3",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"rebornix.Ruby"
"rebornix.Ruby",
"DavidAnson.vscode-markdownlint"
]
}
},
"postCreateCommand": "bundle install"
"postCreateCommand": "bundle install"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
layout: post
title: "Call to get Azure Search index failed - Server responded with status 403"
date: 2024-08-10 06:00:00 0500
categories: ai
tags: ai azure openai security
author: manishtiwari25
image:
path: /assets/img/headers/ai/azure-openai.webp
---

## Why?

Azure Open AI Service does not have access to Azure Search service.

{% include feed-ads.html %}
{% include feed-ads.html %}

## How to fix?

### Assign Role

- Go to Azure AI Search Service (Formally known as Azure Search Service and Cognitive Search Service).
- You have to provide one of the following roles to open ai service

| Role | Assignee | Resource | Description |
|---|---|---|---|
|Search Index Data Reader| Azure OpenAI| Azure AI Search| Inference service queries the data from the index.|
|Search Service Contributor| Azure OpenAI| Azure AI Search| Inference service queries the index schema for auto fields mapping.<br>Data ingestion service creates index, data sources, skill set, indexer, and queries the indexer status.|

For more information, please visit [Using your data with Azure OpenAI securely](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/use-your-data-securely#role-assignments)

- Assign the role to open ai service, Follow this to know more about role assignment please go through [MS Docs](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal)

{% include feed-ads.html %}
{% include feed-ads.html %}

### Enable RBAC

- Go to Azure AI Search Service (Formally known as Azure Search Service and Cognitive Search Service).
- Under **Settings** section, click on **Keys**
- Under **API Access control** either select **Both** or **Role-based access control**, I would recommend using RBAC(Role-based access control)

![Compliance](/assets/img/posts/ai/call-to-get-azure-search-index-failed-server-responded-with-status-403.webp){: height="300px" }
- Press **Yes** when it asks for confirmation

{% include feed-ads.html %}
{% include feed-ads.html %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: post
title: "Key based authentication is disabled for this resource"
date: 2024-08-10 06:00:00 0500
categories: ai
tags: ai azure openai security
author: manishtiwari25
image:
path: /assets/img/headers/ai/azure-openai.webp
---

## Why?

If you have disabled local auth([Disable local authentication in Azure AI Services](https://learn.microsoft.com/en-us/azure/ai-services/disable-local-auth)), that means you can not use keys for AI service authentication.

{% include feed-ads.html %}
{% include feed-ads.html %}

## How to fix?

Make sure when accessing the AI service API do not use api keys instead try to use Managed service identities.

- Go to Azure AI service (In this case, I am using Azure Open AI Service), and go to Resource Management and select Identity

![Compliance](/assets/img/posts/ai/key-based-authentication-is-disabled-for-this-resource.webp){: height="300px" }
- Make sure you are in **System Assigned** Tab
- If the status is **Off**, please change it to **On** and save the generated ID for future use.

{% include feed-ads.html %}
{% include feed-ads.html %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: post
title: "Principal does not have access to API/Operation"
date: 2024-08-10 06:00:00 0500
categories: ai
tags: ai azure openai security
author: manishtiwari25
image:
path: /assets/img/headers/ai/azure-openai.webp
---

## Why?

This issue can occur when you or application does not have correct permissions to use the AI resource.

{% include feed-ads.html %}
{% include feed-ads.html %}

## How to fix?

- Identify which role you want to assign, in our case we will consider Azure Open AI resource and it supports [these](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/role-based-access-control#azure-openai-roles) roles.
- For application, we would recommend Cognitive Services OpenAI User
- Follow [this](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) to assign a role

{% include feed-ads.html %}
{% include feed-ads.html %}
Binary file added assets/img/headers/ai/azure-openai.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit bae9802

Please sign in to comment.