Azure / Azure/data-api-builder

DAB returns 500 on failed authorization

オープン
#1,152 コメント 1 件 リアクション 0 件 担当者 1 名 @sourabh1007 が担当を希望しています GitHub で見る
auth bug
主要言語
C#
スター
1.5k
フォーク
370
平均マージ
3日 22時間
マージ済み PR(30日)
9

説明

Sending a request that should result in a 401/403 ends up with a 500 + a message that says that the user is unauthorized.
![image](https://user-images.githubusercontent.com/5472443/215811051-25e3998a-36b1-4eb0-acff-c0333acd10d3.png)

Config:
```json
{
"$schema": "../schemas/hawaii.draft-01.schema.json",
"data-source": {
"connection-string": "AccountEndpoint=https://hawaii-demo.documents.azure.com:443/;",
"database-type": "cosmosdb_nosql",
"options": {
"database": "mydb",
"container": "joslin2",
"schema": "schema.gql"
}
},
"runtime": {
"rest": {
"enabled": false
},
"graphql": {
"enabled": true,
"path": "/graphql",
"allow-introspection": true
},
"host": {
"mode": "development",
"cors": {
"origins": [
"http://localhost:5000"
],
"allow-credentials": false
},
"authentication": {
"provider": "StaticWebApps"
}
}
},
"entities": {
"Player": {
"source": "mydb.joslin2",
"rest": false,
"graphql": true,
"permissions": [
{
"role": "anonymous",
"actions": [
]
},
{
"role": "authenticated",
"actions": [
"read"
]
},
{
"role": "contributor",
"actions": [
"create",
"read",
"update",
"delete"
]
}
]
}
}
}
```

Schema:
```gql
type Player @model {
id : ID,
name : String,
played: Int,
winPercent: Float,
currentStreak: Int,
maxStreak: Int
}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。