Sure.
yms logs:
2009-01-29 17:23:46: Check time? 1 by 10.20.0.29
2009-01-29 17:23:50: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29
2009-01-29 17:23:50: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29
2009-01-29 17:24:17: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29
2009-01-29 17:24:17: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29
2009-01-29 17:24:33: Check time? 1 by 10.20.0.29
2009-01-29 17:24:42: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29
2009-01-29 17:24:42: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29
2009-01-29 17:24:49: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29
2009-01-29 17:24:49: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29
2009-01-29 17:24:51: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29
2009-01-29 17:24:51: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29
2009-01-29 17:24:56: SELECT id, pin FROM admin WHERE keyid= by 10.20.0.29
2009-01-29 17:24:56: Invalid query -- SELECT id, pin FROM admin WHERE keyid= -- by 10.20.0.29
2009-01-29 17:31:57: Check time? 1 by 10.20.0.29
2009-01-29 17:32:04: SELECT id, pin FROM admin WHERE keyid=1 by 10.20.0.29
2009-01-29 17:32:26: # act=find_client, client=-1 by 10.20.0.29
2009-01-29 17:46:21: Del adm key 2 by 10.20.0.29
2009-01-29 17:46:28: Del adm key 2 by 10.20.0.29
2009-01-29 17:46:37: Del adm key 1 by 10.20.0.29
2009-01-29 17:46:38: Del adm key 1 by 10.20.0.29
2009-01-29 17:46:46: Del adm key 2 by 10.20.0.29
2009-01-29 17:47:35: idstr=ghjdhhecrhvd idtype=tokid by 10.20.0.29
2009-01-29 17:48:16: idstr=ghjdhhecrhvd idtype=tokid by 10.20.0.29
2009-01-29 17:49:05: Del adm key 2 by 10.20.0.29
2009-01-29 17:49:05: Invalid query -- UPDATE clients SET perm_id=2 WHERE id=1 -- by 10.20.0.29
2009-01-29 17:54:51: # act=find_client, client=-1 by 10.20.0.29
2009-01-29 21:51:01: Del adm key 1 by 10.20.0.30
2009-01-29 21:51:02: Del adm key 1 by 10.20.0.30
2009-01-29 21:55:19: Invalid query -- SELECT value FROM stats WHERE name='serial' -- by 10.20.0.30
2009-01-29 22:12:27: Invalid query -- SELECT value FROM yubikeys WHERE name='serial' -- by 10.20.0.30
Here are my notes from the installation of yms, my complete setup can be found at
http://www.mattiasholm.com/node/25 a work in progress.
The database setup script that is recomended by the documentation needs to be altered to fit the setup we got, they basically want to create the client, yubikeys and perms tables again, we dont..
SET character_set_client = utf8;
CREATE TABLE `admin` (
`id` int(10) unsigned NOT NULL auto_increment,
`keyid` int(11) NOT NULL default '0',
`note` varchar(45) default NULL,
`pin` varchar(120) default NULL,
`last_access` datetime default NULL,
`ip` varchar(45) default NULL,
`creation` datetime default NULL,
`client` int(11) NOT NULL default '0',
`timeout` int(10) unsigned NOT NULL default '3600',
PRIMARY KEY (`id`),
KEY `FK_admin_2` (`keyid`),
KEY `FK_admin_1` (`client`),
CONSTRAINT `FK_admin_1` FOREIGN KEY (`client`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_admin_2` FOREIGN KEY (`keyid`) REFERENCES `yubikeys` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1;
CREATE TABLE `buyers` (
`id` int(10) unsigned NOT NULL auto_increment,
`email` varchar(100) default NULL,
`created` datetime default NULL,
`addr` varchar(200) default NULL,
`qty` int(10) unsigned default NULL,
`client_id` int(11) NOT NULL default '0',
`name` varchar(45) default NULL,
PRIMARY KEY (`id`),
KEY `FK_client_id_1` USING BTREE (`client_id`),
CONSTRAINT `FK_client_info_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2201 DEFAULT CHARSET=latin1;
CREATE TABLE `history` (
`id` int(10) unsigned NOT NULL auto_increment,
`usrid` int(10) unsigned NOT NULL default '0',
`note` varchar(45) NOT NULL default '',
`ip` varchar(45) NOT NULL default '',
`creation` datetime NOT NULL default '0000-00-00 00:00:00',
`keyid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `FK_hist_1` (`usrid`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=latin1;
alter table clients add `notes` varchar(100) default NULL;
alter table clients add `chk_sig` tinyint(1) NOT NULL default '0';
alter table clients add `chk_owner` tinyint(1) NOT NULL default '0';
alter table clients add `chk_time` tinyint(1) NOT NULL default '1';
alter table yubikeys add `notes` varchar(100) default NULL;
alter table yubikeys add `serial` varchar(45) default NULL;
copy config.php.sample to config.php
open config.php with an editor and change
$opt, a key from you yubikey
$pin, you pin tu use when accessing YMS
$aesParams['__ADM_KEY_SECRET__'], your yubikeys AES secret
$aesParams['__ENC_KEY_SECRET__'], secret to use when encrypting data in the database, keep this one safe for future use
$baseParams['__DB_HOST__'], database host
$baseParams['__DB_USER__'], database user
$baseParams['__DB_PW__'], database password
$baseParams['__DB_NAME__', database name
$baseParams['__ROOT_EMAIL__'], your email address or whoever is responsible for this
$baseParams['__ORDER_URL__'], url to user yubikey request form perhaps?
$baseParams['__DOMAIN__'], your domain
$baseParams['__DOC_ROOT__'], filesystem path to apache root
$valParams['__VAL_URL__'], validation server URL if you have followed my instructions it should be
http://localhost:8080/wsapi/verify?id= make sure that this one does not point to verify.php which is the default value.
$headParams['__SHORTCUT_ICON_URL__'], URL to favicon, should be located in yms/images
$letterParams['__KMS_URL__'], URL to yms, why the keep calling it kms is a mystery
When finished save and close config.php
before you can go on and run the installer you need to install yubikey-val-server-php in to yourwebroot/wsapi since there are undocumented dependencies to a file in that package..
The script will try to create the first user which already exists so we need to modify the script, open install.php and remove the entire variables starting with
$stmt = 'INSERT INTO clients VALUES (1,1,1,' .
and
$stmt = 'INSERT INTO yubikeys VALUES (1,1,1,' .
or just remove quert($stmt); beneath those variables.
run install.php, php install.php
the install script is very likely to fail a few times, that is no problem just correct the problems and run the script again..
After a successful run of install.php open config.php and remove everything between the remove this section comments.
copy yms to your web server root and rename it to kms
touch /tmp/kms.log;chown apache.apache /tmp/kms.log
In yubiphpbase/key_lib.php there is a function that sets $id to default if no $id is provided, I don't know what this is and it will not work unless there is an id 28 in the clients table, I just set to to 1 to make it work, I have no idea what the impact on security or other functionality will be..
function verifyYubikeyOtp($otp, $id=28) > function verifyYubikeyOtp($otp, $id=1)
If I can find some time I might patch this but for now, good enough..