Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-tenant switching for Data Plane RBAC #1988

Merged
merged 49 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e1430fd
Fix API endpoint for CassandraProxy query API
sindhuba Mar 18, 2024
5042f28
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Mar 25, 2024
6bdc714
activate Mongo Proxy and Cassandra Proxy in Prod
Apr 8, 2024
d3a3033
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Apr 8, 2024
2bc09a6
Add CP Prod endpoint
sindhuba Apr 8, 2024
c6ad538
Run npm format and tests
sindhuba Apr 8, 2024
78d9a0c
Revert code
sindhuba Apr 8, 2024
16c7b25
fix bug that blocked local mongo proxy and cassandra proxy development
Apr 9, 2024
5ee4116
Add prod endpoint
sindhuba Apr 9, 2024
a712193
fix pr check tests
Apr 9, 2024
b2d5f91
Remove prod
sindhuba Apr 9, 2024
2243ad8
Remove prod endpoint
sindhuba Apr 9, 2024
4c7aca9
Merge branch 'users/aisayas/mp-cp-activate-prod' of https://github.co…
sindhuba Apr 9, 2024
ef7c2fe
Remove dev endpoint
sindhuba Apr 10, 2024
10a8505
Support data plane RBAC
sindhuba Jun 14, 2024
4d8bb5c
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jun 14, 2024
be87173
Support data plane RBAC
sindhuba Jun 14, 2024
24af64a
Add additional changes for Portal RBAC functionality
sindhuba Jun 19, 2024
8849526
Merge branch 'add-dp-rbac' of https://github.com/Azure/cosmos-explorer
sindhuba Jun 19, 2024
912688d
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jun 27, 2024
0079a91
Resolved merge conflict
sindhuba Jul 1, 2024
3e48393
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 3, 2024
ab5239d
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 8, 2024
8140f0e
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 8, 2024
8c888a7
Remove unnecessary code
sindhuba Jul 8, 2024
2740657
Remove unnecessary code
sindhuba Jul 8, 2024
1ddd372
Add code to fix VCoreMongo/PG bug
sindhuba Jul 8, 2024
dc289ec
Address feedback
sindhuba Jul 9, 2024
89374a1
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 10, 2024
2b11e0e
Add more logs for RBAC feature
sindhuba Jul 10, 2024
5a16eec
Add more logs for RBAC features
sindhuba Jul 10, 2024
29a1a81
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 16, 2024
2b84af6
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 19, 2024
e51c28c
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 24, 2024
d7825f4
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Jul 30, 2024
bc8094f
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Aug 5, 2024
4176a8a
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Aug 21, 2024
ec3afa0
Add AAD endpoints for all environments
sindhuba Aug 21, 2024
89a3a04
Add AAD endpoints
sindhuba Aug 21, 2024
7e5c642
Run npm format
sindhuba Aug 21, 2024
bd564c6
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Sep 17, 2024
4768ba3
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Oct 2, 2024
3a67692
t Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Oct 3, 2024
8b66071
Support multi-tenant switching for Data Plane RBAC
sevoku Oct 4, 2024
ae7184f
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Oct 4, 2024
de5ba04
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Oct 8, 2024
b456e53
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
sindhuba Oct 10, 2024
1289215
Merge branch 'dev/sevoku/multi-tenant' of https://github.com/Azure/co…
sindhuba Oct 10, 2024
cce411d
Remove tenantID duplicates
sindhuba Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Contracts/ViewModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ export interface DataExplorerInputsFrame {
databaseAccount: any;
subscriptionId?: string;
resourceGroup?: string;
tenantId?: string;
userName?: string;
masterKey?: string;
hasWriteAccess?: boolean;
authorizationToken?: string;
Expand Down
2 changes: 2 additions & 0 deletions src/UserContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export interface UserContext {
readonly authType?: AuthType;
readonly masterKey?: string;
readonly subscriptionId?: string;
readonly tenantId?: string;
readonly userName?: string;
readonly resourceGroup?: string;
readonly databaseAccount?: DatabaseAccount;
readonly endpoint?: string;
Expand Down
6 changes: 4 additions & 2 deletions src/Utils/AuthorizationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export async function acquireMsalTokenForAccount(
// This will eventually throw InteractionRequiredAuthError if silent is true, we won't handle it here.
const loginRequest = {
scopes: [hrefEndpoint],
loginHint: user_hint,
loginHint: user_hint ?? userContext.userName,
authority: userContext.tenantId ? `${configContext.AAD_ENDPOINT}${userContext.tenantId}` : undefined,
};
try {
if (silent) {
Expand Down Expand Up @@ -132,7 +133,8 @@ export async function acquireMsalTokenForAccount(
account: msalAccount || null,
forceRefresh: true,
scopes: [hrefEndpoint],
authority: `${configContext.AAD_ENDPOINT}${msalAccount.tenantId}`,
loginHint: user_hint ?? userContext.userName,
authority: `${configContext.AAD_ENDPOINT}${userContext.tenantId ?? msalAccount.tenantId}`,
};
return acquireTokenWithMsal(msalInstance, tokenRequest, silent);
}
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/useKnockoutExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
resourceGroup: inputs.resourceGroup,
subscriptionId: inputs.subscriptionId,
subscriptionType: inputs.subscriptionType,
tenantId: inputs.tenantId,
userName: inputs.userName,
quotaId: inputs.quotaId,
portalEnv: inputs.serverId as PortalEnv,
hasWriteAccess: inputs.hasWriteAccess ?? true,
Expand Down
Loading