Comments (6)
Hm, our fetching code is slightly different:
export async function configApi(): Promise<Config> {
const response = await fetch(`${BACKEND_URI}/config`, {
method: "GET"
});
return (await response.json()) as Config;
}
versus
async function fetchAuthSetup(): Promise<AuthSetup> {
const response = await fetch("/auth_setup");
if (!response.ok) {
throw new Error(`auth setup response was not ok: ${response.status}`);
}
return await response.json();
}
So I wonder if BACKEND_URI is confusing it. What do you see in the network requests of your browser for that request? You could try changing that fetch to just "/config", if you dont have any need to override BACKEND_URI.
from azure-search-openai-demo.
Switching to just /config still results in a 403.
I guess something else to note is that the .auth/me and .auth/refresh don't resolve either, which might another factor in this issue?
is there a reason why the config api request needs to have token sent in authorization headers?
Also, is there a place where you can see the logs that is outputted from the gunicorn server? as opposed to just the app service logs
from azure-search-openai-demo.
If .auth* routes are not working, then your App Service built-in authentication is not set up properly. A correct setup looks like this in the Portal:
But I don't think we've made it a strict requirement that App Service built-in auth must be setup, since we also use the MSAL SDKs to handle authentication. Do you perhaps have a partially setup built-in auth that's messing with stuff? Do you see anything on that authentication page?
I have tips here for viewing App Service logs:
https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/docs/appservice.md
I usually download them. You may need to increase your log level to see more logs, since it defaults to WARNING level in production.
from azure-search-openai-demo.
My auth settings page is identical to yours...
HOWEVER,
Seeing the difference in code you posted versus what version of the repo we had was an issue:
Yours:
export async function configApi(): Promise<Config> {
const response = await fetch(`${BACKEND_URI}/config`, {
method: "GET"
});
return (await response.json()) as Config;
}
Ours:
export async function configApi(idToken: string | undefined): Promise<Config> {
const response = await fetch("/config", {
method: "GET",
headers: getHeaders(idToken)
});
return (await response.json()) as Config;
}
Ill probably need to pull the latest version and then see if those issues still persist, at least on first test, the new version of the code fixed the 403 issue with config
from azure-search-openai-demo.
Ah, yes, I removed getHeaders as I realized the backend wasn't using it. Glad it's working better.
from azure-search-openai-demo.
Ok, I'm still seeing 403 errors accessing /chat, even though the same auth method is working for a local development
not seeing any exceptions in Azure Monitor, nor is anything showing up in App Service Logs with the logging level set to INFO
from azure-search-openai-demo.
Related Issues (20)
- Search resource fails in swedencentral HOT 1
- Use "evaluation app" when the login is required in the "chat app" HOT 2
- Advanced RAG
- Chat answer layout differs in oai from deployment HOT 1
- I am not able to change the "Retrieval mode" in the UX
- Request for company Azure account (needed to get Azure OpenAI account) fails.
- Supporting files with apostrophy / punctuation mark in the file name HOT 3
- local running error: Incomplete environment configuration for EnvironmentCredential. HOT 3
- Error in login_and_acl.md when using ./script/manage.acl should be --document, not --url HOT 4
- adlsgen2setup fails three bugs - 1. cannot set AZURE_ADLS_GEN2_STORAGE_ACCOUNT 2. ./data/* should be ./data in adlsgensetup.sh and 3. Code changes required in adlsgensetup.py HOT 1
- Can we get some examples for AZURE_ADLS_GEN2_FILESYSTEM_PATH and how to use it in documentation please HOT 6
- Integration of a voice input and output option with Speech Services HOT 1
- CannotDeleteOrUpdateEnabledEntitlement: Permission (scope or role) cannot be deleted or updated unless disabled first
- Is there a way not to use DI? HOT 1
- Index not found - looks like hooks are not fired up HOT 5
- How to upload data with DI in portal? HOT 5
- How to change the azure subscription to a new one HOT 3
- Weird/unexpected error with APIM load balancer HOT 1
- [Bug] Retrieval Mode Change doesn't persist to drop-down menu after you close it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-search-openai-demo.