Add configurable certificate StoreLocation for certificate authentication#49
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: jefim <1387820+jefim@users.noreply.github.com>
Co-authored-by: jefim <1387820+jefim@users.noreply.github.com>
|
@copilot Ok, now need to bump the versions (I think this is a non-breaking change, so second version number bump) and add changelog entries to correct files. |
…feature Co-authored-by: jefim <1387820+jefim@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
…Http Co-authored-by: jefim <1387820+jefim@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: jefim <1387820+jefim@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: jefim <1387820+jefim@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Frends.HTTP.DownloadFile/Frends.HTTP.DownloadFile/Definitions/Options.cs
Outdated
Show resolved
Hide resolved
Frends.HTTP.RequestBytes/Frends.HTTP.RequestBytes/Definitions/Options.cs
Outdated
Show resolved
Hide resolved
Frends.HTTP.SendAndReceiveBytes/Frends.HTTP.SendAndReceiveBytes/Definitions/Options.cs
Outdated
Show resolved
Hide resolved
Frends.HTTP.SendBytes/Frends.HTTP.SendBytes/Definitions/Options.cs
Outdated
Show resolved
Hide resolved
MatteoDelOmbra
left a comment
There was a problem hiding this comment.
In general it looks good, just add those default values and cover new functionality with test in all tasks (test should prove at least sunny scenario for new store location option)
…ion-certificates' into copilot/add-storelocation-selection-certificates
We are currently testing on linux machine. Do we want to change that for those tests (cert store we support works on Windows only)?
|
MichalFrends1
left a comment
There was a problem hiding this comment.
Just fix one date in the changelog ;)
Summary: Add StoreLocation selection for certificate authentication
Problem
Users were unable to select which certificate store location to use when authenticating with certificates. The code was hardcoded to use
StoreLocation.CurrentUser, making it impossible to use certificates fromStoreLocation.LocalMachinewithout writing custom request code.Solution
Added a new configurable option
CertificateStoreLocationthat allows users to select betweenCurrentUserandLocalMachinewhen using certificate authentication from the certificate store.Changes Made:
CertificateStoreLocationenum with CurrentUser and LocalMachine options in all 5 HTTP modulesCertificateStoreLocationproperty to Options classes with default value ofCurrentUser(backward compatible)GetCertificatesFromStoremethods to accept and use the selected store locationVersion Updates:
Test Coverage Improvements:
Added new tests for:
Empty URL validation (throws ArgumentNullException)
CertificateStoreLocation.CurrentUser explicit test
CertificateStoreLocation.LocalMachine with non-existent thumbprint (throws exception)
Overwrite=false with existing file (throws exception)
Authorization header deduplication
WindowsAuthentication username validation
Certificate from file with/without keyPhrase
Certificate from string with keyPhrase
Null headers handling
Client caching behavior
Basic auth with empty headers
OAuth auth with empty headers
Fixes Would like to be able to select StoreLocation when using Certificate #39
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.