Skip to content

Migrate OBO tests from old lab to ID4SLAB1#6021

Open
RyAuld wants to merge 5 commits into
mainfrom
ryauld/migrate-obo-tests-to-lab1
Open

Migrate OBO tests from old lab to ID4SLAB1#6021
RyAuld wants to merge 5 commits into
mainfrom
ryauld/migrate-obo-tests-to-lab1

Conversation

@RyAuld
Copy link
Copy Markdown
Contributor

@RyAuld RyAuld commented May 21, 2026

Summary

Migrates OBO integration tests from the old lab tenant app (23c64cd8) to the new ID4SLAB1 apps.

Changes

  • Switch OBO confidential client from client secret to LabAuth cert (msidlabs vault)
  • Replace AppWebApi with new AppOBOService (MSAL-APP-TodoListService-JSON) in ID4SLAB1
  • Add \KeyVaultSecrets.AppOBOService\ and \KeyVaultSecrets.AppOBOClient\ constants
  • Enable SN+I (sendX5C) for regional endpoint test
  • Remove commented-out old app ID references

Infrastructure (already done)

  • Created \MSAL-APP-TodoListService-JSON\ secret in id4skeyvault
  • Created \MSAL-APP-TodoListClient-JSON\ secret in id4skeyvault
  • Granted admin consent for AppS2S (54a2d933) to access_as_user scope on TodoListService (8837cde9)

Test Results

All 14 OBO tests pass locally (2 skipped by environment attribute).

- Switch OBO confidential client from client secret to LabAuth cert (msidlabs vault)
- Replace AppWebApi with new AppOBOService (MSAL-APP-TodoListService) in ID4SLAB1
- Add KeyVaultSecrets.AppOBOService and AppOBOClient constants
- Enable SN+I (sendX5C) for regional endpoint test
- Remove commented-out old app ID references

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 21, 2026 17:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates On-Behalf-Of (OBO) integration tests from the legacy lab tenant/app configuration to the newer ID4SLAB1 app registrations, including moving the confidential client auth for the OBO middle-tier from client secret to the LabAuth certificate.

Changes:

  • Update OBO integration tests to use KeyVaultSecrets.AppOBOService instead of the legacy AppWebApi configuration.
  • Switch OBO confidential client authentication from client secret to LabAuth certificate retrieved from the MSIDLab Key Vault.
  • Add new lab Key Vault secret-name constants (AppOBOService, AppOBOClient, and additional app constants) and update the public API baseline accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/Microsoft.Identity.Test.Integration.netcore/HeadlessTests/OnBehalfOfTests.cs Migrates OBO test app config to ID4SLAB1 and updates confidential client auth to use LabAuth certificate (plus sendX5C for regional case).
tests/Microsoft.Identity.Test.Integration.netcore/HeadlessTests/LongRunningOnBehalfOfTests.cs Migrates long-running OBO tests to ID4SLAB1 app config and switches confidential client auth to LabAuth certificate.
src/client/Microsoft.Identity.Lab.Api/LabInfra/KeyVaultSecrets.cs Introduces new Key Vault secret-name constants for ID4SLAB1 OBO apps and related test apps.
src/client/Microsoft.Identity.Lab.Api/PublicAPI.Unshipped.txt Updates public API baseline for newly added KeyVaultSecrets constants.

@RyAuld RyAuld marked this pull request as ready for review May 21, 2026 22:58
@RyAuld RyAuld requested a review from a team as a code owner May 21, 2026 22:58
Addresses Copilot review feedback: _keyVault (MsalTeam instance) is no
longer referenced after switching to _keyVaultMsidLab for LabAuth cert.
Removing to avoid CS0169 warning with TreatWarningsAsErrors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 21, 2026 23:20
@RyAuld RyAuld force-pushed the ryauld/migrate-obo-tests-to-lab1 branch from e782591 to 69656d5 Compare May 21, 2026 23:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

/// </summary>
public const string MsalAppAzureAdMultipleOrgsRegional = "MSAL-APP-AzureADMultipleOrgsRegional-JSON";
/// <summary>
/// Multiple orgs app in public cloud (id4slab1 tenant). Used for client credentials and regional token acquisition tests.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use "multi-tenant" app term.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved - that constant (MsalAppAzureAdMultipleOrgs) is now deleted

/// <summary>
/// Regional app in id4slab1 tenant with SN+I claims (xms_idrel, xms_ds_cnf). Used for regional ESTS token acquisition tests.
/// </summary>
public const string MsalAppRegion = "MSAL-App-Region-JSON";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are too many apps. Existing apps should be regional enabled. Pls do a replace existing apps, not an add.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved - removed MsalAppRegion and MsalAppAzureAdMultipleOrgs

/// <summary>
/// multiple orgs app in public cloud, with regional authority. Used for testing regional authority discovery and token acquisition in multi-tenant scenarios.
/// </summary>
public const string MsalAppAzureAdMultipleOrgsRegional = "MSAL-APP-AzureADMultipleOrgsRegional-JSON";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to have the terminlogy:

  • S2S
  • OBO client
  • OBO service

I don't see any reason for having more than 3 apps.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved - only AppS2S, AppOBOClient, AppOBOService remain as the new constants/Apps

Copy link
Copy Markdown
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many apps. But otherwise the changes look good.

@bgavrilMS
Copy link
Copy Markdown
Member

@Avery-Dunn pls review this.

RyAuld and others added 2 commits May 27, 2026 09:25
The regional test already uses AppOBOService (TodoListService) via
BuildCcaAsync, making these dedicated region app constants dead code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 27, 2026 17:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@RyAuld RyAuld requested a review from bgavrilMS May 27, 2026 19:28
@RyAuld RyAuld requested a review from Avery-Dunn May 27, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants