Wednesday, 2012-05-30

*** WiKIDLogbot (~WiKIDLogb@ec2-174-129-6-100.compute-1.amazonaws.com) has joined #wikid12:49
card.freenode.netTopic for #wikid is: support for the WiKID Strong Authentication System.  If no one is here, try the nabble forums: http://www.wikidsystems.com/support/support/wikid-forums12:49
card.freenode.netUsers on #wikid: WiKIDLogbot @nowen ionepoch joevano laszlof vladdy12:49
nowencan you set the loggers to debug and try again?12:49
laszlofi have to restart for that right?12:51
nowenno12:51
laszlofok12:51
laszlofits done12:51
nowenok, just tried12:51
laszlof2012-05-30 12:52:06.487ERRORcom.wikidsystems.server.WikidCode3AESERROR101:doGet:Processing POST data12:52
laszlof2012-05-30 12:51:57.519DEBUGcom.wikidsystems.server.WikidCode3AESBulk:: Got 128 bytes of POST data12:52
laszlofthats the only thing useful in there12:52
laszlofwait. I think I found somrthing12:54
laszlofMay 30, 2012 12:36:48 PM org.apache.catalina.realm.JDBCRealm getPassword12:55
laszlofSEVERE: Exception performing authentication12:55
laszloforg.postgresql.util.PSQLException: This connection has been closed.12:55
laszlofthats from the catalina log12:55
nowenhuh12:55
nowenwhat version of postgres?12:55
nowenalso, check /var/log/messages12:55
laszlof[root@wikid logs]# postgres --version12:56
laszlofpostgres (PostgreSQL) 8.4.1112:56
laszlofnothing recent in /var/log/messages.212:56
laszloferm, /var/log/messages12:56
nowenyet, postgres must recover or you would notice it big time12:57
laszlofI'll try restarting it12:57
nowenis this 3.4.87-b1216?12:58
laszlofyes12:58
laszlofyeah, still fails after restart12:59
nowenwhat's in /var/log/pgsql/pg_startup.log?12:59
nowenso the ipad give a different error?13:00
laszlofnothing13:01
laszlofyes, well, its giving the error 101 like I see in the admin13:01
nowenis there an exception trace in the logs?  the little bomb icon13:01
laszlofno13:01
laszlofthe admin area seems to fail to draw from time to time as well13:02
nowensounds like more db errors13:02
laszlofthats what I thought13:02
laszlofnot really sure how that could be13:02
nowenis selinux on?13:02
laszlofThis is a fresh install of everything13:02
nowencentos 5 or 5?13:03
nowen6?13:03
laszlof613:03
laszlofno selinux13:03
nowenpostgres fails on restart?13:04
laszlofit seems to be fine, I get one error on restart but I think its related to the fact I'm in a VM13:05
nowenwhat is that error?13:05
laszlofStarting postgresql service: /etc/init.d/postgresql: line 114: echo: write error: Operation not permitted13:05
laszlof        test x"$PG_OOM_ADJ" != x && echo "$PG_OOM_ADJ" > /proc/self/oom_adj13:05
laszlofits not surprising you cant write to some procs within a VM13:06
laszlofsomething to do with memory over commit13:06
laszlofbut it shouldnt cause any problems13:06
nowenhmm13:09
nowenanything at all in 'grep postgres /var/log/messages*'13:10
laszlofMay 30 17:08:36 wikid postgres[26470]: [1-1] LOG:  database system was shut down at 2012-05-30 17:08:31 MSD13:11
laszlofMay 30 17:08:36 wikid postgres[26473]: [1-1] LOG:  autovacuum launcher started13:11
laszlofMay 30 17:08:36 wikid postgres[26467]: [1-1] LOG:  database system is ready to accept connections13:11
laszlofMay 30 17:08:39 wikid postgres[27648]: [2-1] LOG:  unexpected EOF on client connection13:11
laszlofMay 30 17:08:44 wikid postgres[26620]: [2-1] LOG:  unexpected EOF on client connection13:11
nowensetting up a test vm13:16
laszlofk13:18
laszlofalso, it doesnt seem to respect /etc/WiKID/security13:18
laszlofi'm going to try starting over13:20
nowenok13:20
laszlof[root@wikid ~]# wikidctl setup13:24
laszlofdropdb: too many command-line arguments (first is "2>/dev/null")13:24
laszlofTry "dropdb --help" for more information.13:24
laszlofdropuser: too many command-line arguments (first is "2>/dev/null")13:24
laszlofTry "dropuser --help" for more information.13:24
laszlofdropuser: too many command-line arguments (first is "2>/dev/null")13:24
laszlofTry "dropuser --help" for more information.13:24
laszlofdropuser: too many command-line arguments (first is "2>/dev/null")13:24
laszlofTry "dropuser --help" for more information.13:24
nowenyeah, you can ignore those13:24
laszlofdropuser: too many command-line arguments (first is "2>/dev/null")13:24
laszlofTry "dropuser --help" for more information.13:24
laszlofdropuser: too many command-line arguments (first is "2>/dev/null")13:25
laszlofTry "dropuser --help" for more information.13:25
laszlofdropuser: too many command-line arguments (first is "2>/dev/null")13:25
laszlofTry "dropuser --help" for more information.13:25
laszlof/bin/cp: cannot create regular file `/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre//jre/lib/security/': No such file or directory13:25
laszlof/bin/cp: target `/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre//jre/lib/security/' is not a directory13:25
laszlof/bin/cp: cannot create regular file `/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre//jre/lib/ext/': No such file or directory13:25
laszlof/bin/cp: cannot create regular file `/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre//jre/lib/ext/': No such file or directory13:25
laszlofjust wanted to make sure it was nothing bad13:25
nowendo this:13:25
nowenexport JRE_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/13:25
laszlofsetup already finished, should I restart again?13:26
nowenno, it's fine13:29
laszlofugh, now I have the same problem I ran into last night13:31
nowenremind me?13:31
laszlofcatalina now starting13:32
laszlofactually13:32
laszlofthis is different13:32
laszlofopt/WiKID/tomcat/bin/catalina.sh: line 309: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre//bin/java: No such file or directory13:32
laszlof/opt/WiKID/tomcat/bin/catalina.sh: line 309: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre//bin/java: No such file or directory13:32
laszlof/opt/WiKID/tomcat/bin/catalina.sh: line 310: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre//bin/java: No such file or directory13:32
nowendid you export jre_home?13:32
nowen' export JRE_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/ '13:32
laszlofyeah, thats what broke it13:33
nowen export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre13:33
laszlofthere we go13:33
laszlofi got it13:33
nowenwhat was it? (again?)13:34
laszlofthis is a 32bit system13:34
laszlofthe JRE path doesnt have the arch on th end of it13:34
nowenahh13:34
laszlofblah13:35
laszlofThis CSR contains a Distinguished Name(DN) that already exists in the WiKID CA database.13:35
nowenHold on13:35
laszlofbrb, need to grab some more coffee13:36
nowen=frank@franksworld.org?13:36
nowendone13:36
laszlofyup13:39
laszlofheh13:43
laszlofso its working now13:43
nowenhuh13:43
laszlofi dont really get what broke the first time13:43
nowenmust have been something with the db13:44
laszlofyeah13:44
laszlofok, last question for now. Using the API, whats the proper way to add an additional client to an existing user?13:44
laszlofassuming a passcode is not available13:44
nowenAdd a Device without a Passcode13:45
laszlofi know I had to make some changes to the API to make this work when I was at ASO13:45
laszlofbut I cant seem to make it work now13:45
nowenres = wc.registerUsernameWithoutCheck(13:45
nowen    if (request.getParameter("action") != null && request.getParameter("action").equalsIgnoreCase("Add device without passcode")) {         res = wc.registerUsernameWithoutCheck(request.getParameter("user"), request.getParameter("regcode"), request.getParameter("servercode"));         if (res == 0) {             status = "Success";         } else {             status = "Failed (" + res + ")";         }     }13:46
laszlofI'm using the PHP api13:48
laszlofunction registerUsername($username, $regcode, $domaincode, $add = false)13:48
laszlof    {13:48
laszlof        $this->_dprint("registerUsername() called ...");13:48
laszlof        $this->reconnect();13:48
laszlof        $valid_tag = "REGUSER:SUCESS";13:48
laszlof        if ($add) {13:49
laszlof            $this->_dprint("Adding new device ...");13:49
laszlof            $command = "ADDREGUSER";13:49
laszlof$type = 4;13:49
laszlof$passcodeline = "<passcode>null</passcode>";13:49
laszlof$format = "add";13:49
laszlof        } else {13:49
laszlofI tried passing a null value as well as a blank value for passcode13:49
laszlofbut it didnt seem to work13:49
laszlof(thats been modified btw)13:49
laszlofnormally the 4th argument to that function would be the passcode13:49
laszlofwhich would be put in the <passcode> block13:49
laszlofbut thats not applicable for what I'm trying to do13:50
nowendamn, looks like the php api package needs an update13:50
laszlofnot a big surprise :)13:50
laszlofwhich one is current?13:50
nowenlooks like 3.0.5 is the latest php.  the java one is always current13:51
laszlofalso, the php api still doesnt accept a p12 certificate that is outputted by wikid13:51
laszlofI think I pointed that out when I first started using this a couple years ago13:51
laszlofyou have to convert the p12 cert to a pem file13:52
nowenI thought that was a php thing13:52
laszlofprobably13:52
laszlofmaybe make both certs available in the wikid admin?13:52
nowenpossibly. we don't get a lot of php to be honest13:54
nowenbut maybe you're about the change that ;)13:54
laszlofok, I have no idea how to extract code from the java version13:55
laszlofextracted the jar file, but all i have is a bunch of compiled class files13:55
nowenwell, all the code is in example.jsp13:55
laszlofthe usage code, I want to see how it works so I can fix wClient.inc.php13:55
nowenjust look at the code in that page and you'll see the function names you need to use13:56
laszlofTBH, you should really use simplexml objects rather than plain text XML code13:56
nowenwell, the server was written some time ago..13:58
laszlofI'll bet13:58
laszlofthe example.jsp packaged with the wikid RPM appears to be outdated13:59
laszlofwhere is the current one?13:59
nowen?13:59
nowenI don't think so13:59
laszlofi dont see the registerUsernameWithoutCheck function in it13:59
laszlofnevermind13:59
laszlofThe14:00
laszlof   server must have the ALLOW_REG_WITHOUT_PASSCODE parameter devfined and set to True for this call to14:00
laszlofis this default?14:00
laszlof   succeed.14:00
nowenyes14:00
laszlofk14:00
laszlofso the PHP API doesnt appear to care what the function names are when passing the data to wikid14:02
laszlofit just passes an XML string14:02
laszlof<transaction> <type format="$format">$type</type> <data> <user-id>$username</user-id> <registration-code>$regcode</registration-code> <domaincode>$domaincode</domaincode> $passcodeline <error-code>null</error-code> <result>null</result> <groupName>null</groupName> </data>14:02
laszlof</transaction>14:02
laszlofyou guys should update to a soap api, would save a lot of time tweaking these client libs :)14:05
nowenhttp://www.wikidsystems.com/support/wikid-support-center/manual/wikid-network-client-wclient-api-manual/referencemanual-all-pages\14:06
nowen<transaction>    <type format="add-no-check">4</type>    <data>    <user-id>api4</user-id>    <registration-code>3oIOs53Z</registration-code>    <domaincode>127000000001</domaincode>    <passcode>null</passcode>    <error-code>null</error-code>    <groupName>null</groupName>    <result>null</result>    </data> </transaction>14:06
laszlofah14:07
laszlofadd-no-check14:07
laszlofchanged from just "add"14:07
laszlofthat works14:07
laszlofgive me a minute and I'll send you the updated code14:08
nowenbut wait - there are more new functions!14:08
laszlofheh14:08
laszlofI'd be happy to update all of this for you, but I need the XML format for everything14:09
nowenit's on that api page14:09
laszlofthe api docs arent completely consistent14:21
laszlofif you scroll down to the "Add Device (add a token to an existing account)14:21
laszlofsection14:21
laszlofyou'll see the format still says "add" rather than "add-no-check"14:22
laszlofnevermind14:22
laszlofim dumb14:22
nowenlol14:22
laszlofis there any way to list users linked to a domain?14:31
laszlofI see the find user by name function. can I pass a null user value to that?14:31
nowenI think so, but I'm not sure14:32
nowenbut that makes sense14:32
* nowen sets up an example.jsp14:33
laszloftried this, but it didnt give me any response14:34
laszlof<transaction>14:34
laszlof<type>5</type>14:34
laszlof<data>14:34
laszlof<domaincode>$domaincode</domain>14:34
laszlof<user-id>null</user-id>14:34
laszlof<result>null</result>14:34
laszlof<return-code>null</return-code>14:34
laszlof</data>14:35
laszlof</transaction>14:35
laszlofoops14:35
laszloftypo14:35
laszloffixed the domaincode line, but still no response14:35
laszloftried with a blank user-id, and removed return-code.. now I get a FAILED response14:36
nowenactually, I think you can only do that via a report14:37
laszlofhmm14:37
nowenbut we can add it14:37
laszlofBeing able to list them is going to be important for this project. I'd rather not have to store the data in a database if I can avoid it14:37
laszlofyeah, if you can just make it so if a null value is passed as the user-id, make it return an array of users in that domain, that would be awesome.14:38
laszloflooks like the returned object from that function only supports a single user. So you'll likely have to make another level to the array. data->users->user14:40
laszlofrather than data->user14:40
laszlofbut that shouldnt be difficult to do and not break existing API implementations14:40
laszlofcan you pass a specific device ID to the delete user function to delete a specific device from a user14:52
laszlofwithout deleting the entire user14:52
nowenDelete Device By ID should do that14:53
nowenhmm - don't see that in the api docs, but it is in example.jsp14:56
laszlofyeah, but that doesnt show me the XML format required to do it :)14:58
laszlofyou guys need to update your mobile apps, they look extremely dated compared to what is available today :)15:11
laszlofIMO, build it using the HTML5 platform you have15:11
laszlofmuch easier for deployments across multiple platforms15:12
laszlofat least between ios and android15:12
nowenyeah. we'll be going there15:12
laszlofi might play around with it and see what I can come up with15:15
laszlofI've built a few mobile html5 apps in my time15:15
nowen <transaction>15:25
nowen                <type> 13 </type>15:25
nowen                <data>15:25
nowen                       <deviceID> deviceID </deviceID>15:25
nowen                       <result> result </result>15:25
nowen                       <return-code> returnCode </return-code>15:25
nowen                 </data>15:25
nowen</transaction>15:25
nowendelete device xml15:26
laszlofthanks15:26
laszlofdoes the domaincode not need to be passed?15:27
nowendon't think so. the deviceid should be unique15:27
laszlofnot getting any reponse15:32
laszlof:(15:32
nowenhmm, did it delete?15:33
laszlofno15:33
laszlofi tried adding the domaincode just in case but that didnt work either15:33
laszlof<transaction><type>13</type><data><domaincode>037026106124</domaincode><deviceid>2007877643611286882</deviceid><result></result></data></transaction>15:34
nowenhmm, works in example.jsp and the code in java matches up15:37
nowen   public String toXml() {       return "<transaction>" +               "   <type>" + type + "</type>" +               "   <data>" +               "       <deviceID>" +deviceID + "</deviceID>" +               "       <result>" + result + "</result>" +               "       <return-code>" + returnCode + "</return-code>" +       15:37
laszlofwhat are result and returnCode set to?15:38
laszlofI tried passing them as blank and null values15:38
nowendid you try empty?16:02
laszlofyup16:03
nowenanything in the logs?16:03
laszlof2012-05-30 16:04:54.892DEBUGcom.wikidsystems.server.wAuthException (2)...16:05
laszlof2012-05-30 16:04:54.892DEBUGcom.wikidsystems.server.wAuthXML received: <?xml version="1.0" encoding="UTF-8"?> <transaction> <type>13</type> <data> <deviceID>037026106124</deviceID> <result /> <return-code /> </data> </transaction>16:05
nowenand the deviceid is correct?  it's not supposed to be negative?16:10
nowenis there no error?16:10
laszlofyes16:10
laszlofno error, just that exception16:10
laszlofthat I cant get any details on16:10
laszlofwait..16:11
laszloffuck16:11
laszlofno, still no love16:13
laszlofthe deviceID wasnt right16:13
laszlofbut still isnt working16:13
laszlof2012-05-30 16:13:02.383DEBUGcom.wikidsystems.server.wAuthXML received: <?xml version="1.0" encoding="UTF-8"?> <transaction> <type>13</type> <data> <deviceID>2007877643611286882</deviceID> <result>null</result> <return-code>null</return-code> </data> </transaction>16:13
nowenhttp://krebsonsecurity.com/2012/05/whmcs-breach-may-be-only-tip-of-the-trouble/16:20
laszlofyeah, there was a SQL injection patch yesterday16:22
nowenstill nothing on the deletedevice?16:54
laszlofno, I've moved onto the other thing for now16:55
nowenit could be the leading  <?xml version="1.0" encoding="UTF-8"?>16:56
laszlofthats being appended by wikid server16:56
laszlofthe received data doesnt have that16:56
nowenIt's line buffered so if not that's probably the problem.17:43
nowenThe only "\n" should be after </transaction>17:45
laszlofi can throw it all on a single line, but it really shouldnt matter :/17:45
laszlofits formated the same way as all the other API calls that do work17:46
*** markw78 (~mark.wole@12.69.65.190) has joined #wikid18:35
markw78sooo, what happens when I need to change my IP address my domain is associated with? :)18:36
nowenyou can't you have to create a new domain18:36
markw78that really sucks18:36
markw78that means I need all new tokens for all the users?18:36
markw78new PINs etc?18:36
markw78I guess I was asking if there's a migration path18:37
markw78I went to create a new domain and it was giving me PIN minimums etc, so I was assuming it would require new stuff... figured I should ask first how that will go down18:37
nowenyes, new registrations for all the tokens18:37
markw78yuck18:38
nowenhmm, or I wonder if we can create a dns entry18:38
nowenwhat is your domain identifier?18:38
markw78thats what I was hoping :)  though I'd need to time it right18:38
markw78012069065165 iirc18:38
nowenare you losing the IP?18:38
markw78yah we're changing ISP's18:39
markw78I have the new IPs, I started to set things up and couldn't get a token... then realized I had no domain for the new IP18:39
markw78then rolled it all back and stopped by here :)18:39
nowenwhat types of token clients do you have?18:43
nowenThere might me some lag if it has to check the ip first but it should still work ok.18:45
markw78umm18:49
markw78software tokens18:49
markw78if thats what you're asking there?18:49
nowenPC tokens or smart-phone?18:49
markw78a mix18:49
nowenhow many users?18:50
markw78mostly PC tokens on USB keys, but our exec's are all on iphone heh18:50
markw78about 6018:50
markw78maybe 12 or so iphone, the rest software pc tokens18:50
markw78maybe a couple android too, not sure18:50
nowenshould work18:52
nowenit will be reliant upon our dns18:53
markw78so we just need to coordinate the change with you?18:59
markw78and we can change it back if it doesn't work, right? :)18:59
nowenyeah. no guarantees, though, but it should work18:59
markw78ok, well heck18:59
markw78may as well do it now18:59
markw78people aren't really using vpn during the day19:00
nowenwhat is the domain id?19:00
markw7801206906516519:00
nowenyou'll have to move the server to the new ip or copy the database19:00
markw78it's all NAT'd so I shouldn't have to do anything there19:01
markw78need the new IP?19:01
markw78(or can we tie it to a DNS name?)19:01
markw78CNAME it19:01
nowenwhat I'm going to do is cname 012069065165.wikidsystems.net to the new IP19:01
markw78ah ok19:02
markw7838.83.98.3819:02
nowenthe tokens will check the old IP and not get a response, then they will check DNS19:02
markw78cool19:02
nowendo a host lookup on 012069065165.wikidsystems.net19:04
nowenI haven't changed it yet19:04
markw78google-public-dns-a.google.com can't find 012069065165.wikidsystems.net: Non-existent domain19:05
nowenok - change is made19:06
nowenhost 012069065165.wikidsystems.net19:06
nowen012069065165.wikidsystems.net has address 38.83.98.3819:06
markw78yah just resolved that via yahoo19:06
markw78it should work too cause we do that internally... I have a wikidsystems.net dns zone internally and we point that CNAME to an internal IP  (so tokens work inside)19:06
markw78let me try some tests!19:07
nowenok19:07
markw78slow19:07
markw78but got a token19:07
markw78and I'm on the VPN!19:08
markw78awesome, ty19:08
nowennp19:08
markw78let me go have someone test with a smart phone to be sure19:08
nowenmileage may vary by dns propogation19:08
markw78yah19:10
markw78just had our cto check from his iphone and he got a token right away19:10
markw78and I got connected from home19:10
markw78so it looks good, ty for the help!19:11
nowengreat!19:11
markw78thanks again! until next time :D19:50
*** markw78 has parted #wikid (None)19:50
*** nowen has quit (Quit: Leaving.)22:28

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!