Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-18 01:03:09

jwoltman
New Member
Registered: 2008-06-18
Posts: 2

Integrating the Yubikey into TxP

I don’t if anyone here has heard of the Yubikey one-time-password generator (I heard about it on the Security Now podcast). I integrated it into TxP login interface – you would need to get the latest yubico-php-lib from http://code.google.com/p/yubico-php-lib/.

Then I modified texpattern/include/txp_auth.php to accept the Yubikey OTP. If you try it out you’ll probably have to modify paths and such, but it is working on my own site. The modified txp_auth.php is available at http://www.jwoltman.net/downloads/txp_auth.zip.

There’s more info about the Yubikey at http://www.yubico.com/

As an aside, you’ll also have to add a table to the database. The yubico-php-lib is rather alpha at this point.

Here’s the SQL to make the table:
CREATE TABLE `yubikeys` ( `username` varchar(32) NOT NULL, `yu_public_id` varchar(32) NOT NULL, `yu_private_id` varchar(64) NOT NULL, `yu_aes_key` varchar(128) NOT NULL, `yu_counter` int(11) default NULL, `yu_timestamp` int(11) default NULL, `yu_server_timestamp` int(11) default NULL, PRIMARY KEY (`username`)
);

Last edited by jwoltman (2008-06-18 01:08:11)

Offline

#2 2008-06-18 05:11:17

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Integrating the Yubikey into TxP

jwoltman

Hey, welcome to the forum.

I’ve not heard of YubiKey before — is it a portable keyfob type OTP? I’ve been thinking about integrating Steve Gibson’s PPP into txp myself for a possible project. I’ll look over your code as a pointer to how to do it.

Many thanks,


Steve

Offline

#3 2008-06-18 05:24:19

jwoltman
New Member
Registered: 2008-06-18
Posts: 2

Re: Integrating the Yubikey into TxP

Yes, it’s a neat little device that generates one-time-passwords. You plug it in a USB port and your computer sees it as a USB keyboard, so you don’t have any extra drivers to install. I’m working on some other uses, but I wanted TxP to be the first so I could use it on my own site.

Offline

#4 2008-06-18 13:51:19

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Integrating the Yubikey into TxP

jwoltman

That’s a very easy bit of integration thanks to the library routines.

Thanks again.


Steve

Offline

Board footer

Powered by FluxBB