-
Notifications
You must be signed in to change notification settings - Fork 408
Enforce mTLS PoP minimum binding strength for Managed Identity (#6049 Phase 2) #6059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c2e0f82
Enforce mTLS PoP minimum binding strength for managed identity (#6049…
Robbie-Microsoft 89c4cc7
Partition MI token cache by mTLS PoP MinStrength floor
Robbie-Microsoft 8b8596a
Merge branch 'main' into rginsburg/minstrength-enforcement
Robbie-Microsoft a6bb85e
Merge remote-tracking branch 'origin/main' into rginsburg/minstrength…
Robbie-Microsoft efb5198
Address PoP review: guard null builder; only partition MI cache key w…
Robbie-Microsoft 31eeff7
Merge remote-tracking branch 'origin/main' into rginsburg/minstrength…
Robbie-Microsoft 7846227
Merge origin/main into rginsburg/minstrength-enforcement
Robbie-Microsoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/client/Microsoft.Identity.Client/AppConfig/PoPOptions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Microsoft.Identity.Client.AppConfig | ||
| { | ||
| /// <summary> | ||
| /// Options that control mTLS Proof-of-Possession (PoP) token acquisition. This type is the | ||
| /// extensibility point for PoP-related knobs so future settings can be added without growing | ||
| /// the builder surface. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// This type is shared by managed identity and confidential client mTLS Proof-of-Possession | ||
| /// scenarios. | ||
| /// </remarks> | ||
| public class PoPOptions | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the minimum binding strength the host must be able to produce for the | ||
| /// request to succeed. This is a <b>floor assertion</b>, not a downgrade selector: MSAL | ||
| /// always uses the host's maximum binding strength, and the request fails when the host | ||
| /// cannot meet this floor. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The minimum required <see cref="MtlsBindingStrength"/>. The default is | ||
| /// <see cref="MtlsBindingStrength.None"/>, which imposes no floor and behaves identically | ||
| /// to the parameterless mTLS PoP request. When set to a value greater than | ||
| /// <see cref="MtlsBindingStrength.None"/>, the request fails with | ||
| /// <see cref="MsalError.MinStrengthNotMet"/> if the host's maximum binding strength is | ||
| /// lower than this value. | ||
| /// </value> | ||
| public MtlsBindingStrength MinStrength { get; set; } = MtlsBindingStrength.None; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.get -> Microsoft.Identity.Client.AppConfig.MtlsBindingStrength | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.set -> void | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.PoPOptions() -> void | ||
| const Microsoft.Identity.Client.MsalError.MinStrengthNotMet = "min_strength_not_met" -> string | ||
| static Microsoft.Identity.Client.ManagedIdentityPopExtensions.WithMtlsProofOfPossession(this Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder builder, Microsoft.Identity.Client.AppConfig.PoPOptions options) -> Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.get -> Microsoft.Identity.Client.AppConfig.MtlsBindingStrength | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.set -> void | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.PoPOptions() -> void | ||
| const Microsoft.Identity.Client.MsalError.MinStrengthNotMet = "min_strength_not_met" -> string | ||
| static Microsoft.Identity.Client.ManagedIdentityPopExtensions.WithMtlsProofOfPossession(this Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder builder, Microsoft.Identity.Client.AppConfig.PoPOptions options) -> Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.get -> Microsoft.Identity.Client.AppConfig.MtlsBindingStrength | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.set -> void | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.PoPOptions() -> void | ||
| const Microsoft.Identity.Client.MsalError.MinStrengthNotMet = "min_strength_not_met" -> string | ||
| static Microsoft.Identity.Client.ManagedIdentityPopExtensions.WithMtlsProofOfPossession(this Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder builder, Microsoft.Identity.Client.AppConfig.PoPOptions options) -> Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.get -> Microsoft.Identity.Client.AppConfig.MtlsBindingStrength | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.set -> void | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.PoPOptions() -> void | ||
| const Microsoft.Identity.Client.MsalError.MinStrengthNotMet = "min_strength_not_met" -> string | ||
| static Microsoft.Identity.Client.ManagedIdentityPopExtensions.WithMtlsProofOfPossession(this Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder builder, Microsoft.Identity.Client.AppConfig.PoPOptions options) -> Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.get -> Microsoft.Identity.Client.AppConfig.MtlsBindingStrength | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.set -> void | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.PoPOptions() -> void | ||
| const Microsoft.Identity.Client.MsalError.MinStrengthNotMet = "min_strength_not_met" -> string | ||
| static Microsoft.Identity.Client.ManagedIdentityPopExtensions.WithMtlsProofOfPossession(this Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder builder, Microsoft.Identity.Client.AppConfig.PoPOptions options) -> Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.get -> Microsoft.Identity.Client.AppConfig.MtlsBindingStrength | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.MinStrength.set -> void | ||
| Microsoft.Identity.Client.AppConfig.PoPOptions.PoPOptions() -> void | ||
| const Microsoft.Identity.Client.MsalError.MinStrengthNotMet = "min_strength_not_met" -> string | ||
| static Microsoft.Identity.Client.ManagedIdentityPopExtensions.WithMtlsProofOfPossession(this Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder builder, Microsoft.Identity.Client.AppConfig.PoPOptions options) -> Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.