* Add client-side connection-string login for SQL, Tables, and Gremlin
SQL, Tables, and Gremlin now sign data-plane requests client-side with the account key and skip the Portal Backend proxy (generatetoken/accessinputmetadata/authorizationtokens). Adds client-side host/account validation mirroring the backend ValidateHostAndAccount, plus a real CosmosClient connectivity probe that gates opening the Data Explorer. Mongo and Cassandra continue to use the encrypted-token proxy path.
* Localize connection-string login validation and connectivity messages
Move the hardcoded SQL/Tables/Gremlin connection-string login strings into en/Resources.json and reference them via the type-safe Keys object (t(Keys.connectExplorer.errors.*)).
* Drop unused mongodb:// branch from endpoint host extraction
* Remove Data Explorer references from connectivity probe comment
* Reword proxy reference in ConnectionString comment
* Fix trailing whitespace in connectivity probe comment
* Send connection string in Authorization header for Mongo/Cassandra token request
* Add E2E connection string login tests for SQL, Gremlin, and Tables
* Add wrong account key test for SQL connection string login
* Add access token to authorization header for encrypted token flow
* Wire connection string login E2E tests to dedicated connstring accounts in CI
Add TestAuthType and fold connection-string account resolution into getAccountName; seed and target the dedicated *-connstring accounts in CI while falling back to the standard per-API account locally.
* Handle connection string account types in getTestExplorerUrl switch
* Move globalThis.crypto polyfill to fx.ts so it runs for all specs
* Remove connection string validation for connection string login
- Remove validateDirectConnectionStringLogin and its helpers (extractEndpointHostFromConnectionString, extractHostToken, directLoginAllowlistedEndpointZones)
- Remove old extractMasterKeyfromConnectionString (Gremlin-specific), rename extractAccountKeyFromConnectionString to extractMasterKeyfromConnectionString
- Change validateDirectConnectionStringConnectivity to throw on error instead of returning string|undefined
- Simplify direct-login flow: submit connection string to CosmosClient as-is, no format or endpoint validation
- Keep connectivity pre-check (throws if CosmosClient cannot reach account)
- Remove 6 unused localization keys for validation errors
- Update tests to match new behavior
* Send authorization header for connection string login backend calls
* Simplify connection string login error handling
- Lift the login error state into HostedExplorer so failures from the connect form and from a postMessage login share one source of truth
- Show the message returned by the service instead of falling back to a generic unreachable message
- Move isAuthorizationError into AuthorizationUtils alongside the other shared auth helpers
- Widen getErrorMessage to accept unknown so catch variables no longer need a cast
- Show the connect screen error tooltip beside the icon and widen it so long service messages fit
- Consolidate the repeated account lookup and login steps in the SQL connection string spec
* Consolidate hosted login account metadata into a single state
Encrypted-token and direct connection-string logins now write to one accountMetadata state instead of two, which also fixes the connect form staying mounted after a successful SQL/Tables/Gremlin login. Deletes the now-unused useTokenMetadata hook and moves fetchAccessData to Platform/Hosted/Helpers/PortalAccessData.ts.
* Accept connection string logins without validating them
SQL, Tables, and Gremlin logins probed the account before signing in, so a user whose key was wrong or whose account was unreachable was blocked at the connect form. The probe is now gone: the connection string is accepted as-is and any bad key surfaces on the data-plane requests made from inside the explorer.
Removes validateDirectConnectionStringConnectivity, isAuthorizationError, and the connectExplorer.errors.connectFailed string along with their tests.
Also takes documentEndpoint straight from the AccountEndpoint in SQL and Gremlin connection strings instead of rebuilding it from the account name and a hardcoded DNS zone. Tables still derives it, since a Tables connection string only carries the table endpoint.
* Keep the connect form login error local to ConnectExplorer
The error state was lifted into HostedExplorer so a postMessage login could report failures, which meant the connect screen needed a second copy of the error markup for the AAD view. That copy fell outside the connectExplorerContent selector the tooltip styles are scoped to, so it rendered the message as unstyled inline text.
Move the state back into ConnectExplorer and let connectWithConnectionString log the failure as it did before. A failed postMessage login still leaves the user on the connect screen either way.
* Move Portal Backend calls into a PortalBackendClient helper
fetchEncryptedToken and isAccountRestrictedForConnectionStringLogin lived in ConnectExplorer.tsx, so HostedExplorer imported a network call from a React component. Merge them with fetchAccessData into src/Platform/Hosted/Helpers/PortalBackendClient.ts along with the PortalBackendError type, leaving ConnectExplorer as UI only.
* Leave the encrypted token login path as it is on master
The direct connection string login work does not change how Mongo and Cassandra logins fail, so drop the 401/403 handling this branch added around fetchEncryptedToken along with the now unused isAuthorizationError helper.
* Move the Portal Backend connection string calls out of Helpers
Helpers holds pure string utilities, and every other *Client in the repo sits at its domain root, so name the module for the endpoints it wraps and place it beside HostedUtils. Also drop the branch's ConnectScreen.less tooltip restyle, which was unrelated to connection string login.
* Move the Portal Backend client to Common
The module is a plain service client with no dependency on the hosted platform, and CosmosClient and MetricEvents already hand roll their own Portal Backend calls, so Common is where a shared client belongs.
* Add an E2E test that SQL connection string login skips the Portal Backend
Nothing asserted the defining behavior of the direct login path, so reverting the short-circuit in connectWithConnectionString would have gone unnoticed. The listener filters on the connectionstring route so it covers both generatetoken and accessinputmetadata, and leaves the account restriction check alone since that still runs for every API.
* Refer to the Table API as Table in comments
The comments added by this branch alternated between Table and Tables when naming the API alongside SQL and Gremlin. TablesDB is left alone since that is the literal database name, as is the plural noun where it refers to actual tables.
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Initial change for online partition key change
* Refactoring container copy strings so they can be locallized
* Missed a file
* Fixing some issues found by lint
* Fixing errors
* Fixing unit tests
* Fixing error caused by merging from master
* Fixing minor error from merge
* Fixing merge error
* Addressing comments
* Addressing some PR comments
* Minor issues
* Refixing a formatting issue
* Fixed localization error
* feat: add copyable ID to delete confirmation dialogs
When deleting databases or containers, the confirmation dialog now displays
the resource ID in a read-only text field with a copy button, allowing users
to copy-paste the ID into the confirmation input instead of typing it manually.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fixed formatting.
* revert non-en locale changes; add localization instruction
Revert changes to non-English locale files — translations are managed
by a separate localization process. Add a note to copilot instructions
clarifying that only en/Resources.json should be modified.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: capitalize 'Id' in copyable resource ID labels
Changed 'id:' to 'Id:' in the copyable ID labels for delete confirmation
dialogs (both database and collection).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: capitalize collection name in copyable ID label
Use getCollectionName() directly (returns 'Container', 'Collection', etc.)
instead of the lowercased collectionName variable for the copyable ID label.
The database panel already used getDatabaseName() which returns capitalized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add warning message to delete container confirmation dialog
Added the same warning banner that exists in the delete database dialog
to the delete container dialog, informing users that the action cannot
be undone and will permanently delete the resource and its children.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Copilot assisted changes to remove shared throughput options in add database/container.
* Add E2E tests verifying shared throughput option is removed from creation dialogs
Add three new E2E tests to sharedThroughput.spec.ts:
- New Database panel should not show shared throughput checkbox
- New Container panel should not show shared throughput checkbox when creating new database
- Dedicated throughput checkbox still appears for existing shared database (regression guard)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* default throughput bucket
* nit
* show inactive buckets
* add e2e tests for default throughput bucket
* for test sql containers, use throughput of 4000
* remove container throughput on creation
* added offer throughput
* add default throughput bucket info link
* add text localization
* upgrade playwright
* Fix flaky permissionsScreen test by using unrouteAll with ignoreErrors
* fix: move container creation to beforeAll to reduce CI shard timeout
* remove comment
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>