Smartcard Authentication
Hello,
I am incredible interested in the smartcard authentication for OpenVPN. Can anyone suggest a USB Token to me that isn't that expansive. I need around 10 of them which are available in Europe. Is it possible to have some private keys on a smartcard and others on disk in a multi instance OpenVPN server? I guess so, but want to get sure.
Thomas
Hi Thomas,
two weeks ago, I purchased 10 Aladdin eToken Pro32K 10 Unit Starter pack for a total of 760 Euro. Afaik they should work for linux.
(I've 10 of them but I don't need all of them at the moment. Just visit me in my office on friday morning and I can handover you one or two for a test. :-) )
nice regards,
JK
--
Dipl. Inf. Jochen Kaiser, GPG 0x3C93A870, phone +49 9131 85-36205 IT-Sicherheitsbeauftragter (CISO) des Universitaetsklinikums Erlangen
Quoted 18 lines · Thomas Glanzmann
Hello,
I am incredible interested in the smartcard authentication for OpenVPN. Can anyone suggest a USB Token to me that isn't that expansive. I need around 10 of them which are available in Europe. Is it possible to have some private keys on a smartcard and others on disk in a multi instance OpenVPN server? I guess so, but want to get sure.Thomas
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Hello Jochen,
Quoted 2 lines
Just visit me in my office on friday morning and I can handover you one or two for a test. :-) )
thanks a lot for the offer. I used one of your tokens under Linux with openct and opensc/openct. Tomorrow I am going to do a few tests with Windows.
Linux:
apt-get install opensc openct ...
/etc/opensc/opensc.conf:
card_atr 3b:f2:18:00:02:c1:0a:31:fe:58:c8:09:75 {
driver = "cardos";
type = "1002";
}openssl genrsa -out key 1024
openssl req -new -key key -out tg.csr pkcs15-init -ECT
pkcs15-init -PT -a 1 -l etoken -v pkcs15-init -S key -a 1 -u sign,decrypt --split-key # Sign from CA
pkcs15-init -X tg-signed.crt -v -a 1
pkcs11-providers /usr/lib/opensc/opensc-pkcs11.so
pkcs11-slot-type "label"
pkcs11-slot "OpenSC Card (etoken)"
pkcs11-id-type "subject"
pkcs11-id "/C=DE/ST=Bayern/L=Erlangen/..."
I got ssh-agent also working. At the moment I am only able to use 1024 bit RSA keys under Linux. ssh-agent and openvpn doesn't work at the same time. :-( It seems that OpenVPN keeps the connection open and blocks ssh-agent from doing anything with the smart-card.
Thomas
Quoted 4 lines · On 5/21/07, [email protected]... <[email protected]...> wrote:
I got ssh-agent also working. At the moment I am only able to use 1024 bit RSA keys under Linux. ssh-agent and openvpn doesn't work at the same time. :-( It seems that OpenVPN keeps the connection open and blocks ssh-agent from doing anything with the smart-card.
How do you use with OpenSSH?
I recommend of using PKCS#11 as well.
http://alon.barlev.googlepages.com/openssh-pkcs11
I don't use OpenSC, but I heard that there is some kind of option that causes PKCS#11 to release the session. Something related to PIN caching?
Alon
Hello Alon,
Quoted 1 line
How do you use with OpenSSH?
I am using Debian etch. I typed in
apt-get source openssh
edited debian/rules and added "--with-opensc=/usr" after that I build new debian packages using "fakeroot debian/rules binary". I installed corresponding packages.
Note: It isn't enough to have a private/public key on the card. You also need a certificate. The certificate can be self signed. It doesn't matter. If there is _no_ certificate ssh-agent refuses to add it. Don't ask me why. Markus, can you answer that for me?
For instruction how to create private/public key and a certificate see my previous e-mail or this website[1].
(thinkpad) [~] ssh-add -D
All identities removed.
(thinkpad) [~] ssh-add -s 0
Enter passphrase for smartcard:
Card added: 0
(thinkpad) [~] ssh-add -l
1024 a6:a0:9e:0c:3f:c5:27:60:79:f2:50:ca:ca:10:3c:97 Private Key (RSA1) 1024 91:07:e6:b1:a4:7f:6f:d0:b7:97:c4:b8:c0:6f:e9:5a Private Key (RSA)
_Here comes the public key. The keypair I use for openvpn. You have to put it in .ssh/authorized_keys on the other site_
(thinkpad) [~] ssh-keygen -D 0
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCj13kaiKlxgaOj6XsQB0pQe3XNAWZNXb+Nj6kf+aFLyy8sSgpQmooBC3nhkPU4eNLQ+ZHxGSBUtaneqP0C3JtMx5DLrMjg0NojjmDPGOwTl937CAjRnel+hcmVrs55HptujOXA82gj+ViXjBYcPHBqjOHiA7DNUlxiC1SRPTu5FQ==
1024 65537 115053548544716581387034685161862422245654461095131101014844332373749621514179232504573875936357621036091464289506911398194046275185447859017491685242397147667407911709700759158625908774307490096542183425725948386664993491045011923061351158143484497663085429870663258139349906676909077246854338184602606876949 (thinkpad) [~] ssh faui02
Linux faui02 2.6.20.1 #1 SMP Thu Mar 1 03:03:58 CET 2007 i686
Welcome to the Computer Science CIP-Pool at FAU-Erlangen
If you have questions or need help, please look at our web-site located at: http://wwwcip.informatik.uni-erlangen.de/
By using this machine, you agree to our Acceptable-Use Policies:
http://wwwcip.informatik.uni-erlangen.de/pools/rules/
===============================================================================
You have new mail.
Last login: Mon May 21 00:55:03 2007 from thinkpad-wl.glanzmann.de sithglan has logged on pts/0 from mephisto.informatik.uni-erlangen.de sirasenn has logged on pts/1 from mephisto.informatik.uni-erlangen.de simigern has logged on pts/2 from mephisto.informatik.uni-erlangen.de snalwuer has logged on pts/3 from faui08.informatik.uni-erlangen.de sithglan has logged on pts/5 from thinkpad-wl.glanzmann.de hrschulz has logged on pts/12 from mephisto.informatik.uni-erlangen.de sirrwebe has logged on pts/14 from mephisto.informatik.uni-erlangen.de (faui02) [~]
Quoted 2 lines
I recommend of using PKCS#11 as well.
http://alon.barlev.googlepages.com/openssh-pkcs11
Actually from my point of view opensc is cleaner because it doesn't include using binary modules from aladdin. Also for ssh for example I need to use a third party patch. opensc support is in openssh for ages (since 2001).
Btw have to talked to Markus Friedel if your code does it make upstream?
Quoted 3 lines
I don't use OpenSC, but I heard that there is some kind of option that causes PKCS#11 to release the session. Something related to PIN caching?
Might be possible. Do you have an specifics or patch that I could try? Btw. I had a quick glance at the OpenVPN pkcs#11 Code Base and it is quite impressive at least in the lines of code. How long did it take you to develop them?
[1] http://lair.fifthhorseman.net/~dkg/egate/
Thomas
Quoted 4 lines · On 5/21/07, [email protected]... <[email protected]...> wrote:
Note: It isn't enough to have a private/public key on the card. You also need a certificate. The certificate can be self signed. It doesn't matter. If there is _no_ certificate ssh-agent refuses to add it. Don't ask me why. Markus, can you answer that for me?
Because you need to have a public object.
The same is for PKCS#11 patch.
Quoted 4 lines
Actually from my point of view opensc is cleaner because it doesn't include using binary modules from aladdin. Also for ssh for example I need to use a third party patch. opensc support is in openssh for ages (since 2001).
But what happens if you remove and insert your card? You should be prompted to enter your PIN again, and you don't - security flaw. What happen if you ssh and the card is missing? You should be prompted to insert your card... and it just fails.
Why can't you load all your identities into the agent without having your card in?
Why use none standard interface anyway?
But it is your choice... :)
I just make application standard. If they were you get a lot easier environment.
Quoted 1 line
Btw have to talked to Markus Friedel if your code does it make upstream?
I've talked with Damien Miller, but one day he just disappeared.
Quoted 5 lines
Quoted 3 lines
I don't use OpenSC, but I heard that there is some kind of option that causes PKCS#11 to release the session. Something related to PIN caching?
Might be possible. Do you have an specifics or patch that I could try?
This should be already built in... Just don't know where... I heard people solved this issue. This is incompatibility of OpenSC PKCS#11 provider, the PKCS#11 states that multiple application should be able to work at the same time.
Quoted 3 lines
Btw. I had a quick glance at the OpenVPN pkcs#11 Code Base and it is quite impressive at least in the lines of code. How long did it take you to develop them?
Well... it is generic and used by different projects, so I moved this to OpenSC project.
You can find some more utilities at:
http://alon.barlev.googlepages.com/open-source
Best Regards,
Alon Bar-Lev.
A message that is not in the archive (sent off-list or not yet received): [email protected]...
Quoted 5 lines · Thomas Glanzmann
Actually I don't consider PKCS#11 a standard interface. It's more like everyone puts its binary blob anywhere. Actually I think it's horrible by design. It's more like a "standard" interface to a binary blob that does something that isn't standard with the actual smartcard. From what I heard and read about PKCS#11 it is a mess.
This say it all.
It seems you don't understand what standard is.
And because of people with the same attitude we don't have a valid cryptography in open source.
I had this discussion over and over...
Everybody think he can do better, and we end up with unusable solutions.
A standard is a compromise between the best way to achieve a goal and the interest of several parties.
I guess you are aware that you use PKCS#1, PKCS#8, PKCS#7 PKCS#12, PKCS#10, all are not the best way to encode any format, but it makes application communicate correctly with each-other. PKCS#11 falls on the same category.
Because everybody think we knows better, we got to a state where the user must execute about 5 agents on his computer to use his smartcard (ssh-agent, gpg-agent, seahorse, gnutls and more). This is unacceptable, and proves that there is nothing close to standard.
Best Regards,
Alon Bar-Lev.
hi
Quoted 4 lines · Alon Bar-Lev
On 5/21/07, [email protected]... <[email protected]...> wrote:
How do you use with OpenSSH?
I recommend of using PKCS#11 as well.
http://alon.barlev.googlepages.com/openssh-pkcs11
also consider reading openvpn smartcard howto which has been posted here on the list short time ago:
http://michele.pupazzo.org/docs/smart-cards-openvpn.html
peter
Signature · 5 lines
:: e n d i a n :: open source - open minds :: peter warasin :: http://www.endian.com :: [email protected]...
You can mix software and hardware based in one installation. If you are going to use Linux, I recommend you use one of the OpenSC supported cards.
Quoted 19 lines · On 5/16/07, [email protected]... <[email protected]...> wrote:
Hello,
I am incredible interested in the smartcard authentication for OpenVPN. Can anyone suggest a USB Token to me that isn't that expansive. I need around 10 of them which are available in Europe. Is it possible to have some private keys on a smartcard and others on disk in a multi instance OpenVPN server? I guess so, but want to get sure.Thomas
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel