-
Couldn't load subscription status.
- Fork 378
[POC] Expose secure HTTP client factory and propagate binding certificate in authentication result #5535
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
base: main
Are you sure you want to change the base?
Conversation
| /// This interface is designed to support MTLS scenarios. | ||
| /// </remarks> | ||
| internal interface IMsalMtlsHttpClientFactory : IMsalHttpClientFactory | ||
| public interface IMsalMtlsHttpClientFactory : IMsalHttpClientFactory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gladjohn - don't we need this to be made public for MSIv2 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't need to expose this for MSI v2. We will continue to use the existing factory IMsalHttpClientFactory to make calls into IMDS endpoints, this will ensure we use custom factory. But for the mTLS calls to ESTS, we will use the new IMsalMtlsHttpClientFactory. MSAL will be responsible for calls to ESTS.
| /// .NET should use SocketHandler, but UseDefaultCredentials doesn't work with it | ||
| /// </remarks> | ||
| internal class SimpleHttpClientFactory : IMsalMtlsHttpClientFactory, IMsalSFHttpClientFactory | ||
| public class SecureHttpClientFactory : IMsalMtlsHttpClientFactory, IMsalSFHttpClientFactory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you make this public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly to reuse the logic to create HTTP client with setting up a certificate by Identity.Web but it can be also beneficial for users of MSAL.NET who wants either secure HTTP client factory (with mTLS or server certificate validation).
| /// <summary> | ||
| /// Internal factory responsible for creating HttpClient instances configured for mutual TLS (MTLS). | ||
| /// This factory is specifically intended for use within the MSAL library for secure communication with Azure AD using MTLS. | ||
| /// A factory responsible for creating HttpClient instances configured for mutual TLS (MTLS). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it an interface not an actual factory?
No description provided.