diff --git a/.github/workflows/benchmark-action.yml b/.github/workflows/benchmark-action.yml index 8558ce2f3a..c94e05e3ee 100644 --- a/.github/workflows/benchmark-action.yml +++ b/.github/workflows/benchmark-action.yml @@ -8,31 +8,36 @@ on: - src/client/Microsoft.Identity.Client/**/*.cs permissions: - # Deployments permission to deploy GitHub pages website - deployments: write # Contents permission to update benchmark contents in gh-pages branch - contents: write + contents: read jobs: benchmark: + permissions: + contents: write # Elevate permissions specifically for this job name: Run performance benchmarks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v3 + - name: Harden Runner + uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + with: + egress-policy: audit + + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 with: dotnet-version: '3.1.426' - name: Run benchmark run: cd tests/Microsoft.Identity.Test.Performance && dotnet run -c release -f netcoreapp3.1 --exporters json - name: Download previous benchmark data - uses: actions/cache@v3 + uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 with: path: ./cache key: ${{ runner.os }}-benchmark - name: Store AcquireTokenNoCacheTests result - uses: benchmark-action/github-action-benchmark@v1 + uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3 with: name: AcquireTokenNoCache tool: 'benchmarkdotnet' @@ -48,7 +53,7 @@ jobs: benchmark-data-dir-path: benchmarks - name: Store AcquireTokenForClientCacheTests result - uses: benchmark-action/github-action-benchmark@v1 + uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3 with: name: AcquireTokenForClientWithCache tool: 'benchmarkdotnet' @@ -64,7 +69,7 @@ jobs: benchmark-data-dir-path: benchmarks - name: Store AcquireTokenForOboCacheTests result - uses: benchmark-action/github-action-benchmark@v1 + uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3 with: name: AcquireTokenForOboWithCache tool: 'benchmarkdotnet' @@ -80,7 +85,7 @@ jobs: benchmark-data-dir-path: benchmarks - name: Store TokenCacheTests result - uses: benchmark-action/github-action-benchmark@v1 + uses: benchmark-action/github-action-benchmark@cc9ac13ce81036c9b67fcfe2cb95ca366684b9ea # v1.19.3 with: name: TokenCacheTestsWithCache tool: 'benchmarkdotnet' diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml deleted file mode 100644 index ee3913164a..0000000000 --- a/.github/workflows/scorecard.yml +++ /dev/null @@ -1,72 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. They are provided -# by a third-party and are governed by separate terms of service, privacy -# policy, and support documentation. - -name: Scorecard supply-chain security -on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: - # To guarantee Maintained check is occasionally updated. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained - schedule: - - cron: '31 13 * * 4' - push: - branches: [ "main" ] - -# Declare default permissions as read only. -permissions: read-all - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - # Needed to publish results and get a badge (see publish_results below). - id-token: write - # Uncomment the permissions below if installing in a private repository. - # contents: read - # actions: read - - steps: - - name: "Checkout code" - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2 - with: - results_file: results.sarif - results_format: sarif - # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: - # - you want to enable the Branch-Protection check on a *public* repository, or - # - you are installing Scorecard on a *private* repository - # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. - # repo_token: ${{ secrets.SCORECARD_TOKEN }} - - # Public repositories: - # - Publish results to OpenSSF REST API for easy access by consumers - # - Allows the repository to include the Scorecard badge. - # - See https://github.com/ossf/scorecard-action#publishing-results. - # For private repositories: - # - `publish_results` will always be set to `false`, regardless - # of the value entered here. - publish_results: true - - # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF - # format to the repository Actions tab. - - name: "Upload artifact" - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4 - with: - sarif_file: results.sarif diff --git a/.github/workflows/trigger_onebranch_ci.yml b/.github/workflows/trigger_onebranch_ci.yml index 8aa84c2404..bf2da43377 100644 --- a/.github/workflows/trigger_onebranch_ci.yml +++ b/.github/workflows/trigger_onebranch_ci.yml @@ -7,13 +7,21 @@ on: branches: - main +permissions: + contents: read + jobs: build: name: Call OneBranch ADO Pipeline (CI) runs-on: ubuntu-latest steps: + - name: Harden Runner + uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + with: + egress-policy: audit + - name: Azure Pipelines Action - uses: Azure/pipelines@v1 + uses: Azure/pipelines@354dddefceb0b503a61338ca81e4091eae3bc84f # v1 with: azure-devops-project-url: https://identitydivision.visualstudio.com/IDDP azure-pipeline-name: 'MSAL.NET-OneBranch-Release-Official' diff --git a/Directory.Packages.props b/Directory.Packages.props index 32d9133eac..489b3d11ae 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -51,7 +51,7 @@ - + @@ -64,8 +64,8 @@ - - + + diff --git a/LibsAndSamples.sln b/LibsAndSamples.sln index 973efa4eda..01a4f671df 100644 --- a/LibsAndSamples.sln +++ b/LibsAndSamples.sln @@ -31,26 +31,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CacheCompat", "CacheCompat" tests\CacheCompat\Directory.Packages.props = tests\CacheCompat\Directory.Packages.props EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.AdalV3", "tests\CacheCompat\CommonCache.Test.AdalV3\CommonCache.Test.AdalV3.csproj", "{A8C2D397-BA21-4BD2-93AA-801B0E0804BC}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.Common", "tests\CacheCompat\CommonCache.Test.Common\CommonCache.Test.Common.csproj", "{408DCC1C-E810-4F9F-94EE-8421715A3661}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.AdalV4", "tests\CacheCompat\CommonCache.Test.AdalV4\CommonCache.Test.AdalV4.csproj", "{70DFE67C-D2D1-4BE4-B785-F4445C6F652D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.MsalV2", "tests\CacheCompat\CommonCache.Test.MsalV2\CommonCache.Test.MsalV2.csproj", "{8672FC71-00DE-491D-BCEB-101A2A7887E6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.Unit", "tests\CacheCompat\CommonCache.Test.Unit\CommonCache.Test.Unit.csproj", "{3C21354D-601A-4902-A728-419C70891338}" ProjectSection(ProjectDependencies) = postProject - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11} = {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11} {8672FC71-00DE-491D-BCEB-101A2A7887E6} = {8672FC71-00DE-491D-BCEB-101A2A7887E6} {2EAA7878-3E2A-4355-9841-430BF45EA8BD} = {2EAA7878-3E2A-4355-9841-430BF45EA8BD} - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D} = {70DFE67C-D2D1-4BE4-B785-F4445C6F652D} - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC} = {A8C2D397-BA21-4BD2-93AA-801B0E0804BC} {B6BE589B-1DBB-4C36-803F-6D425723FA74} = {B6BE589B-1DBB-4C36-803F-6D425723FA74} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.AdalV5", "tests\CacheCompat\CommonCache.Test.AdalV5\CommonCache.Test.AdalV5.csproj", "{4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.MsalJava", "tests\CacheCompat\CommonCache.Test.MsalJava\CommonCache.Test.MsalJava.csproj", "{B6BE589B-1DBB-4C36-803F-6D425723FA74}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonCache.Test.MsalV3", "tests\CacheCompat\CommonCache.Test.MsalV3\CommonCache.Test.MsalV3.csproj", "{2EAA7878-3E2A-4355-9841-430BF45EA8BD}" @@ -113,8 +104,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pipelines", "pipelines", "{ build\template-sign-binary.yaml = build\template-sign-binary.yaml EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Test.Integration.Win8", "tests\Microsoft.Identity.Test.Integration.Win8\Microsoft.Identity.Test.Integration.Win8.csproj", "{B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Test.Unit", "tests\Microsoft.Identity.Test.Unit\Microsoft.Identity.Test.Unit.csproj", "{4A249A54-D81D-4C1F-9DB2-0D60FA4BE794}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WAM", "WAM", "{5FAAD966-36B8-4C19-A5FA-5410DD53063D}" @@ -148,8 +137,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Client.B EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Test.Integration.NetStandard", "tests\Microsoft.Identity.Test.Integration.netstandard\Microsoft.Identity.Test.Integration.NetStandard.csproj", "{69CE42A2-44DD-4740-856B-607C3BB5A92E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntuneMAMSampleiOS", "tests\devapps\Intune-xamarin-ios\IntuneMAMSampleiOS.csproj", "{034A5B86-A8AE-449D-B561-46F811329E6D}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{259B5734-1D43-43F7-8107-32F602A99019}" ProjectSection(SolutionItems) = preProject build\install-common.ps1 = build\install-common.ps1 @@ -404,48 +391,6 @@ Global {18559D36-C735-4933-AA86-398C8222D4F6}.Release|x64.Build.0 = Release|Any CPU {18559D36-C735-4933-AA86-398C8222D4F6}.Release|x86.ActiveCfg = Release|Any CPU {18559D36-C735-4933-AA86-398C8222D4F6}.Release|x86.Build.0 = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|ARM.Build.0 = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|ARM64.ActiveCfg = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|ARM64.Build.0 = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|iPhone.ActiveCfg = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|iPhone.Build.0 = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|iPhoneSimulator.ActiveCfg = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|iPhoneSimulator.Build.0 = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|x64.ActiveCfg = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|x64.Build.0 = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|x86.ActiveCfg = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug + MobileApps|x86.Build.0 = Debug + MobileApps|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|ARM.Build.0 = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|ARM64.Build.0 = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|iPhone.Build.0 = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|x64.ActiveCfg = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|x64.Build.0 = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|x86.ActiveCfg = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Debug|x86.Build.0 = Debug|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|Any CPU.Build.0 = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|ARM.ActiveCfg = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|ARM.Build.0 = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|ARM64.ActiveCfg = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|ARM64.Build.0 = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|iPhone.ActiveCfg = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|iPhone.Build.0 = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|x64.ActiveCfg = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|x64.Build.0 = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|x86.ActiveCfg = Release|Any CPU - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC}.Release|x86.Build.0 = Release|Any CPU {408DCC1C-E810-4F9F-94EE-8421715A3661}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU {408DCC1C-E810-4F9F-94EE-8421715A3661}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU {408DCC1C-E810-4F9F-94EE-8421715A3661}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU @@ -488,48 +433,6 @@ Global {408DCC1C-E810-4F9F-94EE-8421715A3661}.Release|x64.Build.0 = Release|Any CPU {408DCC1C-E810-4F9F-94EE-8421715A3661}.Release|x86.ActiveCfg = Release|Any CPU {408DCC1C-E810-4F9F-94EE-8421715A3661}.Release|x86.Build.0 = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|ARM.Build.0 = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|ARM64.ActiveCfg = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|ARM64.Build.0 = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|iPhone.ActiveCfg = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|iPhone.Build.0 = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|iPhoneSimulator.ActiveCfg = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|iPhoneSimulator.Build.0 = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|x64.ActiveCfg = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|x64.Build.0 = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|x86.ActiveCfg = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug + MobileApps|x86.Build.0 = Debug + MobileApps|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|ARM.ActiveCfg = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|ARM.Build.0 = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|ARM64.Build.0 = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|iPhone.Build.0 = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|x64.ActiveCfg = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|x64.Build.0 = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|x86.ActiveCfg = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Debug|x86.Build.0 = Debug|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|Any CPU.Build.0 = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|ARM.ActiveCfg = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|ARM.Build.0 = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|ARM64.ActiveCfg = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|ARM64.Build.0 = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|iPhone.ActiveCfg = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|iPhone.Build.0 = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|x64.ActiveCfg = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|x64.Build.0 = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|x86.ActiveCfg = Release|Any CPU - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D}.Release|x86.Build.0 = Release|Any CPU {8672FC71-00DE-491D-BCEB-101A2A7887E6}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU {8672FC71-00DE-491D-BCEB-101A2A7887E6}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU {8672FC71-00DE-491D-BCEB-101A2A7887E6}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU @@ -614,48 +517,6 @@ Global {3C21354D-601A-4902-A728-419C70891338}.Release|x64.Build.0 = Release|Any CPU {3C21354D-601A-4902-A728-419C70891338}.Release|x86.ActiveCfg = Release|Any CPU {3C21354D-601A-4902-A728-419C70891338}.Release|x86.Build.0 = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|ARM.Build.0 = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|ARM64.ActiveCfg = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|ARM64.Build.0 = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|iPhone.ActiveCfg = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|iPhone.Build.0 = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|iPhoneSimulator.ActiveCfg = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|iPhoneSimulator.Build.0 = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|x64.ActiveCfg = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|x64.Build.0 = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|x86.ActiveCfg = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug + MobileApps|x86.Build.0 = Debug + MobileApps|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|ARM.ActiveCfg = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|ARM.Build.0 = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|ARM64.Build.0 = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|iPhone.Build.0 = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|x64.ActiveCfg = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|x64.Build.0 = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|x86.ActiveCfg = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Debug|x86.Build.0 = Debug|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|Any CPU.Build.0 = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|ARM.ActiveCfg = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|ARM.Build.0 = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|ARM64.ActiveCfg = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|ARM64.Build.0 = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|iPhone.ActiveCfg = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|iPhone.Build.0 = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|x64.ActiveCfg = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|x64.Build.0 = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|x86.ActiveCfg = Release|Any CPU - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11}.Release|x86.Build.0 = Release|Any CPU {B6BE589B-1DBB-4C36-803F-6D425723FA74}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU {B6BE589B-1DBB-4C36-803F-6D425723FA74}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU {B6BE589B-1DBB-4C36-803F-6D425723FA74}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU @@ -866,48 +727,6 @@ Global {2EBB7FFE-47E0-46F8-A4D6-79A4CF44729C}.Release|x64.Build.0 = Release|Any CPU {2EBB7FFE-47E0-46F8-A4D6-79A4CF44729C}.Release|x86.ActiveCfg = Release|Any CPU {2EBB7FFE-47E0-46F8-A4D6-79A4CF44729C}.Release|x86.Build.0 = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|ARM.Build.0 = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|ARM64.ActiveCfg = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|ARM64.Build.0 = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|iPhone.ActiveCfg = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|iPhone.Build.0 = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|iPhoneSimulator.ActiveCfg = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|iPhoneSimulator.Build.0 = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|x64.ActiveCfg = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|x64.Build.0 = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|x86.ActiveCfg = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug + MobileApps|x86.Build.0 = Debug + MobileApps|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|ARM.Build.0 = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|ARM64.Build.0 = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|iPhone.Build.0 = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|x64.ActiveCfg = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|x64.Build.0 = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|x86.ActiveCfg = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Debug|x86.Build.0 = Debug|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|Any CPU.Build.0 = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|ARM.ActiveCfg = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|ARM.Build.0 = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|ARM64.ActiveCfg = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|ARM64.Build.0 = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|iPhone.ActiveCfg = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|iPhone.Build.0 = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|x64.ActiveCfg = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|x64.Build.0 = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|x86.ActiveCfg = Release|Any CPU - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C}.Release|x86.Build.0 = Release|Any CPU {4A249A54-D81D-4C1F-9DB2-0D60FA4BE794}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|Any CPU {4A249A54-D81D-4C1F-9DB2-0D60FA4BE794}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|Any CPU {4A249A54-D81D-4C1F-9DB2-0D60FA4BE794}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|Any CPU @@ -1466,44 +1285,6 @@ Global {69CE42A2-44DD-4740-856B-607C3BB5A92E}.Release|x64.Build.0 = Release|Any CPU {69CE42A2-44DD-4740-856B-607C3BB5A92E}.Release|x86.ActiveCfg = Release|Any CPU {69CE42A2-44DD-4740-856B-607C3BB5A92E}.Release|x86.Build.0 = Release|Any CPU - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|Any CPU.ActiveCfg = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|Any CPU.Build.0 = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|ARM.ActiveCfg = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|ARM.Build.0 = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|ARM64.ActiveCfg = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|ARM64.Build.0 = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|iPhone.ActiveCfg = Debug + MobileApps|iPhone - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|iPhoneSimulator.ActiveCfg = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|x64.ActiveCfg = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|x64.Build.0 = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|x86.ActiveCfg = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug + MobileApps|x86.Build.0 = Debug + MobileApps|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|ARM.Build.0 = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|ARM64.ActiveCfg = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|ARM64.Build.0 = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|iPhone.ActiveCfg = Debug|iPhone - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|iPhone.Build.0 = Debug|iPhone - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|x64.Build.0 = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Debug|x86.Build.0 = Debug|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|ARM.ActiveCfg = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|ARM.Build.0 = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|ARM64.Build.0 = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|iPhone.ActiveCfg = Release|iPhone - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|iPhone.Build.0 = Release|iPhone - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|x64.ActiveCfg = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|x64.Build.0 = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|x86.ActiveCfg = Release|iPhoneSimulator - {034A5B86-A8AE-449D-B561-46F811329E6D}.Release|x86.Build.0 = Release|iPhoneSimulator {3DC6EC76-D350-4D43-B206-A4CEC8AA36D4}.Debug + MobileApps|Any CPU.ActiveCfg = Debug|Any CPU {3DC6EC76-D350-4D43-B206-A4CEC8AA36D4}.Debug + MobileApps|Any CPU.Build.0 = Debug|Any CPU {3DC6EC76-D350-4D43-B206-A4CEC8AA36D4}.Debug + MobileApps|ARM.ActiveCfg = Debug|Any CPU @@ -2166,12 +1947,9 @@ Global {A181778D-5917-41CE-AA5F-7DAAA7B7F5BB} = {9B0B5396-4D95-4C15-82ED-DC22B5A3123F} {18559D36-C735-4933-AA86-398C8222D4F6} = {9B0B5396-4D95-4C15-82ED-DC22B5A3123F} {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} = {9B0B5396-4D95-4C15-82ED-DC22B5A3123F} - {A8C2D397-BA21-4BD2-93AA-801B0E0804BC} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} {408DCC1C-E810-4F9F-94EE-8421715A3661} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} - {70DFE67C-D2D1-4BE4-B785-F4445C6F652D} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} {8672FC71-00DE-491D-BCEB-101A2A7887E6} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} {3C21354D-601A-4902-A728-419C70891338} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} - {4DDB6B3A-F95A-4F34-B0AE-E3C909D68A11} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} {B6BE589B-1DBB-4C36-803F-6D425723FA74} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} {2EAA7878-3E2A-4355-9841-430BF45EA8BD} = {58B95AA7-BE17-40F2-9C9A-FA27C282A10A} {24D2AF71-A01E-4450-8C3F-B9923A81134B} = {34BE693E-3496-45A4-B1D2-D3A0E068EEDB} @@ -2180,7 +1958,6 @@ Global {2EBB7FFE-47E0-46F8-A4D6-79A4CF44729C} = {384BA371-F17F-4A70-9423-D54F71BB3FCB} {384BA371-F17F-4A70-9423-D54F71BB3FCB} = {34BE693E-3496-45A4-B1D2-D3A0E068EEDB} {EA983957-DC2F-4D9E-A2E3-79ADEB5CEB26} = {E19B0572-BBD7-424E-81D5-E59E6884EB3A} - {B22B9B5D-9B2E-4B8F-8EDD-D706B4AA942C} = {9B0B5396-4D95-4C15-82ED-DC22B5A3123F} {4A249A54-D81D-4C1F-9DB2-0D60FA4BE794} = {9B0B5396-4D95-4C15-82ED-DC22B5A3123F} {5FAAD966-36B8-4C19-A5FA-5410DD53063D} = {34BE693E-3496-45A4-B1D2-D3A0E068EEDB} {F67DAC26-46A4-4695-B1ED-58B7D021D8BE} = {5FAAD966-36B8-4C19-A5FA-5410DD53063D} @@ -2196,7 +1973,6 @@ Global {DD23D8FF-86BA-4E9F-8AF1-0EBE0D86986A} = {CC07F293-91B9-45A3-AA3A-77885BBCB624} {6839F934-45F0-4026-8AF3-C3AEFB7D48A9} = {1A37FD75-94E9-4D6F-953A-0DABBD7B49E9} {69CE42A2-44DD-4740-856B-607C3BB5A92E} = {9B0B5396-4D95-4C15-82ED-DC22B5A3123F} - {034A5B86-A8AE-449D-B561-46F811329E6D} = {34BE693E-3496-45A4-B1D2-D3A0E068EEDB} {259B5734-1D43-43F7-8107-32F602A99019} = {EA983957-DC2F-4D9E-A2E3-79ADEB5CEB26} {3DC6EC76-D350-4D43-B206-A4CEC8AA36D4} = {9B0B5396-4D95-4C15-82ED-DC22B5A3123F} {BCAEE9AE-8D3E-4C77-A2E4-134E1552D5F8} = {34BE693E-3496-45A4-B1D2-D3A0E068EEDB} diff --git a/build/InstallAndroid.ps1 b/build/InstallAndroid.ps1 index e466c0a82f..3b6b17e143 100644 --- a/build/InstallAndroid.ps1 +++ b/build/InstallAndroid.ps1 @@ -6,6 +6,7 @@ $androidSdk = "C:\Program Files (x86)\Android\android-sdk" $androidSdkVersion28 = "platforms;android-28" $androidSdkVersion29 = "platforms;android-29" $androidSdkVersion30 = "platforms;android-30" +$androidSdkVersion31 = "platforms;android-31" #$ErrorActionPreference = "Stop" @@ -41,3 +42,6 @@ echo y y y y y y y |C:\Downloads\AndroidSdkTools\cmdline-tools\bin\.\sdkmanager echo "installing android 30" echo y y y y y y y |C:\Downloads\AndroidSdkTools\cmdline-tools\bin\.\sdkmanager "$androidSdkVersion30" --sdk_root="$androidSdk" + +echo "installing android 31" +echo y y y y y y y |C:\Downloads\AndroidSdkTools\cmdline-tools\bin\.\sdkmanager "$androidSdkVersion31" --sdk_root="$androidSdk" diff --git a/build/installEdgeDriver.ps1 b/build/installEdgeDriver.ps1 index 09799155a5..6d108824ee 100644 --- a/build/installEdgeDriver.ps1 +++ b/build/installEdgeDriver.ps1 @@ -1,4 +1,13 @@ -$url = "https://msedgedriver.azureedge.net/119.0.2151.72/edgedriver_win64.zip" #Chrome Driver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ +# Get the installed version of Microsoft Edge +$edgeVersion = $(Get-Item "${env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe").VersionInfo.ProductVersion + +# Check if $edgeVersion is null or empty +if ([string]::IsNullOrEmpty($edgeVersion)) { + echo "##vso[task.logissue type=error]Microsoft Edge version is not found. Please ensure Microsoft Edge is installed." + echo "##vso[task.complete result=Failed;]Failed" + } + +$url = "https://msedgedriver.azureedge.net/$edgeVersion/edgedriver_win64.zip" #Edge Driver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ $fileName = "edgedriver_win64.zip" $source = "C:\Downloads\$fileName" $destination = "C:\Program Files\dotnet\" diff --git a/build/template-install-keyvault-secrets.yaml b/build/template-install-keyvault-secrets.yaml index e5993fd197..015a00aa7e 100644 --- a/build/template-install-keyvault-secrets.yaml +++ b/build/template-install-keyvault-secrets.yaml @@ -2,16 +2,18 @@ # Install all secrets needed from KeyVault onto the build machine. steps: -- task: AzureKeyVault@1 - displayName: 'Azure Key Vault: buildautomation' +# Task to download Azure Key Vault secrets using the Azure Key Vault task version 2. +- task: AzureKeyVault@2 + displayName: 'Connect to Key Vault' inputs: - azureSubscription: '.NET Keyvault' - KeyVaultName: buildautomation - SecretsFilter: 'AzureADIdentityDivisionTestAgentCert' - + azureSubscription: 'AuthSdkResourceManager' # string. Workload identity service connection to use managed identity authentication + KeyVaultName: 'msidlabs' # string. Required. The name of the Key Vault containing the secrets. + #setting secrets filter to fetch only MSIDLABCertificate cert from the vault + SecretsFilter: 'LabVaultAccessCert' # string. Required. Specifies the secret to download. Use '*' for all secrets. + #RunAsPreJob: false # boolean. Make secrets available to whole job. Default: false. - powershell: | - $kvSecretBytes = [System.Convert]::FromBase64String('$(AzureADIdentityDivisionTestAgentCert)') + $kvSecretBytes = [System.Convert]::FromBase64String('$(LabVaultAccessCert)') $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection $certCollection.Import($kvSecretBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) diff --git a/build/template-run-integration-tests.yaml b/build/template-run-integration-tests.yaml index 3cfb9758cc..81ffa8cbdf 100644 --- a/build/template-run-integration-tests.yaml +++ b/build/template-run-integration-tests.yaml @@ -5,7 +5,7 @@ steps: - task: VSTest@2 displayName: 'Run integration tests (.NET FX)' - condition: and(succeeded(), eq(variables['PipelineType'], '')) + condition: and(succeeded(), eq(variables['PipelineType'], 'legacy')) inputs: testSelector: 'testAssemblies' testAssemblyVer2: '**\Microsoft.Identity.Test.Integration.netfx\bin\**\Microsoft.Identity.Test.Integration.NetFx.dll' diff --git a/build/template-run-unit-tests.yaml b/build/template-run-unit-tests.yaml index e88dd6f107..ebaed2c966 100644 --- a/build/template-run-unit-tests.yaml +++ b/build/template-run-unit-tests.yaml @@ -8,7 +8,7 @@ steps: - task: VSTest@2 displayName: 'Run unit tests (.NET FX)' - condition: and(succeeded(), eq(variables['PipelineType'], '')) + condition: and(succeeded(), eq(variables['PipelineType'], 'legacy')) inputs: testSelector: 'testAssemblies' testAssemblyVer2: '**\Microsoft.Identity.Test.Unit\bin\**\net4*\Microsoft.Identity.Test.Unit.dll' diff --git a/src/client/Microsoft.Identity.Client/Properties/InternalsVisibleTo.cs b/src/client/Microsoft.Identity.Client/Properties/InternalsVisibleTo.cs index fe2959e994..516144f759 100644 --- a/src/client/Microsoft.Identity.Client/Properties/InternalsVisibleTo.cs +++ b/src/client/Microsoft.Identity.Client/Properties/InternalsVisibleTo.cs @@ -7,7 +7,6 @@ [assembly: InternalsVisibleTo("Microsoft.Identity.Client.Desktop" + KeyTokens.MSAL)] [assembly: InternalsVisibleTo("Microsoft.Identity.Client.Broker" + KeyTokens.MSAL)] -[assembly: InternalsVisibleTo("Microsoft.Identity.Test.Integration.Win8" + KeyTokens.MSAL)] [assembly: InternalsVisibleTo("Microsoft.Identity.Test.Unit" + KeyTokens.MSAL)] [assembly: InternalsVisibleTo("Microsoft.Identity.Test.Common" + KeyTokens.MSAL)] [assembly: InternalsVisibleTo("Microsoft.Identity.Test.SideBySide" + KeyTokens.MSAL)] diff --git a/tests/CacheCompat/CommonCache.Test.AdalV3/CommonCache.Test.AdalV3.csproj b/tests/CacheCompat/CommonCache.Test.AdalV3/CommonCache.Test.AdalV3.csproj deleted file mode 100644 index f412be8837..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV3/CommonCache.Test.AdalV3.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - Exe - net48 - Debug;Release;Debug + MobileApps - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/CacheCompat/CommonCache.Test.AdalV3/FileBasedAdalV3TokenCache.cs b/tests/CacheCompat/CommonCache.Test.AdalV3/FileBasedAdalV3TokenCache.cs deleted file mode 100644 index b4b55f42b9..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV3/FileBasedAdalV3TokenCache.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.IO; -using System.Security.Cryptography; -using CommonCache.Test.Common; -using Microsoft.IdentityModel.Clients.ActiveDirectory; - -namespace CommonCache.Test.AdalV3 -{ - // This is a simple persistent cache implementation for an ADAL V3 desktop application - public class FileBasedAdalV3TokenCache : TokenCache - { - private static readonly object s_fileLock = new object(); - - // Initializes the cache against a local file. - // If the file is already present, it loads its content in the ADAL cache - public FileBasedAdalV3TokenCache(string filePath) - { - CacheFilePath = filePath; - AfterAccess = AfterAccessNotification; - BeforeAccess = BeforeAccessNotification; - lock (s_fileLock) - { - Deserialize(CacheFileUtils.ReadFromFileIfExists(CacheFilePath)); - } - } - - public string CacheFilePath { get; } - - // Empties the persistent store. - public override void Clear() - { - base.Clear(); - File.Delete(CacheFilePath); - } - - // Triggered right before ADAL needs to access the cache. - // Reload the cache from the persistent store in case it changed since the last access. - private void BeforeAccessNotification(TokenCacheNotificationArgs args) - { - lock (s_fileLock) - { - Deserialize(CacheFileUtils.ReadFromFileIfExists(CacheFilePath)); - } - } - - // Triggered right after ADAL accessed the cache. - private void AfterAccessNotification(TokenCacheNotificationArgs args) - { - // if the access operation resulted in a cache update - if (HasStateChanged) - { - lock (s_fileLock) - { - // reflect changes in the persistent store - CacheFileUtils.WriteToFileIfNotNull(CacheFilePath, Serialize()); - // once the write operation took place, restore the HasStateChanged bit to false - HasStateChanged = false; - } - } - } - } -} diff --git a/tests/CacheCompat/CommonCache.Test.AdalV3/Program.cs b/tests/CacheCompat/CommonCache.Test.AdalV3/Program.cs deleted file mode 100644 index f8b6ea5acc..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV3/Program.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using CommonCache.Test.Common; -using Microsoft.IdentityModel.Clients.ActiveDirectory; - -namespace CommonCache.Test.AdalV3 -{ - public static class Program - { - public static void Main(string[] args) - { - new AdalV3CacheExecutor().Execute(args); - } - - private class AdalV3CacheExecutor : AbstractCacheExecutor - { - /// - protected override async Task> InternalExecuteAsync(TestInputData testInputData) - { - LoggerCallbackHandler.LogCallback = (LogLevel level, string message, bool containsPii) => - { - Console.WriteLine("{0}: {1}", level, message); - }; - - var results = new List(); - - foreach (var labUserData in testInputData.LabUserDatas) - { - var tokenCache = new FileBasedAdalV3TokenCache(CommonCacheTestUtils.AdalV3CacheFilePath); - var authenticationContext = new AuthenticationContext(labUserData.Authority, tokenCache); - - try - { - var result = await authenticationContext.AcquireTokenSilentAsync( - TestInputData.MsGraph, - labUserData.ClientId, - new UserIdentifier(labUserData.Upn, UserIdentifierType.RequiredDisplayableId)).ConfigureAwait(false); - - Console.WriteLine($"got token for '{result.UserInfo.DisplayableId}' from the cache"); - results.Add(new CacheExecutorAccountResult( - labUserData.Upn, - result.UserInfo.DisplayableId, - true)); - } - catch (AdalSilentTokenAcquisitionException) - { - var result = await authenticationContext.AcquireTokenAsync( - TestInputData.MsGraph, - labUserData.ClientId, - new UserPasswordCredential(labUserData.Upn, labUserData.Password)).ConfigureAwait(false); - - if (string.IsNullOrWhiteSpace(result.AccessToken)) - { - results.Add(new CacheExecutorAccountResult(labUserData.Upn, string.Empty, false)); - } - else - { - Console.WriteLine($"got token for '{result.UserInfo.DisplayableId}' without the cache"); - results.Add(new CacheExecutorAccountResult( - labUserData.Upn, - result.UserInfo.DisplayableId, - false)); - } - } - } - - return results; - } - } - } -} diff --git a/tests/CacheCompat/CommonCache.Test.AdalV4/CommonCache.Test.AdalV4.csproj b/tests/CacheCompat/CommonCache.Test.AdalV4/CommonCache.Test.AdalV4.csproj deleted file mode 100644 index 63bd016beb..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV4/CommonCache.Test.AdalV4.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - Exe - net48 - Debug;Release;Debug + MobileApps - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/CacheCompat/CommonCache.Test.AdalV4/FileBasedTokenCache.cs b/tests/CacheCompat/CommonCache.Test.AdalV4/FileBasedTokenCache.cs deleted file mode 100644 index a2e1f14f1e..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV4/FileBasedTokenCache.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.IO; -using System.Security.Cryptography; -using CommonCache.Test.Common; -using Microsoft.Identity.Core.Cache; -using Microsoft.IdentityModel.Clients.ActiveDirectory; - -namespace CommonCache.Test.AdalV4 -{ - /// - /// Simple file based persistent cache implementation for a desktop application (from ADAL 4.x) - /// - public class FileBasedTokenCache : TokenCache - { - private static readonly object s_fileLock = new object(); - private readonly CacheStorageType _cacheStorageType; - - // Initializes the cache against a local file. - // If the file is already present, it loads its content in the ADAL cache - public FileBasedTokenCache(CacheStorageType cacheStorageType, string adalV3FilePath, string unifiedCacheFilePath) - { - _cacheStorageType = cacheStorageType; - AdalV3CacheFilePath = adalV3FilePath; - UnifiedCacheFilePath = unifiedCacheFilePath; - - AfterAccess = AfterAccessNotification; - BeforeAccess = BeforeAccessNotification; - - lock (s_fileLock) - { - var cacheData = new CacheData - { - AdalV3State = CacheFileUtils.ReadFromFileIfExists(AdalV3CacheFilePath), - UnifiedState = CacheFileUtils.ReadFromFileIfExists(UnifiedCacheFilePath) - }; - DeserializeAdalAndUnifiedCache(cacheData); - } - } - - public string AdalV3CacheFilePath { get; } - public string UnifiedCacheFilePath { get; } - - // Empties the persistent store. - public override void Clear() - { - base.Clear(); - File.Delete(AdalV3CacheFilePath); - File.Delete(UnifiedCacheFilePath); - } - - // Triggered right before ADAL needs to access the cache. - // Reload the cache from the persistent store in case it changed since the last access. - private void BeforeAccessNotification(TokenCacheNotificationArgs args) - { - lock (s_fileLock) - { - var cacheData = new CacheData - { - AdalV3State = CacheFileUtils.ReadFromFileIfExists(AdalV3CacheFilePath), - UnifiedState = CacheFileUtils.ReadFromFileIfExists(UnifiedCacheFilePath) - }; - DeserializeAdalAndUnifiedCache(cacheData); - } - } - - // Triggered right after ADAL accessed the cache. - private void AfterAccessNotification(TokenCacheNotificationArgs args) - { - // if the access operation resulted in a cache update - if (HasStateChanged) - { - lock (s_fileLock) - { - // reflect changes in the persistent store - var cacheData = SerializeAdalAndUnifiedCache(); - - if ((_cacheStorageType & CacheStorageType.Adal) == CacheStorageType.Adal) - { - CacheFileUtils.WriteToFileIfNotNull(AdalV3CacheFilePath, cacheData.AdalV3State); - } - - if ((_cacheStorageType & CacheStorageType.MsalV2) == CacheStorageType.MsalV2) - { - CacheFileUtils.WriteToFileIfNotNull(UnifiedCacheFilePath, cacheData.UnifiedState); - } - - // once the write operation took place, restore the HasStateChanged bit to false - HasStateChanged = false; - } - } - } - } -} diff --git a/tests/CacheCompat/CommonCache.Test.AdalV4/Program.cs b/tests/CacheCompat/CommonCache.Test.AdalV4/Program.cs deleted file mode 100644 index bd5ed50cfe..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV4/Program.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using CommonCache.Test.Common; -using Microsoft.IdentityModel.Clients.ActiveDirectory; - -namespace CommonCache.Test.AdalV4 -{ - public static class Program - { - public static void Main(string[] args) - { - new AdalV4CacheExecutor().Execute(args); - } - - private class AdalV4CacheExecutor : AbstractCacheExecutor - { - /// - protected override async Task> InternalExecuteAsync(TestInputData testInputData) - { - LoggerCallbackHandler.LogCallback = (LogLevel level, string message, bool containsPii) => - { - Console.WriteLine("{0}: {1}", level, message); - }; - - var results = new List(); - - foreach (var labUserData in testInputData.LabUserDatas) - { - var tokenCache = new FileBasedTokenCache( - testInputData.StorageType, - CommonCacheTestUtils.AdalV3CacheFilePath, - CommonCacheTestUtils.MsalV2CacheFilePath); - - var authenticationContext = new AuthenticationContext(labUserData.Authority, tokenCache); - - try - { - var result = await authenticationContext.AcquireTokenSilentAsync( - TestInputData.MsGraph, - labUserData.ClientId, - new UserIdentifier(labUserData.Upn, UserIdentifierType.RequiredDisplayableId)).ConfigureAwait(false); - - Console.WriteLine($"got token for '{result.UserInfo.DisplayableId}' from the cache"); - results.Add(new CacheExecutorAccountResult( - labUserData.Upn, - result.UserInfo.DisplayableId, - true)); - } - catch (AdalSilentTokenAcquisitionException) - { - var result = await authenticationContext.AcquireTokenAsync( - TestInputData.MsGraph, - labUserData.ClientId, - new UserPasswordCredential(labUserData.Upn, labUserData.Password)).ConfigureAwait(false); - - if (string.IsNullOrWhiteSpace(result.AccessToken)) - { - results.Add(new CacheExecutorAccountResult(labUserData.Upn, string.Empty, false)); - } - else - { - Console.WriteLine($"got token for '{result.UserInfo.DisplayableId}' without the cache"); - results.Add(new CacheExecutorAccountResult( - labUserData.Upn, - result.UserInfo.DisplayableId, - false)); - } - } - } - - return results; - } - } - } -} diff --git a/tests/CacheCompat/CommonCache.Test.AdalV5/CommonCache.Test.AdalV5.csproj b/tests/CacheCompat/CommonCache.Test.AdalV5/CommonCache.Test.AdalV5.csproj deleted file mode 100644 index ea2056f6e4..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV5/CommonCache.Test.AdalV5.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - Exe - net48 - Debug;Release;Debug + MobileApps - - - - - - - - - diff --git a/tests/CacheCompat/CommonCache.Test.AdalV5/FileBasedTokenCache.cs b/tests/CacheCompat/CommonCache.Test.AdalV5/FileBasedTokenCache.cs deleted file mode 100644 index 2174cc4f55..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV5/FileBasedTokenCache.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.IO; -using System.Security.Cryptography; -using CommonCache.Test.Common; -using Microsoft.IdentityModel.Clients.ActiveDirectory; - -namespace CommonCache.Test.AdalV5 -{ - public class FileBasedTokenCache : TokenCache - { - private static readonly object s_fileLock = new object(); - private readonly CacheStorageType _cacheStorageType; - - // Initializes the cache against a local file. - // If the file is already present, it loads its content in the ADAL cache - public FileBasedTokenCache(CacheStorageType cacheStorageType, string adalV3FilePath, string msalV2FilePath, string msalV3FilePath) - { - _cacheStorageType = cacheStorageType; - AdalV3CacheFilePath = adalV3FilePath; - MsalV2CacheFilePath = msalV2FilePath; - MsalV3CacheFilePath = msalV3FilePath; - - AfterAccess = AfterAccessNotification; - BeforeAccess = BeforeAccessNotification; - - LoadCache(); - } - - private void LoadCache() - { - lock (s_fileLock) - { - var adalV3Bytes = CacheFileUtils.ReadFromFileIfExists(AdalV3CacheFilePath); - var msalV2Bytes = CacheFileUtils.ReadFromFileIfExists(MsalV2CacheFilePath); - var msalV3Bytes = CacheFileUtils.ReadFromFileIfExists(MsalV3CacheFilePath); - - DeserializeAdalV3(adalV3Bytes); - DeserializeMsalV2(msalV2Bytes); - DeserializeMsalV3(msalV3Bytes); - } - } - - public string AdalV3CacheFilePath { get; } - public string MsalV2CacheFilePath { get; } - public string MsalV3CacheFilePath { get; } - - // Empties the persistent store. - public override void Clear() - { - base.Clear(); - File.Delete(AdalV3CacheFilePath); - File.Delete(MsalV2CacheFilePath); - File.Delete(MsalV3CacheFilePath); - } - - // Triggered right before ADAL needs to access the cache. - // Reload the cache from the persistent store in case it changed since the last access. - private void BeforeAccessNotification(TokenCacheNotificationArgs args) - { - LoadCache(); - } - - // Triggered right after ADAL accessed the cache. - private void AfterAccessNotification(TokenCacheNotificationArgs args) - { - // if the access operation resulted in a cache update - if (HasStateChanged) - { - lock (s_fileLock) - { - var adalV3Bytes = SerializeAdalV3(); - var msalV2Bytes = SerializeMsalV2(); - var msalV3Bytes = SerializeMsalV3(); - - // reflect changes in the persistent store - if ((_cacheStorageType & CacheStorageType.Adal) == CacheStorageType.Adal) - { - CacheFileUtils.WriteToFileIfNotNull(AdalV3CacheFilePath, adalV3Bytes); - } - if ((_cacheStorageType & CacheStorageType.MsalV2) == CacheStorageType.MsalV2) - { - CacheFileUtils.WriteToFileIfNotNull(MsalV2CacheFilePath, msalV2Bytes); - } - if ((_cacheStorageType & CacheStorageType.MsalV3) == CacheStorageType.MsalV3) - { - CacheFileUtils.WriteToFileIfNotNull(MsalV3CacheFilePath, msalV3Bytes); - } - - // once the write operation took place, restore the HasStateChanged bit to false - HasStateChanged = false; - } - } - } - } -} diff --git a/tests/CacheCompat/CommonCache.Test.AdalV5/Program.cs b/tests/CacheCompat/CommonCache.Test.AdalV5/Program.cs deleted file mode 100644 index 2502d99f90..0000000000 --- a/tests/CacheCompat/CommonCache.Test.AdalV5/Program.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using CommonCache.Test.Common; -using Microsoft.IdentityModel.Clients.ActiveDirectory; - -namespace CommonCache.Test.AdalV5 -{ - public static class Program - { - public static void Main(string[] args) - { - new AdalV5CacheExecutor().Execute(args); - } - - private class AdalV5CacheExecutor : AbstractCacheExecutor - { - /// - protected override async Task> InternalExecuteAsync(TestInputData testInputData) - { - LoggerCallbackHandler.LogCallback = (LogLevel level, string message, bool containsPii) => - { - Console.WriteLine("{0}: {1}", level, message); - }; - - var results = new List(); - - foreach (var labUserData in testInputData.LabUserDatas) - { - var tokenCache = new FileBasedTokenCache( - testInputData.StorageType, - CommonCacheTestUtils.AdalV3CacheFilePath, - CommonCacheTestUtils.MsalV2CacheFilePath, - CommonCacheTestUtils.MsalV3CacheFilePath); - - var authenticationContext = new AuthenticationContext(labUserData.Authority, tokenCache); - - try - { - Console.WriteLine("Calling ATS with username: {0}", labUserData.Upn); - var result = await authenticationContext.AcquireTokenSilentAsync( - TestInputData.MsGraph, - labUserData.ClientId, - new UserIdentifier(labUserData.Upn, UserIdentifierType.RequiredDisplayableId)).ConfigureAwait(false); - - Console.WriteLine($"got token for '{result.UserInfo.DisplayableId}' from the cache"); - - results.Add(new CacheExecutorAccountResult( - labUserData.Upn, - result.UserInfo.DisplayableId, - true)); - } - catch (AdalSilentTokenAcquisitionException) - { - var result = await authenticationContext.AcquireTokenAsync( - TestInputData.MsGraph, - labUserData.ClientId, - new UserPasswordCredential(labUserData.Upn, labUserData.Password)).ConfigureAwait(false); - - if (string.IsNullOrWhiteSpace(result.AccessToken)) - { - results.Add(new CacheExecutorAccountResult(labUserData.Upn, string.Empty, false)); - } - else - { - Console.WriteLine($"got token for '{result.UserInfo.DisplayableId}' without the cache"); - results.Add(new CacheExecutorAccountResult( - labUserData.Upn, - result.UserInfo.DisplayableId, - false)); - } - } - } - - return results; - } - } - } -} diff --git a/tests/CacheCompat/CommonCache.Test.Common/CommonCacheTestUtils.cs b/tests/CacheCompat/CommonCache.Test.Common/CommonCacheTestUtils.cs index aabd81a9fc..d72caebd9d 100644 --- a/tests/CacheCompat/CommonCache.Test.Common/CommonCacheTestUtils.cs +++ b/tests/CacheCompat/CommonCache.Test.Common/CommonCacheTestUtils.cs @@ -8,7 +8,6 @@ namespace CommonCache.Test.Common public static class CommonCacheTestUtils { public static string CacheFileDirectory => Path.Combine(Path.GetTempPath(), "adalcachecompattestdata"); - public static string AdalV3CacheFilePath => Path.Combine(CacheFileDirectory, "cacheAdalV3.bin"); public static string MsalV2CacheFilePath => Path.Combine(CacheFileDirectory, "msalCacheV2.bin"); public static string MsalV3CacheFilePath => Path.Combine(CacheFileDirectory, "msalCacheV3.bin"); @@ -19,10 +18,6 @@ public static void EnsureCacheFileDirectoryExists() public static void DeleteAllTestCaches() { - if (File.Exists(AdalV3CacheFilePath)) - { - File.Delete(AdalV3CacheFilePath); - } if (File.Exists(MsalV2CacheFilePath)) { diff --git a/tests/CacheCompat/CommonCache.Test.MsalV2/FileBasedTokenCacheHelper.cs b/tests/CacheCompat/CommonCache.Test.MsalV2/FileBasedTokenCacheHelper.cs index 93d591a95b..bd45e0ebee 100644 --- a/tests/CacheCompat/CommonCache.Test.MsalV2/FileBasedTokenCacheHelper.cs +++ b/tests/CacheCompat/CommonCache.Test.MsalV2/FileBasedTokenCacheHelper.cs @@ -17,13 +17,11 @@ public static class FileBasedTokenCacheHelper { private static readonly object s_fileLock = new object(); private static CacheStorageType s_cacheStorage = CacheStorageType.None; - public static string AdalV3CacheFileName { get; private set; } public static string UnifiedCacheFileName { get; private set; } - public static void ConfigureUserCache(CacheStorageType cacheStorageType, TokenCache tokenCache, string adalV3CacheFileName, string unifiedCacheFileName) + public static void ConfigureUserCache(CacheStorageType cacheStorageType, TokenCache tokenCache, string unifiedCacheFileName) { s_cacheStorage = cacheStorageType; - AdalV3CacheFileName = adalV3CacheFileName; UnifiedCacheFileName = unifiedCacheFileName; if (tokenCache != null) { @@ -36,10 +34,7 @@ public static void BeforeAccessNotification(TokenCacheNotificationArgs args) { lock (s_fileLock) { - var adalv3State = CacheFileUtils.ReadFromFileIfExists(AdalV3CacheFileName); var unifiedState = CacheFileUtils.ReadFromFileIfExists(UnifiedCacheFileName); - - args.TokenCache.DeserializeUnifiedAndAdalCache(new CacheData { AdalV3State = adalv3State, UnifiedState = unifiedState }); } } @@ -53,13 +48,6 @@ public static void AfterAccessNotification(TokenCacheNotificationArgs args) var cacheData = args.TokenCache.SerializeUnifiedAndAdalCache(); // reflect changes in the persistent store - if ((s_cacheStorage & CacheStorageType.Adal) == CacheStorageType.Adal) - { - if (!string.IsNullOrWhiteSpace(AdalV3CacheFileName)) - { - CacheFileUtils.WriteToFileIfNotNull(AdalV3CacheFileName, cacheData.AdalV3State); - } - } if ((s_cacheStorage & CacheStorageType.MsalV2) == CacheStorageType.MsalV2) { diff --git a/tests/CacheCompat/CommonCache.Test.MsalV2/Program.cs b/tests/CacheCompat/CommonCache.Test.MsalV2/Program.cs index e28f1578e0..b8bbf8ba83 100644 --- a/tests/CacheCompat/CommonCache.Test.MsalV2/Program.cs +++ b/tests/CacheCompat/CommonCache.Test.MsalV2/Program.cs @@ -37,7 +37,6 @@ protected override async Task> InternalE FileBasedTokenCacheHelper.ConfigureUserCache( testInputData.StorageType, tokenCache, - CommonCacheTestUtils.AdalV3CacheFilePath, CommonCacheTestUtils.MsalV2CacheFilePath); var results = new List(); diff --git a/tests/CacheCompat/CommonCache.Test.MsalV3/FileBasedTokenCacheHelper.cs b/tests/CacheCompat/CommonCache.Test.MsalV3/FileBasedTokenCacheHelper.cs index 3467e27cf5..ade529ab8f 100644 --- a/tests/CacheCompat/CommonCache.Test.MsalV3/FileBasedTokenCacheHelper.cs +++ b/tests/CacheCompat/CommonCache.Test.MsalV3/FileBasedTokenCacheHelper.cs @@ -20,19 +20,16 @@ public static class FileBasedTokenCacheHelper public static string MsalV2CacheFileName { get; private set; } public static string MsalV3CacheFileName { get; private set; } - public static string AdalV3CacheFileName { get; private set; } public static void ConfigureUserCache( CacheStorageType cacheStorageType, ITokenCache tokenCache, - string adalV3CacheFileName, string msalV2CacheFileName, string msalV3CacheFileName) { s_cacheStorageType = cacheStorageType; MsalV2CacheFileName = msalV2CacheFileName; MsalV3CacheFileName = msalV3CacheFileName; - AdalV3CacheFileName = adalV3CacheFileName; if (tokenCache != null) { @@ -45,14 +42,9 @@ public static void BeforeAccessNotification(TokenCacheNotificationArgs args) { lock (s_fileLock) { - var adalv3State = CacheFileUtils.ReadFromFileIfExists(AdalV3CacheFileName); var msalv2State = CacheFileUtils.ReadFromFileIfExists(MsalV2CacheFileName); var msalv3State = CacheFileUtils.ReadFromFileIfExists(MsalV3CacheFileName); - if (adalv3State != null) - { - args.TokenCache.DeserializeAdalV3(adalv3State); - } if (msalv2State != null) { #pragma warning disable CS0618 // Type or member is obsolete @@ -73,20 +65,12 @@ public static void AfterAccessNotification(TokenCacheNotificationArgs args) { lock (s_fileLock) { - var adalV3State = args.TokenCache.SerializeAdalV3(); #pragma warning disable CS0618 // Type or member is obsolete var msalV2State = args.TokenCache.SerializeMsalV2(); #pragma warning restore CS0618 // Type or member is obsolete var msalV3State = args.TokenCache.SerializeMsalV3(); // reflect changes in the persistent store - if ((s_cacheStorageType & CacheStorageType.Adal) == CacheStorageType.Adal) - { - if (!string.IsNullOrWhiteSpace(AdalV3CacheFileName)) - { - CacheFileUtils.WriteToFileIfNotNull(AdalV3CacheFileName, adalV3State); - } - } if ((s_cacheStorageType & CacheStorageType.MsalV2) == CacheStorageType.MsalV2) { diff --git a/tests/CacheCompat/CommonCache.Test.MsalV3/Program.cs b/tests/CacheCompat/CommonCache.Test.MsalV3/Program.cs index ef13fa569b..27d4a4c25f 100644 --- a/tests/CacheCompat/CommonCache.Test.MsalV3/Program.cs +++ b/tests/CacheCompat/CommonCache.Test.MsalV3/Program.cs @@ -46,7 +46,6 @@ protected override async Task> InternalE FileBasedTokenCacheHelper.ConfigureUserCache( testInputData.StorageType, app.UserTokenCache, - CommonCacheTestUtils.AdalV3CacheFilePath, CommonCacheTestUtils.MsalV2CacheFilePath, CommonCacheTestUtils.MsalV3CacheFilePath); diff --git a/tests/CacheCompat/CommonCache.Test.Unit/CacheExecutionTests.cs b/tests/CacheCompat/CommonCache.Test.Unit/CacheExecutionTests.cs index 8c355d9bc5..55c721556c 100644 --- a/tests/CacheCompat/CommonCache.Test.Unit/CacheExecutionTests.cs +++ b/tests/CacheCompat/CommonCache.Test.Unit/CacheExecutionTests.cs @@ -43,69 +43,6 @@ public static void AssemblyInit(TestContext testContext) } [DataTestMethod] - [DataRow(CacheProgramType.AdalV3, CacheProgramType.AdalV3, CacheStorageType.Adal, DisplayName = "AdalV3->AdalV3 adal v3 cache")] - [DataRow(CacheProgramType.AdalV3, CacheProgramType.AdalV4, CacheStorageType.Adal, DisplayName = "AdalV3->AdalV4 adal v3 cache")] - [DataRow(CacheProgramType.AdalV3, CacheProgramType.AdalV5, CacheStorageType.Adal, DisplayName = "AdalV3->AdalV5 adal v3 cache")] - [DataRow(CacheProgramType.AdalV3, CacheProgramType.MsalV2, CacheStorageType.Adal, DisplayName = "AdalV3->MsalV2 adal v3 cache")] - [DataRow(CacheProgramType.AdalV3, CacheProgramType.MsalV3, CacheStorageType.Adal, DisplayName = "AdalV3->MsalV3 adal v3 cache")] - public async Task TestAdalV3CacheCompatibilityAsync( - CacheProgramType interactiveType, - CacheProgramType silentType, - CacheStorageType cacheStorageType) - { - var executor = new CacheTestExecutor(s_labUsers, cacheStorageType); - await executor.ExecuteAsync(interactiveType, silentType, CancellationToken.None).ConfigureAwait(false); - } - - [DataTestMethod] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.AdalV3, CacheStorageType.Adal, DisplayName = "AdalV4->AdalV3 adal v3 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.AdalV4, CacheStorageType.Adal, DisplayName = "AdalV4->AdalV4 adal v3 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.AdalV5, CacheStorageType.Adal, DisplayName = "AdalV4->AdalV5 adal v3 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.AdalV4, CacheStorageType.MsalV2, DisplayName = "AdalV4->AdalV4 msal v2 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.AdalV5, CacheStorageType.MsalV2, DisplayName = "AdalV4->AdalV5 msal v2 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.MsalV2, CacheStorageType.Adal, DisplayName = "AdalV4->MsalV2 adal v3 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.MsalV2, CacheStorageType.MsalV2, DisplayName = "AdalV4->MsalV2 msal v2 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.MsalV3, CacheStorageType.Adal, DisplayName = "AdalV4->MsalV3 adal v3 cache")] - [DataRow(CacheProgramType.AdalV4, CacheProgramType.MsalV3, CacheStorageType.MsalV2, DisplayName = "AdalV4->MsalV3 msal v2 cache")] - public async Task TestAdalV4CacheCompatibilityAsync( - CacheProgramType interactiveType, - CacheProgramType silentType, - CacheStorageType cacheStorageType) - { - var executor = new CacheTestExecutor(s_labUsers, cacheStorageType); - await executor.ExecuteAsync(interactiveType, silentType, CancellationToken.None).ConfigureAwait(false); - } - - [DataTestMethod] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.AdalV3, CacheStorageType.Adal, DisplayName = "AdalV5->AdalV3 adal v3 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.AdalV4, CacheStorageType.Adal, DisplayName = "AdalV5->AdalV4 adal v3 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.AdalV5, CacheStorageType.Adal, DisplayName = "AdalV5->AdalV5 adal v3 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.AdalV4, CacheStorageType.MsalV2, DisplayName = "AdalV5->AdalV4 msal v2 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.AdalV5, CacheStorageType.MsalV2, DisplayName = "AdalV5->AdalV5 msal v2 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.AdalV5, CacheStorageType.MsalV3, DisplayName = "AdalV5->AdalV5 msal v3 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.MsalV2, CacheStorageType.Adal, DisplayName = "AdalV5->MsalV2 adal v3 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.MsalV2, CacheStorageType.MsalV2, DisplayName = "AdalV5->MsalV2 msal v2 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.MsalV3, CacheStorageType.Adal, DisplayName = "AdalV5->MsalV3 adal v3 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.MsalV3, CacheStorageType.MsalV2, DisplayName = "AdalV5->MsalV3 msal v2 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.MsalV3, CacheStorageType.MsalV3, DisplayName = "AdalV5->MsalV3 msal v3 cache")] - public async Task TestAdalV5CacheCompatibilityAsync( - CacheProgramType interactiveType, - CacheProgramType silentType, - CacheStorageType cacheStorageType) - { - var executor = new CacheTestExecutor(s_labUsers, cacheStorageType); - await executor.ExecuteAsync(interactiveType, silentType, CancellationToken.None).ConfigureAwait(false); - } - - [DataTestMethod] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.AdalV3, CacheStorageType.Adal, DisplayName = "MsalV2->AdalV3 adal v3 cache")] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.AdalV4, CacheStorageType.Adal, DisplayName = "MsalV2->AdalV4 adal v3 cache")] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.AdalV4, CacheStorageType.MsalV2, DisplayName = "MsalV2->AdalV4 msal v2 cache")] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.AdalV5, CacheStorageType.Adal, DisplayName = "MsalV2->AdalV5 adal v3 cache")] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.AdalV5, CacheStorageType.MsalV2, DisplayName = "MsalV2->AdalV5 msal v2 cache")] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.MsalV2, CacheStorageType.Adal, DisplayName = "MsalV2->MsalV2 adal v3 cache")] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.MsalV2, CacheStorageType.MsalV2, DisplayName = "MsalV2->MsalV2 msal v2 cache")] - [DataRow(CacheProgramType.MsalV2, CacheProgramType.MsalV3, CacheStorageType.Adal, DisplayName = "MsalV2->MsalV3 adal v3 cache")] [DataRow(CacheProgramType.MsalV2, CacheProgramType.MsalV3, CacheStorageType.MsalV2, DisplayName = "MsalV2->MsalV3 msal v2 cache")] public async Task TestMsalV2CacheCompatibilityAsync( CacheProgramType interactiveType, @@ -117,13 +54,6 @@ public async Task TestMsalV2CacheCompatibilityAsync( } [DataTestMethod] - [DataRow(CacheProgramType.MsalV3, CacheProgramType.AdalV3, CacheStorageType.Adal, DisplayName = "MsalV3->AdalV3 adal v3 cache")] - [DataRow(CacheProgramType.MsalV3, CacheProgramType.AdalV4, CacheStorageType.Adal, DisplayName = "MsalV3->AdalV4 adal v3 cache")] - [DataRow(CacheProgramType.MsalV3, CacheProgramType.AdalV4, CacheStorageType.MsalV2, DisplayName = "MsalV3->AdalV4 msal v2 cache")] - [DataRow(CacheProgramType.MsalV3, CacheProgramType.AdalV5, CacheStorageType.Adal, DisplayName = "MsalV3->AdalV5 adal v3 cache")] - [DataRow(CacheProgramType.MsalV3, CacheProgramType.AdalV5, CacheStorageType.MsalV2, DisplayName = "MsalV3->AdalV5 msal v2 cache")] - [DataRow(CacheProgramType.MsalV3, CacheProgramType.AdalV5, CacheStorageType.MsalV3, DisplayName = "MsalV3->AdalV5 msal v3 cache")] - [DataRow(CacheProgramType.MsalV3, CacheProgramType.MsalV3, CacheStorageType.Adal, DisplayName = "MsalV3->MsalV3 adal v3 cache")] [DataRow(CacheProgramType.MsalV3, CacheProgramType.MsalV3, CacheStorageType.MsalV2, DisplayName = "MsalV3->MsalV3 msal v2 cache")] [DataRow(CacheProgramType.MsalV3, CacheProgramType.MsalV3, CacheStorageType.MsalV3, DisplayName = "MsalV3->MsalV3 msal v3 cache")] public async Task TestMsalV3CacheCompatibilityAsync( @@ -138,8 +68,6 @@ public async Task TestMsalV3CacheCompatibilityAsync( [DataTestMethod] [DataRow(CacheProgramType.MsalV3, CacheProgramType.MsalJava, CacheStorageType.MsalV3, DisplayName = "MsalV3->MsalJava msal v3 cache")] [DataRow(CacheProgramType.MsalJava, CacheProgramType.MsalV3, CacheStorageType.MsalV3, DisplayName = "MsalJava->MsalV3 msal v3 cache")] - [DataRow(CacheProgramType.MsalJava, CacheProgramType.AdalV5, CacheStorageType.MsalV3, DisplayName = "MsalJava->AdalV5 msal v3 cache")] - [DataRow(CacheProgramType.AdalV5, CacheProgramType.MsalJava, CacheStorageType.MsalV3, DisplayName = "AdalV5->MsalJava msal v3 cache")] public async Task TestMsalJavaCacheCompatibilityAsync( CacheProgramType interactiveType, CacheProgramType silentType, diff --git a/tests/CacheCompat/CommonCache.Test.Unit/CommonCache.Test.Unit.csproj b/tests/CacheCompat/CommonCache.Test.Unit/CommonCache.Test.Unit.csproj index 28f587f174..1b70dec7fe 100644 --- a/tests/CacheCompat/CommonCache.Test.Unit/CommonCache.Test.Unit.csproj +++ b/tests/CacheCompat/CommonCache.Test.Unit/CommonCache.Test.Unit.csproj @@ -9,7 +9,7 @@ - + @@ -23,15 +23,6 @@ - - false - - - false - - - false - false @@ -54,9 +45,6 @@ - - - diff --git a/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheProgramFactory.cs b/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheProgramFactory.cs index f8c93f0374..e492acc986 100644 --- a/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheProgramFactory.cs +++ b/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheProgramFactory.cs @@ -19,18 +19,6 @@ public static CacheProgram CreateCacheProgram(CacheProgramType cacheProgramType, switch (cacheProgramType) { - case CacheProgramType.AdalV3: - executablePath = Path.Combine(BaseExecutablePath, "AdalV3", "CommonCache.Test.AdalV3.exe"); - resultsFilePath = Path.Combine(CommonCacheTestUtils.CacheFileDirectory, "adalv3results.json"); - break; - case CacheProgramType.AdalV4: - executablePath = Path.Combine(BaseExecutablePath, "AdalV4", "CommonCache.Test.AdalV4.exe"); - resultsFilePath = Path.Combine(CommonCacheTestUtils.CacheFileDirectory, "adalv4results.json"); - break; - case CacheProgramType.AdalV5: - executablePath = Path.Combine(BaseExecutablePath, "AdalV5", "CommonCache.Test.AdalV5.exe"); - resultsFilePath = Path.Combine(CommonCacheTestUtils.CacheFileDirectory, "adalv5results.json"); - break; case CacheProgramType.MsalV2: executablePath = Path.Combine(BaseExecutablePath, "MsalV2", "CommonCache.Test.MsalV2.exe"); resultsFilePath = Path.Combine(CommonCacheTestUtils.CacheFileDirectory, "msalv2results.json"); diff --git a/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheTestExecutor.cs b/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheTestExecutor.cs index 98ffae934e..ee29d8c5e2 100644 --- a/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheTestExecutor.cs +++ b/tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheTestExecutor.cs @@ -82,15 +82,6 @@ private async Task ExecuteCacheProgramAsync(CacheProgramType cacheProgramType, b private static void PrintCacheInfo() { - if (File.Exists(CommonCacheTestUtils.AdalV3CacheFilePath)) - { - Console.WriteLine($"Adal Cache Exists at: {CommonCacheTestUtils.AdalV3CacheFilePath}"); - Console.WriteLine("Adal Cache Size: " + Convert.ToInt32(new FileInfo(CommonCacheTestUtils.AdalV3CacheFilePath).Length)); - } - else - { - Console.WriteLine($"Adal Cache DOES NOT EXIST at: {CommonCacheTestUtils.AdalV3CacheFilePath}"); - } if (File.Exists(CommonCacheTestUtils.MsalV2CacheFilePath)) { diff --git a/tests/Microsoft.Identity.Test.Common/TestConstants.cs b/tests/Microsoft.Identity.Test.Common/TestConstants.cs index 8eb158e070..30feee147d 100644 --- a/tests/Microsoft.Identity.Test.Common/TestConstants.cs +++ b/tests/Microsoft.Identity.Test.Common/TestConstants.cs @@ -32,7 +32,9 @@ public static HashSet s_scope public static readonly string[] s_graphScopes = new[] { "user.read" }; public const uint JwtToAadLifetimeInSeconds = 60 * 10; // Ten minutes public const string ClientCredentialAudience = "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0"; - public const string AutomationTestCertName = "AzureADIdentityDivisionTestAgentCert"; + public const string AutomationTestCertName = "LabVaultAccessCert"; + public static Dictionary AdditionalAssertionClaims => + new Dictionary() { { "Key1", "Val1" }, { "Key2", "Val2" } }; public static readonly SortedSet s_scopeForAnotherResource = new SortedSet(new[] { "r2/scope1", "r2/scope2" }, StringComparer.OrdinalIgnoreCase); public static readonly SortedSet s_cacheMissScope = new SortedSet(new[] { "r3/scope1", "r3/scope2" }, StringComparer.OrdinalIgnoreCase); @@ -226,7 +228,7 @@ public static IDictionary ExtraQueryParameters public const string MsalCCAKeyVaultUri = "https://buildautomation.vault.azure.net/secrets/AzureADIdentityDivisionTestAgentSecret/"; - public const string MsalCCAKeyVaultSecretName = "AzureADIdentityDivisionTestAgentSecret"; + public const string MsalCCAKeyVaultSecretName = "MSIDLABAccessSecret"; public const string MsalOBOKeyVaultUri = "https://buildautomation.vault.azure.net/secrets/IdentityDivisionDotNetOBOServiceSecret/"; public const string MsalOBOKeyVaultSecretName = "IdentityDivisionDotNetOBOServiceSecret"; public const string MsalArlingtonOBOKeyVaultUri = "https://msidlabs.vault.azure.net:443/secrets/ARLMSIDLAB1-IDLASBS-App-CC-Secret"; diff --git a/tests/Microsoft.Identity.Test.Core.UIAutomation/CoreUiTestConstants.cs b/tests/Microsoft.Identity.Test.Core.UIAutomation/CoreUiTestConstants.cs index 94a466b571..1f372799aa 100644 --- a/tests/Microsoft.Identity.Test.Core.UIAutomation/CoreUiTestConstants.cs +++ b/tests/Microsoft.Identity.Test.Core.UIAutomation/CoreUiTestConstants.cs @@ -70,6 +70,8 @@ public static class CoreUiTestConstants public const string ConsentAcceptId = "idBtn_Accept"; public const string PasswordInput = "password"; public const string AlternativePasswordInput = "Passwd"; + public const string NextButton = "nextButton"; + public const string OtherTile = "otherTile"; // ADFSv2 fields public const string AdfsV2WebUsernameInputId = "ContentPlaceHolder1_UsernameTextBox"; diff --git a/tests/Microsoft.Identity.Test.Integration.Win8/BrokerOnWin8Tests.cs b/tests/Microsoft.Identity.Test.Integration.Win8/BrokerOnWin8Tests.cs deleted file mode 100644 index fd4e3bb87f..0000000000 --- a/tests/Microsoft.Identity.Test.Integration.Win8/BrokerOnWin8Tests.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.Identity.Client; -#if !NET6_WIN -using Microsoft.Identity.Client.Broker; -#endif -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Identity.Test.Integration.Win8 -{ - [TestClass] - public class BrokerOnWin8Tests - { - [TestMethod] - public void WamOnWin8() - { - var pcaBuilder = PublicClientApplicationBuilder - .Create("d3adb33f-c0de-ed0c-c0de-deadb33fc0d3"); -#if !NET6_WIN - pcaBuilder = pcaBuilder.WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows) { Title = "Only Windows" }); -#endif - - Assert.IsFalse(pcaBuilder.IsBrokerAvailable()); - } - } -} diff --git a/tests/Microsoft.Identity.Test.Integration.Win8/DeviceAuthenticationTests.cs b/tests/Microsoft.Identity.Test.Integration.Win8/DeviceAuthenticationTests.cs deleted file mode 100644 index e13c4bfe87..0000000000 --- a/tests/Microsoft.Identity.Test.Integration.Win8/DeviceAuthenticationTests.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Linq; -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Identity.Client; -using Microsoft.Identity.Client.PlatformsCommon.Shared; -using Microsoft.Identity.Test.Common; -using Microsoft.Identity.Test.LabInfrastructure; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Identity.Test.Integration.Win8 -{ - [TestClass] - public class DeviceAuthenticationTests - { - private const string _claims = "{\"access_token\":{\"deviceid\":{\"essential\":true}}}"; - private const string _deviceAuthuser = "idlabca@msidlab8.onmicrosoft.com"; - - [TestMethod] - public async Task PKeyAuthNonInteractiveTestAsync() - { - //Arrange - var labResponse = await LabUserHelper.GetSpecificUserAsync(_deviceAuthuser).ConfigureAwait(false); - var factory = new HttpSnifferClientFactory(); - var msalPublicClient = PublicClientApplicationBuilder - .Create(labResponse.App.AppId) - .WithAuthority("https://login.microsoftonline.com/organizations/") - .WithHttpClientFactory(factory) - .Build(); - - //Act - var authResult = msalPublicClient.AcquireTokenByUsernamePassword( - new[] { "user.read" }, - labResponse.User.Upn, - labResponse.User.GetOrFetchPassword()) - .WithClaims(_claims) - .ExecuteAsync(CancellationToken.None).Result; - - //Assert - Assert.IsNotNull(authResult); - Assert.IsNotNull(authResult.AccessToken); - Assert.IsNotNull(authResult.IdToken); - Assert.IsTrue(string.Equals(_deviceAuthuser, authResult.Account.Username, StringComparison.InvariantCultureIgnoreCase)); - - //Assert that the PKeyAuth header is used and the token response is successful - var (req, res) = factory.RequestsAndResponses - .Where(x => x.Item1.Headers.Authorization != null - && x.Item1.Headers.Authorization.Scheme.Contains(PKeyAuthConstants.PKeyAuthName) - && x.Item2.StatusCode == HttpStatusCode.OK).FirstOrDefault(); - - Assert.IsNotNull(req); - Assert.IsNotNull(res); - } - } -} diff --git a/tests/Microsoft.Identity.Test.Integration.Win8/Microsoft.Identity.Test.Integration.Win8.csproj b/tests/Microsoft.Identity.Test.Integration.Win8/Microsoft.Identity.Test.Integration.Win8.csproj deleted file mode 100644 index 06f994f2b2..0000000000 --- a/tests/Microsoft.Identity.Test.Integration.Win8/Microsoft.Identity.Test.Integration.Win8.csproj +++ /dev/null @@ -1,46 +0,0 @@ - - - - net48 - net6.0-windows10.0.17763.0 - - $(TargetFrameworkNetDesktop48);$(TargetFrameworkNetCore);$(TargetFrameworkNet6Win) - false - Debug;Release;Debug + MobileApps - - - - - {3433eb33-114a-4db7-bc57-14f17f55da3c} - Microsoft.Identity.Client - - - {A181778D-5917-41CE-AA5F-7DAAA7B7F5BB} - Microsoft.Identity.Test.LabInfrastructure - - - - - - - - - - - - - - - - - - - - $(DefineConstants);DESKTOP - - - $(DefineConstants);NET6_WIN - - - diff --git a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/ClientCredentialsTests.cs b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/ClientCredentialsTests.cs index 28be1550fb..392fd2f7da 100644 --- a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/ClientCredentialsTests.cs +++ b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/ClientCredentialsTests.cs @@ -37,7 +37,7 @@ public class ClientCredentialsTests { private static readonly string[] s_scopes = { "User.Read" }; private static readonly string[] s_keyvaultScope = { "https://vault.azure.net/.default" }; - private const string PublicCloudConfidentialClientID = "16dab2ba-145d-4b1b-8569-bf4b9aed4dc8"; + private const string PublicCloudConfidentialClientID = "f62c5ae3-bf3a-4af5-afa8-a68b800396e9"; private const string PublicCloudTestAuthority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47"; private enum CredentialType diff --git a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/GenericAuthorityTests.cs b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/GenericAuthorityTests.cs index d5dc64c3a8..129631dc33 100644 --- a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/GenericAuthorityTests.cs +++ b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/GenericAuthorityTests.cs @@ -65,6 +65,7 @@ public async Task BadSecret_Duende_Async() /// Based on the publicly available https://demo.duendesoftware.com/ [RunOn(TargetFrameworks.NetCore | TargetFrameworks.NetFx)] + [Ignore("Test is not running reliably")] public async Task ShouldSupportClientCredentialsPrivateKeyJwtWithDuendeDemoInstanceAsync() { var applicationConfiguration = new ApplicationConfiguration(MsalClientType.ConfidentialClient); diff --git a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/PoPTests.cs b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/PoPTests.cs index 7602a3d0c0..561d1cb971 100644 --- a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/PoPTests.cs +++ b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/PoPTests.cs @@ -49,7 +49,7 @@ public class PoPTests private static readonly string[] s_keyvaultScope = { "https://vault.azure.net/.default" }; - private const string PublicCloudConfidentialClientID = "16dab2ba-145d-4b1b-8569-bf4b9aed4dc8"; + private const string PublicCloudConfidentialClientID = "f62c5ae3-bf3a-4af5-afa8-a68b800396e9"; private const string PublicCloudTestAuthority = "https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47"; private const string ProtectedUrl = "https://www.contoso.com/path1/path2?queryParam1=a&queryParam2=b"; private static string s_publicCloudCcaSecret; diff --git a/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs b/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs index 345b1e4e49..ea6a5abcb9 100644 --- a/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs +++ b/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs @@ -37,7 +37,7 @@ public class ConfidentialAppSettings { private class PublicCloudConfidentialAppSettings : IConfidentialAppSettings { - public string ClientId => UseAppIdUri? "https://microsoft.onmicrosoft.com/aa3e634f-58b3-4eb7-b4ed-244c44c29c47" : "16dab2ba-145d-4b1b-8569-bf4b9aed4dc8"; + public string ClientId => UseAppIdUri? "https://request.msidlab.com" : "f62c5ae3-bf3a-4af5-afa8-a68b800396e9"; public string TenantId => "72f988bf-86f1-41af-91ab-2d7cd011db47"; @@ -103,7 +103,7 @@ public string GetSecret() private class PpeConfidentialAppSettings : IConfidentialAppSettings { - public string ClientId => UseAppIdUri? "api://microsoft.identity.9793041b-9078-4942-b1d2-babdc472cc0c" : "9793041b-9078-4942-b1d2-babdc472cc0c"; + public string ClientId => UseAppIdUri ? "api://microsoft.identity.9793041b-9078-4942-b1d2-babdc472cc0c" : "1e999007-0c4f-4242-9ca1-8e33397236a9"; public string TenantId => "19eea2f8-e17a-470f-954d-d897c47f311c"; diff --git a/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/SeleniumExtensions.cs b/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/SeleniumExtensions.cs index 1929f83624..34c1caa557 100644 --- a/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/SeleniumExtensions.cs +++ b/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/SeleniumExtensions.cs @@ -30,7 +30,7 @@ public static IWebDriver CreateDefaultWebDriver() // ~2x faster, no visual rendering // remove when debugging to see the UI automation - //options.AddArguments("headless"); + options.AddArguments("headless"); var env = Environment.GetEnvironmentVariable("EDGEWEBDRIVER"); if (string.IsNullOrEmpty(env)) @@ -43,8 +43,16 @@ public static IWebDriver CreateDefaultWebDriver() } driver.Manage().Timeouts().ImplicitWait = ImplicitTimespan; - driver.Manage().Window.Maximize(); + try + { + driver.Manage().Window.Maximize(); + } + catch (WebDriverException e) + { + Trace.WriteLine("Failed to maximize the window: " + e.Message); + } + return driver; } @@ -62,7 +70,7 @@ public static void SaveScreenshot(this IWebDriver driver, TestContext testContex #endif Trace.WriteLine($"Saving picture to {failurePicturePath}"); - ss.SaveAsFile(failurePicturePath, ScreenshotImageFormat.Png); + ss.SaveAsFile(failurePicturePath); #if DESKTOP // Can't attach a file to the logs on netcore because mstest doesn't support it testContext.AddResultFile(failurePicturePath); @@ -180,13 +188,32 @@ public static void PerformLogin(this IWebDriver driver, LabUser user, Prompt pro { UserInformationFieldIds fields = new UserInformationFieldIds(user); + HandlePrompt(driver, "otherTile"); EnterUsername(driver, user, withLoginHint, adfsOnly, fields); + HandlePrompt(driver, CoreUiTestConstants.NextButton); EnterPassword(driver, user, fields); HandleConsent(driver, user, fields, prompt); HandleStaySignedIn(driver); } + private static void HandlePrompt(IWebDriver driver, string id) + { + try + { + Trace.WriteLine("Finding next prompt"); + var nextBtn = driver.WaitForElementToBeVisibleAndEnabled( + ByIds(id), + waitTime: ShortExplicitTimespan, + ignoreFailures: true); + nextBtn?.Click(); + } + catch + { + Trace.WriteLine($"{id} not found. Moving on."); + } + } + private static void HandleStaySignedIn(IWebDriver driver) { try diff --git a/tests/Microsoft.Identity.Test.LabInfrastructure/LabAuthenticationHelper.cs b/tests/Microsoft.Identity.Test.LabInfrastructure/LabAuthenticationHelper.cs index a4fec75848..4e0955a325 100644 --- a/tests/Microsoft.Identity.Test.LabInfrastructure/LabAuthenticationHelper.cs +++ b/tests/Microsoft.Identity.Test.LabInfrastructure/LabAuthenticationHelper.cs @@ -15,7 +15,7 @@ namespace Microsoft.Identity.Test.LabInfrastructure { public static class LabAuthenticationHelper { - private const string LabAccessConfidentialClientId = "16dab2ba-145d-4b1b-8569-bf4b9aed4dc8"; + private const string LabAccessConfidentialClientId = "f62c5ae3-bf3a-4af5-afa8-a68b800396e9"; private const string LabAccessPublicClientId = "3c1e0e0d-b742-45ba-a35e-01c664e14b16"; private static LabAccessAuthenticationType s_defaultAuthType = LabAccessAuthenticationType.ClientCertificate; private static string s_secret; diff --git a/tests/Microsoft.Identity.Test.Performance/Microsoft.Identity.Test.Performance.csproj b/tests/Microsoft.Identity.Test.Performance/Microsoft.Identity.Test.Performance.csproj index 5ac496805a..69b5bcddac 100644 --- a/tests/Microsoft.Identity.Test.Performance/Microsoft.Identity.Test.Performance.csproj +++ b/tests/Microsoft.Identity.Test.Performance/Microsoft.Identity.Test.Performance.csproj @@ -31,7 +31,7 @@ - + diff --git a/tests/devapps/Intune-xamarin-Android/EnrollmentNotificationReceiver.cs b/tests/devapps/Intune-xamarin-Android/EnrollmentNotificationReceiver.cs deleted file mode 100644 index 47261668ac..0000000000 --- a/tests/devapps/Intune-xamarin-Android/EnrollmentNotificationReceiver.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Android.Runtime; -using Microsoft.Intune.Mam.Client.Notification; -using Microsoft.Intune.Mam.Policy; -using Microsoft.Intune.Mam.Policy.Notification; - -namespace Intune_xamarin_Android -{ - /// - /// Receives enrollment notifications from the Intune service and performs the corresponding action for the enrollment result. - /// See: https://docs.microsoft.com/en-us/intune/app-sdk-android#mamnotificationreceiver - /// - class EnrollmentNotificationReceiver : Java.Lang.Object, IMAMNotificationReceiver - { - /// - /// When using the MAM-WE APIs found in IMAMEnrollManager, your app wil receive - /// IMAMEnrollmentNotifications back to signal the result of your calls. - /// When enrollment is successful, this will signal that app has been registered and it can proceed ahead. - /// - /// The notification that was received. - /// - /// The receiver should return true if it handled the notification without error(or if it decided to ignore the notification). - /// If the receiver tried to take some action in response to the notification but failed to complete that action it should return false. - /// - public bool OnReceive(IMAMNotification notification) - { - if (notification.Type == MAMNotificationType.MamEnrollmentResult) - { - IMAMEnrollmentNotification enrollmentNotification = notification.JavaCast(); - MAMEnrollmentManagerResult result = enrollmentNotification.EnrollmentResult; - - if (result.Equals(MAMEnrollmentManagerResult.EnrollmentSucceeded)) - { - // this signals that MAM registration is complete and the app can proceed - IntuneSampleApp.MAMRegsiteredEvent.Set(); - } - } - - return true; - } - } -} diff --git a/tests/devapps/Intune-xamarin-Android/Intune-xamarin-Android.csproj b/tests/devapps/Intune-xamarin-Android/Intune-xamarin-Android.csproj deleted file mode 100644 index de5192f08e..0000000000 --- a/tests/devapps/Intune-xamarin-Android/Intune-xamarin-Android.csproj +++ /dev/null @@ -1,180 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {C6CA2F00-E48A-478F-ABC3-1FE3FE20286B} - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {84dd83c5-0fe3-4294-9419-09e7c8ba324f} - Library - Properties - Intune_xamarin_Android - Intune-xamarin-Android - 512 - True - True - Resources\Resource.designer.cs - Resource - Off - false - v11.0 - Properties\AndroidManifest.xml - Resources - Assets - true - true - Xamarin.Android.Net.AndroidClientHandler - - - True - portable - False - bin\Debug\ - DEBUG;TRACE - prompt - 4 - True - None - true - true - true - true - false - - - True - portable - True - bin\Release\ - TRACE - prompt - 4 - true - False - SdkOnly - True - - - true - bin\Debug + MobileApps\ - DEBUG;TRACE - portable - AnyCPU - Off - 8.0 - prompt - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3.0.4635.1 - - - 28.0.0.3 - - - - - 28.0.0.3 - - - 28.0.0.3 - - - 1.1.2 - - - 28.0.0.3 - - - - 28.0.0.3 - - - 28.0.0.3 - - - 28.0.0.3 - - - 28.0.0.3 - - - - - - - - - - {60117a9b-4bb8-472e-bfff-52cbf67ca95a} - Microsoft.Identity.Client - - - - - \ No newline at end of file diff --git a/tests/devapps/Intune-xamarin-Android/IntuneSampleApp.cs b/tests/devapps/Intune-xamarin-Android/IntuneSampleApp.cs deleted file mode 100644 index 8aa1136761..0000000000 --- a/tests/devapps/Intune-xamarin-Android/IntuneSampleApp.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using Android.App; -using Android.Content; -using Android.OS; -using Android.Runtime; -using Android.Views; -using Android.Widget; -using Microsoft.Intune.Mam.Client.App; -using Microsoft.Intune.Mam.Client.Notification; -using Microsoft.Intune.Mam.Policy; -using Microsoft.Intune.Mam.Policy.Notification; - -namespace Intune_xamarin_Android -{ -#if DEBUG - /// - /// Due to an issue with debugging the Xamarin bound MAM SDK the Debuggable = false attribute must be added to the Application in order to enable debugging. - /// Without this attribute the application will crash when launched in Debug mode. Additional investigation is being performed to identify the root cause. - /// - [Application(Debuggable = false)] -#else - [Application] -#endif - class IntuneSampleApp : MAMApplication - { - // This event coordinates between different callbacks - internal static ManualResetEvent MAMRegsiteredEvent { get; } = new ManualResetEvent(false); - public IntuneSampleApp(IntPtr handle, Android.Runtime.JniHandleOwnership transfer) - : base(handle, transfer) { } - - public override void OnMAMCreate() - { - // as per Intune SDK doc, callback registration must be done here. - // https://docs.microsoft.com/en-us/mem/intune/developer/app-sdk-android - IMAMEnrollmentManager mgr = MAMComponents.Get(); - mgr.RegisterAuthenticationCallback(new MAMWEAuthCallback()); - - // Register the notification receivers to receive MAM notifications. - // Along with other, this will receive notification that the device has been enrolled. - IMAMNotificationReceiverRegistry registry = MAMComponents.Get(); - registry.RegisterReceiver(new EnrollmentNotificationReceiver(), MAMNotificationType.MamEnrollmentResult); - - base.OnMAMCreate(); - } - } -} diff --git a/tests/devapps/Intune-xamarin-Android/MAMWEAuthCallback.cs b/tests/devapps/Intune-xamarin-Android/MAMWEAuthCallback.cs deleted file mode 100644 index 86c858a80e..0000000000 --- a/tests/devapps/Intune-xamarin-Android/MAMWEAuthCallback.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using Android.App; -using Android.Content; -using Android.OS; -using Android.Runtime; -using Android.Views; -using Android.Widget; -using Microsoft.Intune.Mam.Policy; - -namespace Intune_xamarin_Android -{ - /// - /// Required by the MAM SDK. A token may be needed very early in the app lifecycle so the ideal - /// place to register the callback is in the OnMAMCreate() method of the app's implementation - /// of IMAMApplication. - /// See https://docs.microsoft.com/en-us/intune/app-sdk-android#account-authentication - /// - class MAMWEAuthCallback : Java.Lang.Object, IMAMServiceAuthenticationCallback - { - /// - /// MAM expects that this method performs silent authentication for the give resourceID - /// Note. This resource is not the same one from the App. The resource is api for MAM service. - /// - /// UPN of the user - /// Active directory ID - /// ID of the resource. - /// Access token - public string AcquireToken(string upn, string aadId, string resourceId) - { - string ret = null; - try - { - // append with /.default - string[] scopes = new string[] { resourceId + "/.default" }; - - // do the silent authentication for the resource - var authresult = PCAWrapper.Instance.DoSilentAsync(scopes).GetAwaiter().GetResult(); - ret = authresult?.AccessToken; - } - catch (Exception ex) - { - // write the exception and return null - System.Diagnostics.Debug.WriteLine(ex.Message); - } - - return ret; - } - } -} diff --git a/tests/devapps/Intune-xamarin-Android/MainActivity.cs b/tests/devapps/Intune-xamarin-Android/MainActivity.cs deleted file mode 100644 index 4738bb0fe6..0000000000 --- a/tests/devapps/Intune-xamarin-Android/MainActivity.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Android.App; -using Android.OS; -using Android.Runtime; -using AndroidX.AppCompat.Widget; -using AndroidX.AppCompat.App; -using Microsoft.Identity.Client; -using Android.Content; -using Microsoft.Intune.Mam.Policy; -using Microsoft.Intune.Mam.Client.App; -using System.Threading.Tasks; - -namespace Intune_xamarin_Android -{ - [Activity(Label = "@string/app_name", Theme = "@style/AppTheme.NoActionBar", MainLauncher = true)] - public class MainActivity : AppCompatActivity - { - /// - /// The scopes that are protected by conditional access - /// - internal static string[] Scopes = { "api://a8bf4bd3-c92d-44d0-8307-9753d975c21e/Hello.World" }; // TODO - change scopes are per your enterprise app - - protected override void OnCreate(Bundle savedInstanceState) - { - base.OnCreate(savedInstanceState); - Xamarin.Essentials.Platform.Init(this, savedInstanceState); - SetContentView(Resource.Layout.activity_main); - - Toolbar toolbar = FindViewById(Resource.Id.toolbar); - SetSupportActionBar(toolbar); - - Android.Widget.Button actButton = FindViewById(Resource.Id.acqToken); - actButton.Click += ActButton_Click; - - Android.Widget.Button signOutButton = FindViewById(Resource.Id.signOut); - signOutButton.Click += SignOutButton_Click; - } - - /// - /// This method shows calling pattern to access resource protected by Conditional Access with App Protection Policy - /// - /// Sender button - /// arguments - private async void ActButton_Click(object sender, EventArgs e) - { - AuthenticationResult result = null; - - try - { - // attempt silent login. - // If this is very first time and the device is not enrolled, it will throw MsalUiRequiredException - // If the device is enrolled, this will succeed. - result = await PCAWrapper.Instance.DoSilentAsync(Scopes).ConfigureAwait(false); - - _ = await ShowMessage("Silent 1", result.AccessToken).ConfigureAwait(false); - } - catch (MsalUiRequiredException ) - { - try - { - // This executes UI interaction - result = await PCAWrapper.Instance.DoInteractiveAsync(Scopes, this).ConfigureAwait(false); - - _ = await ShowMessage("Interactive 1", result.AccessToken).ConfigureAwait(false); - } - catch (IntuneAppProtectionPolicyRequiredException exProtection) - { - // if the scope requires App Protection Policy, IntuneAppProtectionPolicyRequiredException is thrown. - // Perform registration operation here and then do the silent token acquisition - _ = await DoMAMRegister(exProtection).ContinueWith(async (s) => - { - try - { - // Now the device is registered, perform silent token acquisition - result = await PCAWrapper.Instance.DoSilentAsync(Scopes).ConfigureAwait(false); - - _ = await ShowMessage("Silent 2", result.AccessToken).ConfigureAwait(false) ; - } - catch (Exception ex) - { - _ = await ShowMessage("Exception 1", ex.Message).ConfigureAwait(false); - } - }).ConfigureAwait(false); - } - } - catch (Exception ex) - { - _ = await ShowMessage("Exception 2", ex.Message).ConfigureAwait(false); - } - } - - private async void SignOutButton_Click(object sender, EventArgs e) - { - // Even after the signout, broker may retain the token - await PCAWrapper.Instance.SignOut().ConfigureAwait(false); - } - - /// - /// Perform registration with MAM - /// - /// - /// - private async Task DoMAMRegister(IntuneAppProtectionPolicyRequiredException exProtection) - { - // reset the registered event - IntuneSampleApp.MAMRegsiteredEvent.Reset(); - - // Invoke compliance API on a different thread - await Task.Run(() => - { - IMAMComplianceManager mgr = MAMComponents.Get(); - mgr.RemediateCompliance(exProtection.Upn, exProtection.AccountUserId, exProtection.TenantId, exProtection.AuthorityUrl, false); - }).ConfigureAwait(false); - - // wait till the registration completes - // Note: This is a sample app for MSAL.NET. Scenarios such as what if enrollment fails or user chooses not to enroll will be as - // per the business requirements of the app and not considered in the sample app. - IntuneSampleApp.MAMRegsiteredEvent.WaitOne(); - } - - private Task ShowMessage(string title, string message) - { - TaskCompletionSource tcs = new TaskCompletionSource(); - - RunOnUiThread(() => - { - - var builder = new Android.App.AlertDialog.Builder(this); - builder.SetTitle(title); - builder.SetMessage(message); - builder.SetNeutralButton("OK", (s, e) => { tcs.SetResult(true); }); - - var alertDialog = builder.Show(); - alertDialog.Show(); - }); - return tcs.Task; - } - - public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) - { - Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); - - base.OnRequestPermissionsResult(requestCode, permissions, grantResults); - } - - protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data) - { - base.OnActivityResult(requestCode, resultCode, data); - AuthenticationContinuationHelper.SetAuthenticationContinuationEventArgs(requestCode, resultCode, data); - } - } -} diff --git a/tests/devapps/Intune-xamarin-Android/PCAWrapper.cs b/tests/devapps/Intune-xamarin-Android/PCAWrapper.cs deleted file mode 100644 index f87a66a2ee..0000000000 --- a/tests/devapps/Intune-xamarin-Android/PCAWrapper.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Linq; -using System.Threading.Tasks; -using Android.App; -using Microsoft.Identity.Client; - -namespace Intune_xamarin_Android -{ - /// - /// This is a wrapper for PCA. It is singleton and can be utilized by both application and the MAM callback - /// - public class PCAWrapper - { - - /// - /// This is the singleton used by consumers - /// - static internal PCAWrapper Instance { get; } - - internal IPublicClientApplication PCA { get; } - - /// - /// The authority for the MSAL PublicClientApplication. Sign in will use this URL. - /// - private const string _authority = "https://login.microsoftonline.com/organizations"; - - // ClientID of the application in (msidlab4.com) - private static string _clientID = "bd9933c9-a825-4f9a-82a0-bbf23c9049fd"; // TODO - Replace with your client Id. And also replace in the AndroidManifest.xml - - // redirect URI for the application - private static string _redirectURI = $"msauth://com.sameerk.intune.test.xamarin/EHyvOdXj4uLXJXDaOMy5lwANmp0="; // TODO - Replace with your redirectURI - - // TenantID of the organization (msidlab4.com) - private static string _tenantID = "f645ad92-e38d-4d1a-b510-d1b09a74a8ca"; // TODO - Replace with your TenantID. And also replace in the AndroidManifest.xml - - static string[] clientCapabilities = { "ProtApp" }; // It is must to have these capabilities - - // private constructor for singleton - private PCAWrapper() - { - // Create PCA once. Make sure that all the config parameters below are passed - // ClientCapabilities - must have ProtApp - var builder = PublicClientApplicationBuilder - .Create(_clientID) - .WithAuthority(_authority) - .WithBroker() - .WithClientCapabilities(clientCapabilities) - .WithTenantId(_tenantID) - .WithRedirectUri(_redirectURI); - - PCA = builder.Build(); - } - - /// - /// Static constructor to instantiate PCA - /// - static PCAWrapper() - { - Instance = new PCAWrapper(); - } - - /// - /// Perform the interactive acquisition of the token for the given scope - /// - /// Scope - /// Parent window - /// - internal async Task DoInteractiveAsync(string[] scopes, Activity parentWindow) - { - return await PCA.AcquireTokenInteractive(scopes) - .WithParentActivityOrWindow(parentWindow) - .WithUseEmbeddedWebView(true) - .ExecuteAsync() - .ConfigureAwait(false); - } - - /// - /// Acquire the token silently - /// - /// scopes - /// Authentication result - internal async Task DoSilentAsync(string[] scopes) - { - if (PCA == null) - { - return null; - } - - var accts = await PCA.GetAccountsAsync().ConfigureAwait(false); - var acct = accts.FirstOrDefault(); - - var silentParamBuilder = PCA.AcquireTokenSilent(scopes, acct); - var authResult = await silentParamBuilder - .ExecuteAsync().ConfigureAwait(false); - return authResult; - - } - - /// - /// Signout may not perform the complete signout as company portal may hold - /// the token. - /// - /// - internal async Task SignOut() - { - var accounts = await PCA.GetAccountsAsync().ConfigureAwait(false); - while (accounts.Any()) - { - var acct = accounts.FirstOrDefault(); - await PCA.RemoveAsync(acct).ConfigureAwait(false); - accounts = await PCA.GetAccountsAsync().ConfigureAwait(false); - } - } - } -} diff --git a/tests/devapps/Intune-xamarin-Android/Properties/AndroidManifest.xml b/tests/devapps/Intune-xamarin-Android/Properties/AndroidManifest.xml deleted file mode 100644 index 3a3db564c6..0000000000 --- a/tests/devapps/Intune-xamarin-Android/Properties/AndroidManifest.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/devapps/Intune-xamarin-Android/Properties/AssemblyInfo.cs b/tests/devapps/Intune-xamarin-Android/Properties/AssemblyInfo.cs deleted file mode 100644 index 45ee820316..0000000000 --- a/tests/devapps/Intune-xamarin-Android/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Android.App; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Intune_xamarin_Android")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Intune_xamarin_Android")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/tests/devapps/Intune-xamarin-Android/Resources/AboutResources.txt b/tests/devapps/Intune-xamarin-Android/Resources/AboutResources.txt deleted file mode 100644 index f25399b99b..0000000000 --- a/tests/devapps/Intune-xamarin-Android/Resources/AboutResources.txt +++ /dev/null @@ -1,44 +0,0 @@ -Images, layout descriptions, binary blobs and string dictionaries can be included -in your application as resource files. Various Android APIs are designed to -operate on the resource IDs instead of dealing with images, strings or binary blobs -directly. - -For example, a sample Android app that contains a user interface layout (main.xml), -an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) -would keep its resources in the "Resources" directory of the application: - -Resources/ - drawable/ - icon.png - - layout/ - main.xml - - values/ - strings.xml - -In order to get the build system to recognize Android resources, set the build action to -"AndroidResource". The native Android APIs do not operate directly with filenames, but -instead operate on resource IDs. When you compile an Android application that uses resources, -the build system will package the resources for distribution and generate a class called "R" -(this is an Android convention) that contains the tokens for each one of the resources -included. For example, for the above Resources layout, this is what the R class would expose: - -public class R { - public class drawable { - public const int icon = 0x123; - } - - public class layout { - public const int main = 0x456; - } - - public class strings { - public const int first_string = 0xabc; - public const int second_string = 0xbcd; - } -} - -You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main -to reference the layout/main.xml file, or R.strings.first_string to reference the first -string in the dictionary file values/strings.xml. \ No newline at end of file diff --git a/tests/devapps/Intune-xamarin-Android/Resources/layout/activity_main.xml b/tests/devapps/Intune-xamarin-Android/Resources/layout/activity_main.xml deleted file mode 100644 index 064be4c811..0000000000 --- a/tests/devapps/Intune-xamarin-Android/Resources/layout/activity_main.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tests/devapps/Intune-xamarin-Android/Resources/layout/content_main.xml b/tests/devapps/Intune-xamarin-Android/Resources/layout/content_main.xml deleted file mode 100644 index da9a2cc144..0000000000 --- a/tests/devapps/Intune-xamarin-Android/Resources/layout/content_main.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - -