Azure AD and Role Based Security Queries. #1443
Unanswered
Madhan-Rommala
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi @Madhan-Rommala ,
{
"error": {
"code": "AuthorizationCheckFailed",
"message": "Authorization Failure: Access Not Allowed.",
"status": 403
}
} your issue could possibly occur due to your container not acquiring your latest intended configuration file. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Guys!
I had couple of queries related to DAB API's access related stuff.
Below are the list of components and configurations used:
Implemented the instructions mentioned in this link https://github.com/Azure/data-api-builder/blob/main/docs/authentication-azure-ad.md#authentication-with-azure-ad
Created and configured Data API Builder's Azure AD app registration.
While register the app, Set the supported account types to "Accounts in this organizational directory only" to restict data api access to external audience.
Assign users/roles to Data API Builder application like below.
DAB-Configuration-File:
`{
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v0.5.35/dab.draft.schema.json",
"data-source": {
"database-type": "mssql",
"options": {
"set-session-context": false
},
"connection-string": "@env('DATABASE_CONNECTION_STRING')"
},
"runtime": {
"rest": {
"enabled": true,
"path": "/api"
},
"graphql": {
"allow-introspection": true,
"enabled": true,
"path": "/graphql"
},
"host": {
"mode": "development",
"cors": {
"origins": [
"http://localhost:5000"
],
"allow-credentials": false
},
"authentication": {
"provider": "AzureAD",
"jwt": {
"audience": "*************************",
"issuer": "https://login.microsoftonline.com/******************************/v2.0"
}
}
}
},
"entities": {
"AppName": {
"source": {
"object": "Common.AppName_DAB_test",
"type": "table",
"key-fields": [
"AppID"
]
},
"permissions": [
{
"role": "anonymous",
"actions": [
"read"
]
},
{
"role": "contributor",
"actions": [
"read",
"create"
]
}
]
}
}
}
`
So, here is my list of questions and obervations:
If I make any changes to the configuration file in my Azure storage account, as shown below, I must restart the Azure container instance for every time to reflect those changes. Is their any workaround to update changes automatically?
Even though we use Azure AD authentication, my Data API url's are still accessible to outside of the organisations.
Note : while registering the app, we already enabled the property account types to "Accounts in this organizational directory only" to restict data api access to external audience.
3.I removed the "anonymous" role from the configuration file, but left the "contributor" role with "read" and "create" access enabled.. However, after removing "anonymous" role, I was unable to access the API. Please see the snaps below.
Beta Was this translation helpful? Give feedback.
All reactions