mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-08-30 10:18:40 +01:00
Support sovereign/PPE endpoint zones for connection string login
Move the hardcoded account endpoint suffixes out of Constants and into ConfigContext so connection string login works in sovereign clouds and PPE, and widen ConnectionStringParser to accept every configured zone. Surface Portal Backend rejections in the hosted connect form: read the body off the Response that fetchEncryptedToken throws, and offer a firewall help link on a 403. Add an E2E test covering SQL connection string login against an account with public network access disabled.
This commit is contained in:
@@ -49,6 +49,7 @@ export enum TestAccount {
|
||||
SQLReadOnly = "SQLReadOnly",
|
||||
SQLContainerCopyOnly = "SQLContainerCopyOnly",
|
||||
SQLConnectionString = "SQLConnectionString",
|
||||
SQLConnectionStringPublicNetworkAccessDisabled = "SQLConnectionStringPublicNetworkAccessDisabled",
|
||||
TableConnectionString = "TableConnectionString",
|
||||
GremlinConnectionString = "GremlinConnectionString",
|
||||
}
|
||||
@@ -83,6 +84,8 @@ export function getDefaultAccountName(accountType: TestAccount): string {
|
||||
return `${accountNamePrefix}-de-test-sql-containercopy`;
|
||||
case TestAccount.SQLConnectionString:
|
||||
return `${accountNamePrefix}-de-test-sql-connstring-1`;
|
||||
case TestAccount.SQLConnectionStringPublicNetworkAccessDisabled:
|
||||
return `${accountNamePrefix}-de-test-sql-connstring-nopublic-1`;
|
||||
case TestAccount.TableConnectionString:
|
||||
return `${accountNamePrefix}-de-test-table-connstring-1`;
|
||||
case TestAccount.GremlinConnectionString:
|
||||
@@ -258,6 +261,7 @@ export async function getTestExplorerUrl(accountType: TestAccount, options?: Tes
|
||||
break;
|
||||
|
||||
case TestAccount.SQLConnectionString:
|
||||
case TestAccount.SQLConnectionStringPublicNetworkAccessDisabled:
|
||||
case TestAccount.TableConnectionString:
|
||||
case TestAccount.GremlinConnectionString:
|
||||
// Connection string (account key) login navigates directly to hostedExplorer.html and doesn't
|
||||
|
||||
Reference in New Issue
Block a user