feat: windows implementation for smartcard auth - #797
Open
adithya-nominal wants to merge 66 commits into
Open
Conversation
… branch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rd/grpc Resolves conflict in _transport.py: keep full gRPC implementation from grpc branch while adopting TransportProvider base class and SmartcardTransportProvider name from smartcard_ssl_ctx rename. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Base automatically changed from
apatil/smartcard/grpc
to
apatil/smartcard/smartcard_ssl_ctx
June 2, 2026 15:29
…rd/windows Resolves conflicts by integrating the subclass refactoring from smartcard_ssl_ctx with the Windows implementation from this branch. _transport.py: replace the monolithic SmartcardTransportProvider (with if platform.system() branches throughout) with: - SmartcardTransportProvider — abstract base; shared gRPC caching - _Pkcs11SmartcardTransportProvider — Linux/macOS PKCS#11 path - _WindowsSmartcardTransportProvider — Windows CNG/Schannel path create() now dispatches to the right subclass so no platform checks remain inside any method body. Windows identity close() calls super() (signers) then closes the identity outside the lock. test_transport.py: PKCS11 tests instantiate _Pkcs11SmartcardTransportProvider directly; Windows test uses _WindowsSmartcardTransportProvider directly (no platform.system patch needed since platform check is only in create()). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adithya-nominal
force-pushed
the
apatil/smartcard/windows
branch
from
June 2, 2026 16:25
896562b to
f31161b
Compare
adithya-nominal
force-pushed
the
apatil/smartcard/windows
branch
from
June 8, 2026 21:06
8b28d01 to
389826a
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds Windows support to the nominal-smartcard package. This implementation leans on the native Windows certificate stack; a single client-auth certificate is selected once from CurrentUser\My and shared across every transport, so all connections present the same identity and PIN prompting is handled by the built-in Windows credential UI rather than a custom prompt.
HTTP requests flow through a WindowsCacAdapter that drives the .NET HttpClient over Schannel, while gRPC traffic uses a WindowsCngSigner. Certificate selection, the cert store wrapper, and the CNG signer are factored into focused modules (_windows_cert_store, _windows_cng_signer, _windows_cac) behind the existing SmartcardTransportProvider interface, so the rest of the client is unaffected.