mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 10:21:37 +00:00
Revert RBAC feature flag behavior (#1910)
* 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 * Remove unnecessary code * Remove unnecessary code * Add code to fix VCoreMongo/PG bug * Address feedback * Add more logs for RBAC feature * Add more logs for RBAC features * Revert enableAADDataPlane feature flag behavior * Address feedback * Address comment --------- Co-authored-by: Asier Isayas <aisayas@microsoft.com>
This commit is contained in:
@@ -338,18 +338,6 @@ async function configureHostedWithAAD(config: AAD): Promise<Explorer> {
|
||||
);
|
||||
await fetchAndUpdateKeys(subscriptionId, resourceGroup, account.name);
|
||||
}
|
||||
} else {
|
||||
Logger.logInfo(
|
||||
`AAD Feature flag is enabled for account ${account.name} with disable local auth set to ${account.properties.disableLocalAuth} `,
|
||||
"Explorer/configureHostedWithAAD",
|
||||
);
|
||||
if (!account.properties.disableLocalAuth) {
|
||||
Logger.logInfo(
|
||||
`Fetching keys for ${userContext.apiType} account ${account.name} with AAD data plane feature enabled`,
|
||||
"Explorer/configureHostedWithAAD",
|
||||
);
|
||||
await fetchAndUpdateKeys(subscriptionId, resourceGroup, account.name);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
if (userContext.features.enableAadDataPlane) {
|
||||
@@ -470,7 +458,6 @@ async function fetchAndUpdateKeys(subscriptionId: string, resourceGroup: string,
|
||||
Logger.logInfo(`Fetching keys for ${userContext.apiType} account ${account}`, "Explorer/fetchAndUpdateKeys");
|
||||
const keys = await listKeys(subscriptionId, resourceGroup, account);
|
||||
Logger.logInfo(`Keys fetched for ${userContext.apiType} account ${account}`, "Explorer/fetchAndUpdateKeys");
|
||||
|
||||
updateUserContext({
|
||||
masterKey: keys.primaryMasterKey,
|
||||
});
|
||||
@@ -479,7 +466,7 @@ async function fetchAndUpdateKeys(subscriptionId: string, resourceGroup: string,
|
||||
"Explorer/fetchAndUpdateKeys",
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Error during fetching keys or updating user context:", error);
|
||||
logConsoleError(`Error occurred fetching keys for the account." ${error.message}`);
|
||||
Logger.logError(
|
||||
`Error during fetching keys or updating user context: ${error} for ${userContext.apiType} account ${account}`,
|
||||
"Explorer/fetchAndUpdateKeys",
|
||||
|
||||
Reference in New Issue
Block a user