* Add Cosmos DB Shell (NoSQL) support to Cloud Shell
Adds Cosmos DB (NoSQL) support to the Cloud Shell experience and wires up authentication for RBAC / local-auth-disabled accounts:
- Enable the Open Cosmos DB Shell button behind the enableCloudShell feature flag.
- Bootstrap .NET SDK 10 in Cloud Shell before installing the CosmosDBShell tool.
- Force gateway connection mode and add --verbose to surface connection errors.
- Select Entra ID vs account-key auth via isCloudShellEntraAuthEnabled (covers dataplane RBAC and disableLocalAuth accounts).
- Acquire a data-plane-scoped Entra token on demand when no cached aadToken exists, and omit --connect-tenant so a missing token falls through to DefaultAzureCredential (Cloud Shell az session) instead of interactive/device-code auth.
* Fix popup_window_error in CosmosDB Cloud Shell Entra auth
Acquiring an Entra token on demand via acquireMsalTokenForAccount triggered a browser loginPopup (even in silent mode when no MSAL account was cached), which fails with popup_window_error inside the hosted Cloud Shell context. getKey now returns the cached userContext.aadToken when present, or an empty string otherwise. With no token exported, the CosmosDBShell tool falls through to DefaultAzureCredential, which uses the Cloud Shell's signed-in az session.
* Force --connect-azure-cli whenever no credential env var is exported
In Azure Cloud Shell, DefaultAzureCredential tries ManagedIdentityCredential first, which cannot mint a token for the *.documents.azure.com audience (AudienceNotSupported). Force AzureCliCredential via --connect-azure-cli whenever no key/token env var is exported, covering both the Entra-no-token and key-auth-empty-key cases. Also auto-update the CosmosDBShell tool so cached installs pick up the new flag.
* Silently mint a Cosmos data-plane token for the Cloud Shell Entra path
A disableLocalAuth Cosmos account whose Data Explorer session is still in key mode has no cached userContext.aadToken, and the ephemeral Cloud Shell can obtain a Cosmos token from neither its managed identity (AudienceNotSupported for *.documents.azure.com) nor its az session (not logged in). Mint a Cosmos-scoped token in the browser and export it via COSMOSDB_SHELL_TOKEN. The acquisition is guarded on an existing cached MSAL account so it can never trigger an interactive popup, and any failure returns an empty string so the tool falls back to --connect-azure-cli.
* Only accept Y/N at the Cloud Shell consent prompt
askConfirmation now ignores any key that is not Y or N instead of treating every non-Y key as a decline, so an accidental keypress no longer aborts the Cloud Shell consent flow. Also add diagnostic warnings on the Cloud Shell token path so the browser console reveals whether the silent Cosmos token mint was skipped (no cached MSAL account) or returned empty.
* Use device-code auth when Cloud Shell has no token
* Pass the Data Explorer credential to the Cosmos DB shell instead of signing in interactively
Azure Cloud Shell cannot authenticate to Cosmos DB on its own: its managed identity
is rejected with AudienceNotSupported for the *.documents.azure.com audience, its az
session is not signed in, and neither the interactive browser nor the device-code flow
is usable from the embedded terminal.
Resolve the credential in Data Explorer and hand it to the shell out-of-band:
- getCosmosDBShellCredential() returns an Entra ID data-plane token (cached aadToken,
or one minted silently only when an MSAL account already exists so it can never
trigger a popup), falling back to the account master key unless local auth is
disabled. It reports which kind it resolved so the correct env var is exported.
- CosmosDBShellHandler exports COSMOSDB_SHELL_TOKEN or COSMOSDB_SHELL_ACCOUNT_KEY and
drops every credential flag, so the tool always lands on a terminal, non-interactive
step of its credential chain.
- When nothing can be resolved, print actionable guidance instead of launching the
tool with no credential.
* Fix TS7011 in ShellTypeFactory tests by typing the mocked getAllAccounts
The empty array literal in the getMsalInstance mock had no contextual type, so
tsc inferred an implicit any[] return under noImplicitAny. Route every mock
through a typed mockMsalAccounts helper.
* Reuse DE's cached credential for Cosmos DB Shell; add read-only key fallback
* Deliver Cosmos DB Shell key as a full connection string; harden key resolution
* Surface the specific reason a Cosmos DB Shell credential could not be resolved
* Deliver Cosmos DB Shell credential inline (export+connect on one line), mirroring Mongo handler
* Log which Cosmos DB Shell credential kind was resolved for debugging
* Increase ARM timeout for Cloud Shell provisioning calls to avoid spurious abort errors
* Gate Cosmos DB Shell button behind enableCosmosDBShell feature flag
* Fix TS2741: add missing enableCosmosDBShell to Features test fixture
Removes the GitHub notebook-repo integration that only existed to pin/browse notebook repositories. Deletes src/GitHub/, the GitHub controls/panes, GitHubUtils, JunoUtils, and the connectToGitHub webpack entry. Decouples NotebookManager, useNotebook, the resource tree, and Explorer from GitHub wiring. Trims JunoClient's GitHub-only methods while keeping the Schema and gallery methods. Removes GitHub config fields from ConfigContext and strips the dead github:// branches from NotebookUtil.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add implementation plan for removing Phoenix and notebooks
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Phase 1: Decouple database shells from Phoenix to CloudShell-only
Migrate all shell terminals to the CloudShell path and remove the legacy Phoenix notebook-server terminal code so shells no longer depend on notebook provisioning.
- TerminalTab now always uses CloudShellTerminalComponentAdapter; removed the notebook-server adapter branch, getNotebookServerInfo, and the dead VCoreMongo firewall check
- Migrate Postgres and VCore Mongo quickstart tabs to CloudShellTerminalComponent (drop allocateContainer/useNotebook dependencies)
- Refactor useTerminal to send input via the CloudShell WebSocket instead of postRobot/iframe; register the socket from CloudShellTerminalComponent
- Simplify Explorer.openNotebookTerminal to always open a CloudShell terminal
- Delete NotebookTerminalComponent(+test/less/snapshot), NotebookTerminalComponentAdapter, and the src/Terminal/ entry point
- Remove the terminal.html webpack entry/HTML plugin and src/Terminal from tsconfig.strict.json
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Adding further console logging but also fixed lines with JSON.stringify(error)
* Added retry mechanism for GETs for armRequest workflow
* Moved stringifyError into its own file as it was causing strict compile issues in ErrorHandlingUtils
* Removing temporary debug logging
* Undoing eslint change as well
* Adding further console logging but also fixed lines with JSON.stringify(error)
* Added retry mechanism for GETs for armRequest workflow
* Moved stringifyError into its own file as it was causing strict compile issues in ErrorHandlingUtils
* Reapply "MSAL browser migration changes"
This reverts commit 60a65efb7b.
* Fix redirect URI for localhost
* Fix URI for logout and other minor fix
* Remove unnecessary files
* Fix tests
* Fix tests
* Run npm format
* Address comments
* Address comment
* Temporarily re-enable key based auth for Mongo and Cassandra tests.
* Increase number of shards for playwright tests.
* Another small bump to test shard count.
* click global new... button then collection in playwright tests
* get new table button
* create and delete container for every individual scale test
* for scale and settings, dont create sample data in container
* run scale tests serially
* refactor scale setup and tear down to be within each test
* record network traces
* record network calls on all retries
* when disposing of database during playwright test, refresh tree to remove deleted database
* refresh tree before opening scale and settings
* When opening scale and settings, refresh databases
* reload all databases before loading offers
* increase time for change partition key request
* increase time for change partition key request
* refresh databases in test instead of product code
* when refreshing containers, open console window to check for status completion
* close notification console window after seeing desired log
* create and delete a container for each individual test
* dont delete database after every test. leave it to the CI
* Don't refresh databases when opening Scale+Settings and only delete database if running locally
* only open scale and settings at the beginning of each test suite
* get it back to working
* change settings.spect.ts from serial to parallel
* don't delete database after each test
* update container creation throughpout to be 5000
* run tests with no throughput limit on the account
* adjust scale test to reflect no throughput limit on account
* remove test container throughput
* don't refresh collections when clicking settings in product code
* refactor and run cleanup during pr check
* copy cleanup accounts
* run cleanup after playwright tests
* run cleanup every three hours
* revert ci.yml
* update cpk test
* remove cpk
* remove cleanup accounts and add cpk
* add cpk
* remove cpk changes
* revert ci.yml
* run cleanup every two hours
---------
Co-authored-by: Jade Welton <jawelton@microsoft.com>
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Added health metrics for application load
* Added health metrics for application load
* Fix unit tests
* Added more metrics
* Added few comments
* Added DatabaseLoad Scenario and address comments
* Fix unit tests
* fix unit tests
* Fix unit tests
* fix unit tests
* fix the mock
* Fix unit tests
* Initial dev for container copy
* remove padding from label
* Added Copy Job prerequisites screen
* Added hooks to evaluate reader role access
* added copyjob pre-requsite screen along with it's validations
* Added monitor copy job list screen
* added copy job list refresh and reset functionality
* remove arm token dependency
* fetch account details from account id instead of context
* Fix lint & typescript checks
* show copyjob screen from portal navigation
* adding copy job details screen
* remove duplicate code & show sql accounts only
* ui fixes for list job page
* pending icon
* copy job details screen ui
* reset .vscode/settings.json
* Fixed existing UTs
* disabling action buttons until it's in progress
* fixed formatting
* Adding loader on submit button and show job creation errors in the panel itself
* updating disabling action menu item logic
* added custom pager
* fix lint and ts errors
* updating file names and removing comments
* remove comments
* modularize the arom common code
* Adding content and removing tooltip
* updating job details screen
* updating online copy enabled screen
* Adding below changes
- Don't show permission screen for same account in offline mode
- Don't show identity permissions for same account in online mode
- Show error message if selected containers are identical
- Update abort signal messages
* added feedback code from explorer
* Add tooltips and long polling
- Added tooltips to permission sections
- Implemented long polling for PITR and online copy enabled sections
- Long polling automatically stops after 15 minutes
- After polling ends, a refresh button will be displayed
---------
Co-authored-by: nishthaAhujaa <nishtha17354@iiittd.ac.in>
* master pull
* Better VSCode detection
* Prettier run
* Update .npmrc
* Update settings.json
* Fixed ESLint error
* Changed the VSCode detection to a test url that will not open if successful
* Initial UX changes to Add Collection Panel
* Removing changes from other branch
* Reverting explorer changes
* Snapshot updates and Lint fixes
* Formatting fixes
* Setting separator spacing the same
* Update test snapshot
* Reverting Manual to old UI
* master pull
* Reverting .npmrc file
* Removed logging userContext
* Prettier run
* Added support for opening CosmosDB Account without clicking database tab
* Reverting change in settings.json
* Prettier run
* Added check if the link closed
* Added check if the link didn't closed
* Check if VS Code was opened, if not popup with download button link
* Prettier run
* Redirect to Download VS Code if not opened
* Added error message to VS Code timeout and redirect
* Fixing baseUrl from testing
* Increased timeout for when user is asked to open VS Code
* switched to iframe for redirects
* Fixed VS Code url
* Removed insider url
* Added log messages
* Added link to vCore data explorer dashboard
* Increased timeout to 2.5 secs to see if that helps with VS Code open popup
* Changed to dialog box
* Changed param name
* Increase startTime for extra popup
* Changed to dialog box only when no VS Code detected
* Fixed vscode url
* Changed title back to Open CosmosDB in VS Code
* Added text on required extensions
* Removed text on required extensions as it will prompt by default
* Fixed wording and Primary Button timeout
* Spelled out VS Code
* Removed console log of timeout
* Updated snapshots and lowered timeout
* Remove VS Code button from Gremlin
* Prettier run on CommandBarComponentButtonFactory
* Changed from referencing location to a link
* Prettier run
* Reverting back to popup for opening
* Updated unit test snapshots
* Added vscode: to Content Security Policy
* Reverting back to popup only if opening times out
* Corrected misspelled url
* Corrected url
* Added event listener to check if DE is in focus or not, to prevent showing dialog when VS Code is opened
* Prettier and url fix
* Moved closeDialog before removing event listener
* Changed handleFocus to a const rather than function
* Changed listener to document
* Decreased timeout time
* Reverting back to popup by default as too many factors are present using a timeout
* master pull
* Reverting .npmrc file
* Removed logging userContext
* Prettier run
* Added support for opening CosmosDB Account without clicking database tab
* Reverting change in settings.json
* Prettier run
* Added check if the link closed
* Added check if the link didn't closed
* Check if VS Code was opened, if not popup with download button link
* Prettier run
* Redirect to Download VS Code if not opened
* Added error message to VS Code timeout and redirect
* Fixing baseUrl from testing
* Increased timeout for when user is asked to open VS Code
* switched to iframe for redirects
* Fixed VS Code url
* Removed insider url
* Added log messages
* Added link to vCore data explorer dashboard
* Increased timeout to 2.5 secs to see if that helps with VS Code open popup
* Changed to dialog box
* Changed param name
* Increase startTime for extra popup
* Changed to dialog box only when no VS Code detected
* Fixed vscode url
* Changed title back to Open CosmosDB in VS Code
* Added text on required extensions
* Removed text on required extensions as it will prompt by default
* Fixed wording and Primary Button timeout
* Spelled out VS Code
* Removed console log of timeout
* Updated snapshots and lowered timeout
* Remove VS Code button from Gremlin
* Prettier run on CommandBarComponentButtonFactory
* Changed from referencing location to a link
* Prettier run
* Reverting back to popup for opening
* Updated unit test snapshots
* Added vscode: to Content Security Policy
* Reverting back to popup only if opening times out
* Corrected misspelled url
* Corrected url
* master pull
* Reverting .npmrc file
* Removed logging userContext
* Prettier run
* Added support for opening CosmosDB Account without clicking database tab
* Reverting change in settings.json
* Prettier run
* Added check if the link closed
* Added check if the link didn't closed
* Check if VS Code was opened, if not popup with download button link
* Prettier run
* Redirect to Download VS Code if not opened
* Added error message to VS Code timeout and redirect
* Fixing baseUrl from testing
* Increased timeout for when user is asked to open VS Code
* switched to iframe for redirects
* Fixed VS Code url
* Removed insider url
* Added log messages
* Added link to vCore data explorer dashboard
* Increased timeout to 2.5 secs to see if that helps with VS Code open popup
* Changed to dialog box
* Changed param name
* Increase startTime for extra popup
* Changed to dialog box only when no VS Code detected
* Fixed vscode url
* Changed title back to Open CosmosDB in VS Code
* Added text on required extensions
* Removed text on required extensions as it will prompt by default
* Fixed wording and Primary Button timeout
* Spelled out VS Code
* Removed console log of timeout
* Updated snapshots and lowered timeout
* Remove VS Code button from Gremlin
* Prettier run on CommandBarComponentButtonFactory
* Changed from referencing location to a link
* Prettier run
* Reverting back to popup for opening
* Updated unit test snapshots
* Added vscode: to Content Security Policy
* Reverting back to popup only if opening times out
* Implement fabric native path
* Fix default values to work with current fabric clients
* Fix Fabric native mode
* Fix unit test
* export Fabric context
* Dynamically close Home tab for Mirrored databases in Fabric rather than conditional init (which doesn't work for Native)
* For Fabric native, don't show "Delete Database" in context menu and reading databases should return the database from the context.
* Update to V3 messaging
* For data plane operations, skip ARM for Fabric native. Refine the tests for fabric to make the distinction between mirrored key, mirrored AAD and native. Fix FabricUtil to strict compile.
* Add support for refreshing access tokens
* Buf fix: don't wait for refresh is async
* Fix format
* Fix strict compile issue
---------
Co-authored-by: Laurent Nguyen <languye@microsoft.com>
* Removed NPS Survey from DE since it has been moved to the Overview Blade
* Added ExplorerBindings back
* Moved applyExplorerBindings back to original place
* Persist query multiple query texts
* Save multiple query tab histories
* Save and restore states for QueryTab and DocumentsTab for SQL and Mongo
* Enable Collection Scale/Settings restore
* Persist documents tab current filter
* Fix DocumentsTab conflict resolve mistake
* Remove unused variable
* Fix e2e test
* Fix e2e localStorage reference
* Try clearing local storage via playwright page
* Clear local storage after opening page
* Move restore flag behind feature flag. Whitelist restorable tabs in for Fabric. Restore e2e tests.
* Fix typo
* Fix: avoid setting undefined for preferredSize for the <Allotment.Pane>
* Add comments
* Move restore tabs after knockout configure step from Explorer constructor (which could be called multiple times)
* Add a silent parameter to acquireTokenWithMsal
If true, the function won't retry to sign in using a Popup if silent token acquisition fails.
* Improve Login for Entra ID RBAC button logic
Try to reuse an existing signed-in MSAL account to get the AAD token
and fall back to full sign-in otherwise.
Also move the logic to AuthorizationUtils
* Try to acquire an Entra ID token silently on startup.
When running in Portal MSAL should be able to reuse the
MSAL account from Portal and allow us to silently get
the RBAC token. If it fails we'll show the Login for Entry ID RBAC
button as usual.
* Small code improvements
* Remove the RBAC notice from settings pane
and try to acquire RBAC token silently after enabling RBAC.
* Use msal.ssoSilent with an optional login hint
to avoid more sign-in popups.
msal.loginPopup will be used as a backup option if ssoSilent fails.
Ideally the parent environment (Portal/Fabric) should send
a loginHint with the username of the currently signed in user that
can be passed to the token acquisition flow.
* Improve RBAC error wording, clarifying where to find the Login button.
* Reapply "Enable column selection and sorting in DocumentsTab (with persistence) (#1881)" (#1960)
This reverts commit fe9730206e.
* Fix logic bug: always include defaultQueryFields in query.
* Show resize column option outside of feature flag
* Improve prevention of no selected columns
* Add more unit tests
* Fix styling on table
* Update test snapshots
* Remove "sortable" property on table which makes the header cell focusable (user sorts by selecting menu item, not by clicking on cell)
* Initial implementation of saving split value to local storage
* Make table columns generic (no more id and partition keys)
* Save column width
* Add column selection from right-click
* Implement new menu for column selection with search.
* Switch icons and search compare with lowercase.
* Search uses string includes instead of startsWith
* Only allow data fields that can be rendered (string and numbers) in column selection
* Accumulate properties rather than replace for column definitions
* Do not allow deselecting all columns
* Move table values under its own property
* Update choices of column when creating new or updating document
* Rework column selection UI
* Fix table size issue with some heuristics
* Fix heuristic for size update
* Don't allow unselecting last column
* Implement column sorting
* Fix format
* Fix format, update snapshots
* Add reset button to column selection and fix naming of openUploadItemsPanePane()
* Fix unit tests
* Fix unit test
* Persist column selection
* Persist column sorting
* Save columns definition (schema) along with selected columns.
* Merge branch 'master' into users/languy/save-documentstab-prefs
* Revert "Merge branch 'master' into users/languy/save-documentstab-prefs"
This reverts commit e5a82fd356.
* Disable column selection for Mongo. Remove extra refresh button
* Update test snapshots
* Remove unused function
* Fix table width
* Add background color to "..." button for column selection
* Label to indicate which field is a partition key in Column Selection Pane
* Update unit test snapshot
* Move column selection and sorting behind feature flag enableDocumentsTableColumnSelection
* Cleanup checkbox styles
* start redesign work
* add left padding to all tree nodes
* fiddling with padding
* align tab bar line with first item in resource tree
* final touch ups
* fix a strange password manager autofill prompt
* add keyboard shortcuts
* revert testing change
* nudge messagebar to layout row height
* tidy up
* switch to Allotment to stop ResizeObserver issues with monaco
* refmt and fix lints
* fabric touch-ups
* update snapshots
* remove explicit react-icons dependency
* reinstall packages
* remove background from FluentProvider
* fix alignment of message bar
* undo temporary workaround
* restore refresh button
* fix e2e tests and reformat
* fix compiler error
* remove uiw/react-split
* uncomment selection change on expand
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Address errors and checks
* Cleanup DP RBAC code
* Run format
* Fix unit tests
* Remove unnecessary code
* Run npm format
* Fix enableAadDataPlane feature flag behavior
* Fix enable AAD dataplane feature flag behavior
* Address feedback comments
* Minor fix
* Add new fixes
* Fix Tables test
* Run npm format
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Mongo Proxy backend API
* merge main into current
* allow mongo proxy endpoints to be constants
* allow mongo proxy endpoints to be constants
* fix test
* check for allowed mongo proxy endpoint
* check for allowed mongo proxy endpoint
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>