Merge branch 'master' of https://github.com/Azure/cosmos-explorer into users/aisayas/mongo-cassandra-connectionstring-login-e2etests

This commit is contained in:
Asier Isayas
2026-09-09 07:11:53 -07:00
16 changed files with 224 additions and 236 deletions
+1 -1
View File
@@ -1 +1 @@
[Preview this branch](https://dataexplorer-preview.azurewebsites.net/pull/EDIT_THIS_NUMBER_IN_THE_PR_DESCRIPTION?feature.someFeatureFlagYouMightNeed=true) [Preview this branch](https://dataexplorer-preview.portal.cosmos.azure.com/pull/EDIT_THIS_NUMBER_IN_THE_PR_DESCRIPTION?feature.someFeatureFlagYouMightNeed=true)
+9
View File
@@ -7,3 +7,12 @@ updates:
directory: "/" directory: "/"
schedule: schedule:
interval: "daily" interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
groups:
github-actions:
patterns: ["*"]
schedule:
interval: "weekly"
cooldown:
default-days: 7
+27 -27
View File
@@ -19,9 +19,9 @@ jobs:
name: "Log Code Metrics" name: "Log Code Metrics"
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
@@ -32,9 +32,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Compile TypeScript" name: "Compile TypeScript"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
@@ -44,9 +44,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Check Format" name: "Check Format"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
@@ -55,9 +55,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Lint" name: "Lint"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
@@ -66,9 +66,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Unit Tests" name: "Unit Tests"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
@@ -77,15 +77,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Build" name: "Build"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
- run: npm run build:contracts - run: npm run build:contracts
- name: Restore Build Cache - name: Restore Build Cache
uses: actions/cache@v4 uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with: with:
path: .cache path: .cache
key: ${{ runner.os }}-build-cache key: ${{ runner.os }}-build-cache
@@ -94,12 +94,12 @@ jobs:
NODE_OPTIONS: "--max-old-space-size=4096" NODE_OPTIONS: "--max-old-space-size=4096"
- run: cp -r ./Contracts ./dist/contracts - run: cp -r ./Contracts ./dist/contracts
- run: cp -r ./configs ./dist/configs - run: cp -r ./configs ./dist/configs
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with: with:
name: dist name: dist
path: dist/ path: dist/
- name: "Az CLI login" - name: "Az CLI login"
uses: azure/login@v1 uses: azure/login@cb79c773a3cfa27f31f25eb3f677781210c9ce3d # v1.6.1
with: with:
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }} client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }} tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
@@ -118,7 +118,7 @@ jobs:
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }} AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
steps: steps:
- name: Download Dist Folder - name: Download Dist Folder
uses: actions/download-artifact@v4 uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with: with:
name: dist name: dist
- run: cp ./configs/prod.json config.json - run: cp ./configs/prod.json config.json
@@ -126,7 +126,7 @@ jobs:
- run: dotnet pack DataExplorer.proj /p:PackageVersion="2.0.0-github-${GITHUB_SHA}" - run: dotnet pack DataExplorer.proj /p:PackageVersion="2.0.0-github-${GITHUB_SHA}"
- run: dotnet nuget push "bin/Release/*.nupkg" --skip-duplicate --api-key Az --source="$NUGET_SOURCE" - run: dotnet nuget push "bin/Release/*.nupkg" --skip-duplicate --api-key Az --source="$NUGET_SOURCE"
- run: dotnet nuget remove source "ADO" - run: dotnet nuget remove source "ADO"
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
name: Upload package to Artifacts name: Upload package to Artifacts
with: with:
name: prod-package name: prod-package
@@ -142,7 +142,7 @@ jobs:
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }} AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
steps: steps:
- name: Download Dist Folder - name: Download Dist Folder
uses: actions/download-artifact@v4 uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with: with:
name: dist name: dist
- run: cp ./configs/mpac.json config.json - run: cp ./configs/mpac.json config.json
@@ -151,7 +151,7 @@ jobs:
- run: dotnet pack DataExplorer.proj /p:PackageVersion="2.0.0-github-${GITHUB_SHA}" - run: dotnet pack DataExplorer.proj /p:PackageVersion="2.0.0-github-${GITHUB_SHA}"
- run: dotnet nuget push "bin/Release/*.nupkg" --skip-duplicate --api-key Az --source="$NUGET_SOURCE" - run: dotnet nuget push "bin/Release/*.nupkg" --skip-duplicate --api-key Az --source="$NUGET_SOURCE"
- run: dotnet nuget remove source "ADO" - run: dotnet nuget remove source "ADO"
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
name: Upload package to Artifacts name: Upload package to Artifacts
with: with:
name: mpac-package name: mpac-package
@@ -172,22 +172,22 @@ jobs:
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
shardTotal: [20] shardTotal: [20]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
- run: npx playwright install --with-deps - run: npx playwright install --with-deps
- name: "Az CLI login" - name: "Az CLI login"
uses: Azure/login@v2 uses: Azure/login@7184910d9eb2b1c5e48f7073824a90609bb9b6d6 # v2.3.1
with: with:
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }} client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }} tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
subscription-id: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }} subscription-id: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
# We can't use MSAL within playwright so we acquire tokens prior to running the tests # We can't use MSAL within playwright so we acquire tokens prior to running the tests
- name: "Acquire RBAC tokens for test accounts" - name: "Acquire RBAC tokens for test accounts"
uses: azure/cli@v2 uses: azure/cli@9f7ce6f37c31b777ec6c6b6d1dfe7db79f497956 # v2.2.0
env: env:
DE_ACCOUNT_PREFIX: ${{ secrets.E2ETESTS_ACCOUNT_PREFIX }} DE_ACCOUNT_PREFIX: ${{ secrets.E2ETESTS_ACCOUNT_PREFIX }}
DE_TEST_RESOURCE_GROUP: ${{ secrets.E2ETESTS_RESOURCEGROUP_NAME }} DE_TEST_RESOURCE_GROUP: ${{ secrets.E2ETESTS_RESOURCEGROUP_NAME }}
@@ -231,7 +231,7 @@ jobs:
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers=3 run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers=3
- name: "Re-auth for upload (refresh OIDC token)" - name: "Re-auth for upload (refresh OIDC token)"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: Azure/login@v2 uses: Azure/login@7184910d9eb2b1c5e48f7073824a90609bb9b6d6 # v2.3.1
with: with:
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }} client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }} tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
@@ -262,15 +262,15 @@ jobs:
pull-requests: write pull-requests: write
id-token: write id-token: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-node@v4 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: "Az CLI login" - name: "Az CLI login"
uses: Azure/login@v2 uses: Azure/login@7184910d9eb2b1c5e48f7073824a90609bb9b6d6 # v2.3.1
with: with:
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }} client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }} tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
+3 -3
View File
@@ -23,16 +23,16 @@ jobs:
AZURE_SUBSCRIPTION_ID: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }} AZURE_SUBSCRIPTION_ID: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
E2ETESTS_RESOURCEGROUP_NAME : ${{ secrets.E2ETESTS_RESOURCEGROUP_NAME }} E2ETESTS_RESOURCEGROUP_NAME : ${{ secrets.E2ETESTS_RESOURCEGROUP_NAME }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: "Az CLI login" - name: "Az CLI login"
uses: azure/login@v2 uses: azure/login@7184910d9eb2b1c5e48f7073824a90609bb9b6d6 # v2.3.1
with: with:
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }} client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }} tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
subscription-id: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }} subscription-id: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
- name: Use Node.js 22.x - name: Use Node.js 22.x
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 22.x node-version: 22.x
- run: npm ci - run: npm ci
+144 -158
View File
@@ -35,7 +35,7 @@
"canvas": "3.2.1", "canvas": "3.2.1",
"clean-webpack-plugin": "4.0.0", "clean-webpack-plugin": "4.0.0",
"clipboard-copy": "4.0.1", "clipboard-copy": "4.0.1",
"copy-webpack-plugin": "11.0.0", "copy-webpack-plugin": "14.0.0",
"crossroads": "0.12.2", "crossroads": "0.12.2",
"css-element-queries": "1.1.1", "css-element-queries": "1.1.1",
"d3": "7.9.0", "d3": "7.9.0",
@@ -91,7 +91,7 @@
"shell-quote": "1.10.0", "shell-quote": "1.10.0",
"styled-components": "5.0.1", "styled-components": "5.0.1",
"swr": "0.4.0", "swr": "0.4.0",
"terser-webpack-plugin": "5.3.9", "terser-webpack-plugin": "5.6.1",
"tinykeys": "2.1.0", "tinykeys": "2.1.0",
"underscore": "1.13.8", "underscore": "1.13.8",
"utility-types": "3.10.0", "utility-types": "3.10.0",
@@ -2697,9 +2697,9 @@
} }
}, },
"node_modules/@eslint/eslintrc/node_modules/js-yaml": { "node_modules/@eslint/eslintrc/node_modules/js-yaml": {
"version": "4.1.1", "version": "4.3.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dependencies": { "dependencies": {
"argparse": "^2.0.1" "argparse": "^2.0.1"
}, },
@@ -8969,6 +8969,7 @@
}, },
"node_modules/ajv-keywords": { "node_modules/ajv-keywords": {
"version": "3.5.2", "version": "3.5.2",
"dev": true,
"license": "MIT", "license": "MIT",
"peerDependencies": { "peerDependencies": {
"ajv": "^6.9.1" "ajv": "^6.9.1"
@@ -10663,18 +10664,19 @@
} }
}, },
"node_modules/copy-webpack-plugin": { "node_modules/copy-webpack-plugin": {
"version": "11.0.0", "version": "14.0.0",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-14.0.0.tgz",
"integrity": "sha512-3JLW90aBGeaTLpM7mYQKpnVdgsUZRExY55giiZgLuX/xTQRUs1dOCwbBnWnvY6Q6rfZoXMNwzOQJCSZPppfqXA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"fast-glob": "^3.2.11",
"glob-parent": "^6.0.1", "glob-parent": "^6.0.1",
"globby": "^13.1.1",
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"schema-utils": "^4.0.0", "schema-utils": "^4.2.0",
"serialize-javascript": "^6.0.0" "serialize-javascript": "^7.0.3",
"tinyglobby": "^0.2.12"
}, },
"engines": { "engines": {
"node": ">= 14.15.0" "node": ">= 20.9.0"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
@@ -10708,47 +10710,6 @@
"ajv": "^8.8.2" "ajv": "^8.8.2"
} }
}, },
"node_modules/copy-webpack-plugin/node_modules/fast-glob": {
"version": "3.3.2",
"license": "MIT",
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
"micromatch": "^4.0.4"
},
"engines": {
"node": ">=8.6.0"
}
},
"node_modules/copy-webpack-plugin/node_modules/fast-glob/node_modules/glob-parent": {
"version": "5.1.2",
"license": "ISC",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/copy-webpack-plugin/node_modules/globby": {
"version": "13.2.2",
"license": "MIT",
"dependencies": {
"dir-glob": "^3.0.1",
"fast-glob": "^3.3.0",
"ignore": "^5.2.4",
"merge2": "^1.4.1",
"slash": "^4.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/copy-webpack-plugin/node_modules/json-schema-traverse": { "node_modules/copy-webpack-plugin/node_modules/json-schema-traverse": {
"version": "1.0.0", "version": "1.0.0",
"license": "MIT" "license": "MIT"
@@ -10770,16 +10731,6 @@
"url": "https://opencollective.com/webpack" "url": "https://opencollective.com/webpack"
} }
}, },
"node_modules/copy-webpack-plugin/node_modules/slash": {
"version": "4.0.0",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/core-js-compat": { "node_modules/core-js-compat": {
"version": "3.38.0", "version": "3.38.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.0.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.0.tgz",
@@ -13069,9 +13020,9 @@
} }
}, },
"node_modules/eslint/node_modules/js-yaml": { "node_modules/eslint/node_modules/js-yaml": {
"version": "4.1.1", "version": "4.3.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dependencies": { "dependencies": {
"argparse": "^2.0.1" "argparse": "^2.0.1"
}, },
@@ -13542,9 +13493,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/fast-uri": { "node_modules/fast-uri": {
"version": "3.1.5", "version": "3.1.7",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.7.tgz",
"integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", "integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -14085,7 +14036,6 @@
"version": "2.3.2", "version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"optional": true, "optional": true,
"os": [ "os": [
@@ -22626,13 +22576,6 @@
"node": ">=0.12" "node": ">=0.12"
} }
}, },
"node_modules/randombytes": {
"version": "2.1.0",
"license": "MIT",
"dependencies": {
"safe-buffer": "^5.1.0"
}
},
"node_modules/range-parser": { "node_modules/range-parser": {
"version": "1.2.1", "version": "1.2.1",
"dev": true, "dev": true,
@@ -23946,11 +23889,12 @@
} }
}, },
"node_modules/serialize-javascript": { "node_modules/serialize-javascript": {
"version": "6.0.2", "version": "7.1.0",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.0.tgz",
"integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "integrity": "sha512-RNEqWOyhhUQYN9V1GfHwu9AR/g+NTciH6Z5u3/no6X3/w+04J2lVDL+svFQVXgXrEGBMG2puMVN3gq2SNGuTGw==",
"dependencies": { "license": "BSD-3-Clause",
"randombytes": "^2.1.0" "engines": {
"node": ">=20.0.0"
} }
}, },
"node_modules/serve-index": { "node_modules/serve-index": {
@@ -24806,14 +24750,15 @@
} }
}, },
"node_modules/terser-webpack-plugin": { "node_modules/terser-webpack-plugin": {
"version": "5.3.9", "version": "5.6.1",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.6.1.tgz",
"integrity": "sha512-201R5j+sJpK8nFWwKVyNfZot8FaJbLZDq5evriVzbV1wDtSXDjRUDRfJzHpAaxFDMEhsZL1QkeqM61wgsS3KaQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@jridgewell/trace-mapping": "^0.3.17", "@jridgewell/trace-mapping": "^0.3.25",
"jest-worker": "^27.4.5", "jest-worker": "^27.4.5",
"schema-utils": "^3.1.1", "schema-utils": "^4.3.0",
"serialize-javascript": "^6.0.1", "terser": "^5.31.1"
"terser": "^5.16.8"
}, },
"engines": { "engines": {
"node": ">= 10.13.0" "node": ">= 10.13.0"
@@ -24826,17 +24771,72 @@
"webpack": "^5.1.0" "webpack": "^5.1.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@minify-html/node": {
"optional": true
},
"@swc/core": { "@swc/core": {
"optional": true "optional": true
}, },
"@swc/css": {
"optional": true
},
"@swc/html": {
"optional": true
},
"clean-css": {
"optional": true
},
"cssnano": {
"optional": true
},
"csso": {
"optional": true
},
"esbuild": { "esbuild": {
"optional": true "optional": true
}, },
"html-minifier-terser": {
"optional": true
},
"lightningcss": {
"optional": true
},
"postcss": {
"optional": true
},
"uglify-js": { "uglify-js": {
"optional": true "optional": true
} }
} }
}, },
"node_modules/terser-webpack-plugin/node_modules/ajv": {
"version": "8.20.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
"integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/terser-webpack-plugin/node_modules/ajv-keywords": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
"integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.3"
},
"peerDependencies": {
"ajv": "^8.8.2"
}
},
"node_modules/terser-webpack-plugin/node_modules/has-flag": { "node_modules/terser-webpack-plugin/node_modules/has-flag": {
"version": "4.0.0", "version": "4.0.0",
"license": "MIT", "license": "MIT",
@@ -24856,13 +24856,22 @@
"node": ">= 10.13.0" "node": ">= 10.13.0"
} }
}, },
"node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"license": "MIT"
},
"node_modules/terser-webpack-plugin/node_modules/schema-utils": { "node_modules/terser-webpack-plugin/node_modules/schema-utils": {
"version": "3.3.0", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz",
"integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.8", "@types/json-schema": "^7.0.9",
"ajv": "^6.12.5", "ajv": "^8.9.0",
"ajv-keywords": "^3.5.2" "ajv-formats": "^2.1.1",
"ajv-keywords": "^5.1.0"
}, },
"engines": { "engines": {
"node": ">= 10.13.0" "node": ">= 10.13.0"
@@ -24906,6 +24915,51 @@
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
"dev": true "dev": true
}, },
"node_modules/tinyglobby": {
"version": "0.2.17",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
"integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
"license": "MIT",
"dependencies": {
"fdir": "^6.5.0",
"picomatch": "^4.0.4"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"url": "https://github.com/sponsors/SuperchupuDev"
}
},
"node_modules/tinyglobby/node_modules/fdir": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"license": "MIT",
"engines": {
"node": ">=12.0.0"
},
"peerDependencies": {
"picomatch": "^3 || ^4"
},
"peerDependenciesMeta": {
"picomatch": {
"optional": true
}
}
},
"node_modules/tinyglobby/node_modules/picomatch": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
"integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/tinykeys": { "node_modules/tinykeys": {
"version": "2.1.0", "version": "2.1.0",
"license": "MIT" "license": "MIT"
@@ -26866,27 +26920,6 @@
"node": ">=4.0" "node": ">=4.0"
} }
}, },
"node_modules/webpack/node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/webpack/node_modules/jest-worker": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
"integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
"dependencies": {
"@types/node": "*",
"merge-stream": "^2.0.0",
"supports-color": "^8.0.0"
},
"engines": {
"node": ">= 10.13.0"
}
},
"node_modules/webpack/node_modules/json-schema-traverse": { "node_modules/webpack/node_modules/json-schema-traverse": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
@@ -26910,53 +26943,6 @@
"url": "https://opencollective.com/webpack" "url": "https://opencollective.com/webpack"
} }
}, },
"node_modules/webpack/node_modules/supports-color": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
"node_modules/webpack/node_modules/terser-webpack-plugin": {
"version": "5.3.16",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz",
"integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==",
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
"jest-worker": "^27.4.5",
"schema-utils": "^4.3.0",
"serialize-javascript": "^6.0.2",
"terser": "^5.31.1"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"webpack": "^5.1.0"
},
"peerDependenciesMeta": {
"@swc/core": {
"optional": true
},
"esbuild": {
"optional": true
},
"uglify-js": {
"optional": true
}
}
},
"node_modules/websocket-driver": { "node_modules/websocket-driver": {
"version": "0.7.5", "version": "0.7.5",
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.5.tgz", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.5.tgz",
+2 -2
View File
@@ -33,7 +33,7 @@
"canvas": "3.2.1", "canvas": "3.2.1",
"clean-webpack-plugin": "4.0.0", "clean-webpack-plugin": "4.0.0",
"clipboard-copy": "4.0.1", "clipboard-copy": "4.0.1",
"copy-webpack-plugin": "11.0.0", "copy-webpack-plugin": "14.0.0",
"crossroads": "0.12.2", "crossroads": "0.12.2",
"css-element-queries": "1.1.1", "css-element-queries": "1.1.1",
"d3": "7.9.0", "d3": "7.9.0",
@@ -89,7 +89,7 @@
"shell-quote": "1.10.0", "shell-quote": "1.10.0",
"styled-components": "5.0.1", "styled-components": "5.0.1",
"swr": "0.4.0", "swr": "0.4.0",
"terser-webpack-plugin": "5.3.9", "terser-webpack-plugin": "5.6.1",
"tinykeys": "2.1.0", "tinykeys": "2.1.0",
"underscore": "1.13.8", "underscore": "1.13.8",
"utility-types": "3.10.0", "utility-types": "3.10.0",
-7
View File
@@ -1,7 +0,0 @@
[defaults]
group = dataexplorer-preview
sku = P1v2
appserviceplan = dataexplorer-preview
location = westus2
web = dataexplorer-preview
+2 -2
View File
@@ -4,8 +4,8 @@ Cosmos Explorer Preview makes it possible to try a working version of any commit
Initial support is for Hosted (Connection string only) or the Azure Portal. Examples: Initial support is for Hosted (Connection string only) or the Azure Portal. Examples:
Connection string URLs: https://dataexplorer-preview.azurewebsites.net/commit/COMMIT_SHA/hostedExplorer.html Connection string URLs: https://dataexplorer-preview.portal.cosmos.azure.com/commit/COMMIT_SHA/hostedExplorer.html
Portal URLs: https://ms.portal.azure.com/?dataExplorerSource=https://dataexplorer-preview.azurewebsites.net/commit/COMMIT_SHA/explorer.html#home Portal URLs: https://ms.portal.azure.com/?dataExplorerSource=https://dataexplorer-preview.portal.cosmos.azure.com/commit/COMMIT_SHA/explorer.html#home
In both cases replace `COMMIT_SHA` with the commit you want to view. It must have already completed its build on GitHub Actions. In both cases replace `COMMIT_SHA` with the commit you want to view. It must have already completed its build on GitHub Actions.
+1 -1
View File
@@ -1,4 +1,4 @@
{ {
"PROXY_PATH": "/proxy", "PROXY_PATH": "/proxy",
"msalRedirectURI": "https://dataexplorer-preview.azurewebsites.net/" "msalRedirectURI": "https://dataexplorer-preview.portal.cosmos.azure.com/"
} }
+1 -1
View File
@@ -4,7 +4,7 @@ const port = process.env.PORT || 3000;
const fetch = require("node-fetch"); const fetch = require("node-fetch");
const backendEndpoint = "https://cdb-ms-mpac-pbe.cosmos.azure.com"; const backendEndpoint = "https://cdb-ms-mpac-pbe.cosmos.azure.com";
const previewSiteEndpoint = "https://dataexplorer-preview.azurewebsites.net"; const previewSiteEndpoint = "https://dataexplorer-preview.portal.cosmos.azure.com";
const previewStorageWebsiteEndpoint = "_REPLACE_STORAGE_WEBSITE_ENDPOINT_"; const previewStorageWebsiteEndpoint = "_REPLACE_STORAGE_WEBSITE_ENDPOINT_";
const githubApiUrl = "https://api.github.com/repos/Azure/cosmos-explorer"; const githubApiUrl = "https://api.github.com/repos/Azure/cosmos-explorer";
const azurePortalMpacEndpoint = "https://ms.portal.azure.com/"; const azurePortalMpacEndpoint = "https://ms.portal.azure.com/";
+1 -1
View File
@@ -80,7 +80,7 @@ let configContext: Readonly<ConfigContext> = {
`^https:\\/\\/cosmos-db-dataexplorer-germanycentral\\.azurewebsites\\.de$`, `^https:\\/\\/cosmos-db-dataexplorer-germanycentral\\.azurewebsites\\.de$`,
`^https:\\/\\/.*\\.fabric\\.microsoft\\.com$`, `^https:\\/\\/.*\\.fabric\\.microsoft\\.com$`,
`^https:\\/\\/.*\\.powerbi\\.com$`, `^https:\\/\\/.*\\.powerbi\\.com$`,
`^https:\\/\\/dataexplorer-preview\\.azurewebsites\\.net$`, `^https:\\/\\/dataexplorer-preview\\.portal\\.cosmos\\.azure\\.com$`,
`^https:\\/\\/explorer\\.cosmos\\.sovcloud-api\\.fr$`, `^https:\\/\\/explorer\\.cosmos\\.sovcloud-api\\.fr$`,
`^https:\\/\\/portal\\.sovcloud-azure\\.fr$`, `^https:\\/\\/portal\\.sovcloud-azure\\.fr$`,
`^https:\\/\\/explorer\\.cosmos\\.sovcloud-api\\.de$`, `^https:\\/\\/explorer\\.cosmos\\.sovcloud-api\\.de$`,
@@ -101,7 +101,7 @@ it("rejects an unrecognized connection string before token exchange", async () =
"We couldn't recognize this connection string. Verify that it is a valid Azure Cosmos DB connection string and try again.", "We couldn't recognize this connection string. Verify that it is a valid Azure Cosmos DB connection string and try again.",
), ),
).toBeInTheDocument(); ).toBeInTheDocument();
expect(mockIsAccountRestricted).not.toHaveBeenCalled(); expect(mockIsAccountRestricted).toHaveBeenCalledWith("not-a-valid-connection-string");
expect(mockFetchEncryptedToken).not.toHaveBeenCalled(); expect(mockFetchEncryptedToken).not.toHaveBeenCalled();
}); });
@@ -57,6 +57,20 @@ export const ConnectExplorer: React.FunctionComponent<Props> = ({
setIsBlockedByFirewall(false); setIsBlockedByFirewall(false);
setIsConnecting(true); setIsConnecting(true);
try {
if (await isAccountRestrictedForConnectionStringLogin(connectionString)) {
setErrorMessage(
"This account has been blocked from connection-string login. Please go to cosmos.azure.com/aad for AAD based login.",
);
setIsConnecting(false);
return;
}
} catch (error) {
setErrorMessage(getErrorMessage(error as Error));
setIsConnecting(false);
return;
}
try { try {
if (isResourceTokenConnectionString(connectionString)) { if (isResourceTokenConnectionString(connectionString)) {
setAuthType(AuthType.ResourceToken); setAuthType(AuthType.ResourceToken);
@@ -70,19 +84,6 @@ export const ConnectExplorer: React.FunctionComponent<Props> = ({
); );
return; return;
} }
try {
if (await isAccountRestrictedForConnectionStringLogin(connectionString)) {
setErrorMessage(
"This account has been blocked from connection-string login. Please go to cosmos.azure.com/aad for AAD based login.",
);
return;
}
} catch (error) {
setErrorMessage(getErrorMessage(error as Error));
return;
}
if (isDirectConnectionStringLoginApi(metadata.apiKind)) { if (isDirectConnectionStringLoginApi(metadata.apiKind)) {
setAccountMetadata(metadata); setAccountMetadata(metadata);
setAuthType(AuthType.ConnectionString); setAuthType(AuthType.ConnectionString);
@@ -90,23 +91,21 @@ export const ConnectExplorer: React.FunctionComponent<Props> = ({
} }
// Mongo and Cassandra go through the Portal Backend // Mongo and Cassandra go through the Portal Backend
try { const encryptedToken = await fetchEncryptedToken(connectionString);
const encryptedToken = await fetchEncryptedToken(connectionString); setEncryptedToken(encryptedToken);
setEncryptedToken(encryptedToken); setAuthType(AuthType.ConnectionString);
setAuthType(AuthType.ConnectionString); } catch (error) {
} catch (error) { const errorDetails = await (error as Response).text();
const errorDetails = await (error as Response).text();
setErrorMessage( setErrorMessage(
errorDetails errorDetails
? `Couldn't authenticate with Cosmos DB: ${errorDetails}` ? `Couldn't authenticate with Cosmos DB: ${errorDetails}`
: "Failed to connect to the account. Please check the connection string and try again.", : "Failed to connect to the account. Please check the connection string and try again.",
); );
// A Forbidden usually means the account firewall dropped the request. The connection // A Forbidden usually means the account firewall dropped the request. The connection
// string is exchanged by the Portal Backend rather than the browser, so the account has // string is exchanged by the Portal Backend rather than the browser, so the account has
// to allowlist those services. // to allowlist those services.
setIsBlockedByFirewall((error as Response).status === HttpStatusCodes.Forbidden); setIsBlockedByFirewall((error as Response).status === HttpStatusCodes.Forbidden);
}
} finally { } finally {
setIsConnecting(false); setIsConnecting(false);
} }
+3 -1
View File
@@ -88,7 +88,9 @@ export const allowedHostedExplorerEndpoints: ReadonlyArray<string> = [
...(process.env.NODE_ENV === "development" ? ["https://localhost:12900"] : []), ...(process.env.NODE_ENV === "development" ? ["https://localhost:12900"] : []),
]; ];
export const allowedMsalRedirectEndpoints: ReadonlyArray<string> = ["https://dataexplorer-preview.azurewebsites.net/"]; export const allowedMsalRedirectEndpoints: ReadonlyArray<string> = [
"https://dataexplorer-preview.portal.cosmos.azure.com/",
];
export const allowedJunoOrigins: ReadonlyArray<string> = [ export const allowedJunoOrigins: ReadonlyArray<string> = [
JunoEndpoints.Test, JunoEndpoints.Test,
-1
View File
@@ -265,7 +265,6 @@ export async function getTestExplorerUrl(accountType: TestAccount, options?: Tes
case TestAccount.SQLConnectionString: case TestAccount.SQLConnectionString:
case TestAccount.SQLConnectionStringPublicNetworkAccessDisabled: case TestAccount.SQLConnectionStringPublicNetworkAccessDisabled:
case TestAccount.MongoConnectionStringPublicNetworkAccessDisabled:
case TestAccount.TableConnectionString: case TestAccount.TableConnectionString:
case TestAccount.GremlinConnectionString: case TestAccount.GremlinConnectionString:
// Connection string (account key) login navigates directly to hostedExplorer.html and doesn't // Connection string (account key) login navigates directly to hostedExplorer.html and doesn't
+1 -1
View File
@@ -30,7 +30,7 @@
<clear /> <clear />
<add name="X-Xss-Protection" value="1; mode=block" /> <add name="X-Xss-Protection" value="1; mode=block" />
<add name="X-Content-Type-Options" value="nosniff" /> <add name="X-Content-Type-Options" value="nosniff" />
<add name="Content-Security-Policy" value="frame-ancestors 'self' portal.azure.com *.portal.azure.com portal.azure.us portal.azure.cn portal.microsoftazure.de df.onecloud.azure-test.net *.fabric.microsoft.com *.powerbi.com *.analysis-df.windows.net dataexplorer-preview.azurewebsites.net portal.sovcloud-azure.fr portal.sovcloud-azure.de portal.sovcloud-azure.sg" /> <add name="Content-Security-Policy" value="frame-ancestors 'self' portal.azure.com *.portal.azure.com portal.azure.us portal.azure.cn portal.microsoftazure.de df.onecloud.azure-test.net *.fabric.microsoft.com *.powerbi.com *.analysis-df.windows.net dataexplorer-preview.portal.cosmos.azure.com portal.sovcloud-azure.fr portal.sovcloud-azure.de portal.sovcloud-azure.sg" />
</customHeaders> </customHeaders>
<redirectHeaders> <redirectHeaders>
<clear /> <clear />