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
This commit is contained in:
Asier Isayas
2026-08-17 06:47:22 -07:00
parent a2d24cc972
commit ea42796379
7 changed files with 29 additions and 266 deletions
+2 -9
View File
@@ -1177,15 +1177,8 @@
},
"connectExplorer": {
"errors": {
"connectionStringMissing": "Connection string is missing.",
"accountNameMissing": "Account name is missing from the connection string.",
"endpointHostMissing": "Endpoint host is missing from the connection string.",
"endpointHostNotAllowed": "Endpoint host is not allowed.",
"accountNameMismatch": "Account name does not match the endpoint host.",
"accountKeyMissing": "Account key is missing from the connection string.",
"connectivityInvalid": "Unable to connect to the account with the provided connection string.",
"connectivityUnreachable": "Unable to connect to the account. Please verify the connection string is correct and that the account is reachable.",
"connectFailed": "Failed to connect using the provided connection string. Please verify it is correct and try again."
"connectFailed": "Failed to connect using the provided connection string. Please verify it is correct and try again.",
"connectivityUnreachable": "Unable to connect to the account. Please verify the connection string is correct and that the account is reachable."
}
}
}