Skip to content
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

Does smart card redirection work? #924

Open
johnarnold opened this issue Oct 25, 2017 · 17 comments
Open

Does smart card redirection work? #924

johnarnold opened this issue Oct 25, 2017 · 17 comments

Comments

@johnarnold
Copy link

I need smart card redirection in order to use certificates for 2 factor auth.

This issue #471 talks about support for pcsc, but the issue is still "Open" and doesn't really say if it's working.

Does pcsc support work? How do I verify it's working?

thanks!

@jsorg71
Copy link
Contributor

jsorg71 commented Dec 7, 2017

#963 should be working now

@metalefty
Copy link
Member

@johnarnold can you test?

@jsorg71
Copy link
Contributor

jsorg71 commented Dec 13, 2017

To test
git clone --branch pcsc --recursive git://github.com/jsorg71/xrdp
Just build with no special configure options and compile and install.
get pcsc-tools installed if debian based. Not sure what EL package is called.
Connect with mstsc and smart card and run pcsc_scan in session or whatever you smart card app is.

@metalefty
Copy link
Member

If you test it soon, we can ship it to the next release in December.

@metalefty
Copy link
Member

Let's ship it to the next March release. Maybe cannot be well tested.

@jsorg71
Copy link
Contributor

jsorg71 commented Dec 20, 2017

it would be nice to get this in. I think this release(December) will be what goes in Ubuntu 18.04 LTS

@metalefty
Copy link
Member

Good point. I'll also test it.

@jsribeiro
Copy link

Testing the new code with Microsoft's RDP client (mstsc.exe), I can see the smart card reader on pcsc_scan and even identify the connected smart card:

On this gist you can find the output for two different cards, using the same reader.

The pcsc_scan utility hangs at the end of the shown output, and it's necessary to do a Ctrl-C or kill the process.

The opensc-tool -l tool (which should list the smart card reader and smart card) just hangs when executing.

I'm using CentOS on the server. By the way, the package which contains pcsc_scan is also called pcsc-tools (on the EPEL repository).

@jsribeiro
Copy link

By the way, using the old code (xrdp master branch), the behavior is similar with a few differences:

  • pcsc_scan doesn't hang after giving info on the smart cards (it cycles and reports future changes like card removal and insertion of different card);
  • opensc-tool -l doesn't hang and show correct card reader information (card reader name and card presence);
  • opensc-tool -n correctly identifies some cards (eg. "Cryptoflex 32K e-gate") but fails to identify others (eg. "Portuguese ID Card"), showing "Failed to connect to card: Internal error";

Summarizing, the old code wasn't working completely, but the new code seems to miss some of the things the old code was doing correctly.

Also, with the old code, the "Portuguese ID Card" application (QT app to use some card functionalities, link) can communicate with the card without apparent problems. With the new code, it doesn't even open (hangs at startup).

@jsorg71
Copy link
Contributor

jsorg71 commented Dec 22, 2017

Looks like issues, let's not hold off release. I can work on these issues and do another release later for just smart card improvements.

@johnarnold
Copy link
Author

Sorry I had to disappear for a bit. I'm back. What's next step?

@metalefty
Copy link
Member

Time's up for v0.9.5. We can make another release to be in time for Ubuntu 18.04 LTS.

@bolkedebruin
Copy link
Contributor

Has this been resolved yet?

@metalefty
Copy link
Member

Not yet.

@acharintsev
Copy link

Excuse me. Is there any release information with smart card redirection support? Maybe in 1.0.0? :-). In April ?

@bazcoIndustries
Copy link

bazcoIndustries commented Jul 31, 2022

My project has moved to a DevOps system that requires smart card authentication. I work in a Linux VM, so I'm interested in this capability. Looked at @jsorg71's fork which is now several version behind. Haven't had luck getting a GNOME session to start with his version--probably a configuration issue.

The changes make a lot of sense, in particular exposing a socket for pcsc. I can't find another workable solution to forwarding a smart card to a Linux VM at the moment. Any chance this could get merged into the mainline soon?

To the others: Have you found other solutions?

@matt335672
Copy link
Member

@bazcoIndustries - we've looked into this a few times in the past, but at the moment we don't have the architecture sorted out correctly, in a way which will give us a maintainable solution. @zorgluf has done some more work on this (see #1825) which may be of interest to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants