Azure / Azure/cosmos-explorer

Issues using Cosmos Explorer with Local Auth Disabled

Open
#1,470 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
131
Forks
67
Avg merge
3d 13h
Merged PRs (30d)
10

Description

We currently have a Cosmos Database hosted within Azure and the recommendation by Microsoft is to have local authentication disabled and to authenticate using AD instead.

We are able to get this to work with our .NET services using managed identity with the correct RA but when trying to use the data explorer either in the portal or on https://cosmos.azure.com/ we get the following error:

`Failed to get authorization headers for docs: Unexpected end of JSON input`

This is when we try and load the items within a container itself, we can load everything else such as the list of containers, the settings for a container etc.

It comes back with a 401 on a POST request to this URL: https://main.documentdb.ext.azure.com/api/guest/runtimeproxy/authorizationTokens

We have assigned the Cosmos DB Data Contributor role through the Azure CLI (using the az cosmosdb sql role assignment command) to the AD users that are trying to access the containers within the database.

We are using private endpoints with the Cosmos DB instance but we have exceptions in place to Accept Connections from within public Azure datacentres and to allow access from Azure Portal.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure in Cosmos Explorer or the Azure portal with local authentication disabled, then inspect the POST request to /api/guest/runtimeproxy/authorizationTokens and its 401 response. Compare access to container lists and settings with loading container items. Done means AD-authenticated users with the Cosmos DB Data Contributor role can load container items without the authorization-header error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
authentication, cloud, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.