Windows Client with Linux Server error
Hello,
I configure multiotp on linux with apache to access web-gui and webservice.
User are created on linux and local authentication is working
./multiotp.php toto 193604
LOG 2015-08-10 23:05:29 notice (user toto) User OK: User toto successfully logged in
0 OK: Token accepted
then I deploy multiotp on windows Server 2008, and configure it as client :
multiotp.exe -config server-secret=MySharedSecret
multiotp.exe -config server-cache-level=1
multiotp.exe -config server-timeout=3
multiotp.exe -config server_url=http://172.16.3.87/ (apache on linux)
Also add following configuration on linux :
./multiotp.php -config server-secret=MySharedSecret
./multiotp.php -config server-cache-level=1
./multiotp.php -config server-cache-lifetime=15552000
When I tried authentication on windows :
.\multiotp.exe -display-log -log -debug toto 752569
I got a error :
Notice: XML Parsing Error at 2:1. Error 4: Not well-formed (invalid token) in \Data\projects\multiotp\phc-cli\multiotp
.windows.php on line 19263
Notice: XML Parsing Error at 2:1. Error 4: Not well-formed (invalid token) in \Data\projects\multiotp\phc-cli\multiotp
.windows.php on line 19263
LOG 2015-08-10 23:37:01 critical Client-Server Error: Host answers with the following error code: 99 ()
LOG 2015-08-10 23:37:01 warning System Error: database file C:\Program Files\multiotp\users\toto.db for user toto does n
ot exist
Notice: XML Parsing Error at 2:1. Error 4: Not well-formed (invalid token) in \Data\projects\multiotp\phc-cli\multiotp
.windows.php on line 19263
LOG 2015-08-10 23:37:01 critical Client-Server Error: Host answers with the following error code: 99 ()
21 ERROR: User doesn't exist
I also notice in multiotp log on linux :
Your script is running from /opt/linux/
2015-08-10 23:37:04 debug Server-Client Info: *ReadUserData server request.
Network trace from tcpdump :
Client request :
POST / HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 369
User-Agent: multiOTP
Host: 172.16.3.87
data=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CmultiOTP+version%3D%224.0%22+xmlns%3D%22http%3A%2F%2Fwww.sysco.ch%2Fnamespaces%2Fmultiotp%22%3E%0A%3CServerChallenge%3EU1NyVjc0EW8FOWonaXFOHVIjcnQvEAgyOns4fE99NjV2ZTUu%
Server response :
HTTP/1.1 200 OK
Date: Mon, 10 Aug 2015 21:41:25 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.39-0+deb7u2
Expires: Mon, 10 Aug 2015 21:41:25 GMT
Last-Modified: Mon, 10 Aug 2015 21:41:25 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 402
Connection: close
Content-Type: text/html
LOG 2015-08-10 23:41:25 debug Server-Client Info: *CheckUserExists server request.
<?xml version="1.0" encoding="UTF-8"?>
<multiOTP version="4.0" xmlns="http://www.sysco.ch/namespaces/multiotp">
<DebugCode>CheckUserExists</DebugCode>
<ServerPassword>32f8a1bb4062e4d4e9a22ea7d1004bb8</ServerPassword>
<ErrorCode>22</ErrorCode>
<ErrorDescription>ERROR: User already exists</ErrorDescription>
</multiOTP>
POST / HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 363
User-Agent: multiOTP
Host: 172.16.3.87
data=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CmultiOTP+version%3D%224.0%22+xmlns%3D%22http%3A%2F%2Fwww.sysco.ch%2Fnamespaces%2Fmultiotp%22%3E%0A%3CServerChallenge%3EU1NyVjA2RzQEPj5yaipMEwctL3UmEA5lPHgyL0l9YmkkZTMk%
3C%2FServerChallenge%3E%0A%3CReadUserData%3E%0A++++%3CUserId%3Etoto%3C%2FUserId%3E%0A%3C%2FReadUserData%3E%0A%3C%2FmultiOTP%3E
3C%2FServerChallenge%3E%0A%3CCheckUserExists%3E%0A++++%3CUserId%3Etoto%3C%2FUserId%3E%0A%3C%2FCheckUserExists%3E%0A%3C%2FmultiOTP%3E
Client request :
POST / HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 363
User-Agent: multiOTP
Host: 172.16.3.87
data=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CmultiOTP+version%3D%224.0%22+xmlns%3D%22http%3A%2F%2Fwww.sysco.ch%2Fnamespaces%2Fmultiotp%22%3E%0A%3CServerChallenge%3EU1NyVjA2RzQEPj5yaipMEwctL3UmEA5lPHgyL0l9YmkkZTMk%
3C%2FServerChallenge%3E%0A%3CReadUserData%3E%0A++++%3CUserId%3Etoto%3C%2FUserId%3E%0A%3C%2FReadUserData%3E%0A%3C%2FmultiOTP%3E
Server response :
HTTP/1.1 200 OK
Date: Mon, 10 Aug 2015 21:41:25 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.39-0+deb7u2
Expires: Mon, 10 Aug 2015 21:41:25 GMT
Last-Modified: Mon, 10 Aug 2015 21:41:25 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 1253
Connection: close
Content-Type: text/html
LOG 2015-08-10 23:41:25 debug Server-Client Info: *ReadUserData server request.
<?xml version="1.0" encoding="UTF-8"?>
<multiOTP version="4.0" xmlns="http://www.sysco.ch/namespaces/multiotp">
<DebugCode>ReadUserData</DebugCode>
<ServerPassword>c1d9eae32f86b1281f64fa74d7d24845</ServerPassword>
<ErrorCode>19</ErrorCode>
<ErrorDescription>INFO: Requested operation successfully done</ErrorDescription>
<User UserId="toto">
<UserData>
...
</UserData>
</User></multiOTP>
Any idea what this bug is?
I configure multiotp on linux with apache to access web-gui and webservice.
User are created on linux and local authentication is working
./multiotp.php toto 193604
LOG 2015-08-10 23:05:29 notice (user toto) User OK: User toto successfully logged in
0 OK: Token accepted
then I deploy multiotp on windows Server 2008, and configure it as client :
multiotp.exe -config server-secret=MySharedSecret
multiotp.exe -config server-cache-level=1
multiotp.exe -config server-timeout=3
multiotp.exe -config server_url=http://172.16.3.87/ (apache on linux)
Also add following configuration on linux :
./multiotp.php -config server-secret=MySharedSecret
./multiotp.php -config server-cache-level=1
./multiotp.php -config server-cache-lifetime=15552000
When I tried authentication on windows :
.\multiotp.exe -display-log -log -debug toto 752569
I got a error :
Notice: XML Parsing Error at 2:1. Error 4: Not well-formed (invalid token) in \Data\projects\multiotp\phc-cli\multiotp
.windows.php on line 19263
Notice: XML Parsing Error at 2:1. Error 4: Not well-formed (invalid token) in \Data\projects\multiotp\phc-cli\multiotp
.windows.php on line 19263
LOG 2015-08-10 23:37:01 critical Client-Server Error: Host answers with the following error code: 99 ()
LOG 2015-08-10 23:37:01 warning System Error: database file C:\Program Files\multiotp\users\toto.db for user toto does n
ot exist
Notice: XML Parsing Error at 2:1. Error 4: Not well-formed (invalid token) in \Data\projects\multiotp\phc-cli\multiotp
.windows.php on line 19263
LOG 2015-08-10 23:37:01 critical Client-Server Error: Host answers with the following error code: 99 ()
21 ERROR: User doesn't exist
I also notice in multiotp log on linux :
Your script is running from /opt/linux/
2015-08-10 23:37:04 debug Server-Client Info: *ReadUserData server request.
Network trace from tcpdump :
Client request :
POST / HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 369
User-Agent: multiOTP
Host: 172.16.3.87
data=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CmultiOTP+version%3D%224.0%22+xmlns%3D%22http%3A%2F%2Fwww.sysco.ch%2Fnamespaces%2Fmultiotp%22%3E%0A%3CServerChallenge%3EU1NyVjc0EW8FOWonaXFOHVIjcnQvEAgyOns4fE99NjV2ZTUu%
Server response :
HTTP/1.1 200 OK
Date: Mon, 10 Aug 2015 21:41:25 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.39-0+deb7u2
Expires: Mon, 10 Aug 2015 21:41:25 GMT
Last-Modified: Mon, 10 Aug 2015 21:41:25 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 402
Connection: close
Content-Type: text/html
LOG 2015-08-10 23:41:25 debug Server-Client Info: *CheckUserExists server request.
<?xml version="1.0" encoding="UTF-8"?>
<multiOTP version="4.0" xmlns="http://www.sysco.ch/namespaces/multiotp">
<DebugCode>CheckUserExists</DebugCode>
<ServerPassword>32f8a1bb4062e4d4e9a22ea7d1004bb8</ServerPassword>
<ErrorCode>22</ErrorCode>
<ErrorDescription>ERROR: User already exists</ErrorDescription>
</multiOTP>
POST / HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 363
User-Agent: multiOTP
Host: 172.16.3.87
data=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CmultiOTP+version%3D%224.0%22+xmlns%3D%22http%3A%2F%2Fwww.sysco.ch%2Fnamespaces%2Fmultiotp%22%3E%0A%3CServerChallenge%3EU1NyVjA2RzQEPj5yaipMEwctL3UmEA5lPHgyL0l9YmkkZTMk%
3C%2FServerChallenge%3E%0A%3CReadUserData%3E%0A++++%3CUserId%3Etoto%3C%2FUserId%3E%0A%3C%2FReadUserData%3E%0A%3C%2FmultiOTP%3E
3C%2FServerChallenge%3E%0A%3CCheckUserExists%3E%0A++++%3CUserId%3Etoto%3C%2FUserId%3E%0A%3C%2FCheckUserExists%3E%0A%3C%2FmultiOTP%3E
Client request :
POST / HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 363
User-Agent: multiOTP
Host: 172.16.3.87
data=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CmultiOTP+version%3D%224.0%22+xmlns%3D%22http%3A%2F%2Fwww.sysco.ch%2Fnamespaces%2Fmultiotp%22%3E%0A%3CServerChallenge%3EU1NyVjA2RzQEPj5yaipMEwctL3UmEA5lPHgyL0l9YmkkZTMk%
3C%2FServerChallenge%3E%0A%3CReadUserData%3E%0A++++%3CUserId%3Etoto%3C%2FUserId%3E%0A%3C%2FReadUserData%3E%0A%3C%2FmultiOTP%3E
Server response :
HTTP/1.1 200 OK
Date: Mon, 10 Aug 2015 21:41:25 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.39-0+deb7u2
Expires: Mon, 10 Aug 2015 21:41:25 GMT
Last-Modified: Mon, 10 Aug 2015 21:41:25 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Length: 1253
Connection: close
Content-Type: text/html
LOG 2015-08-10 23:41:25 debug Server-Client Info: *ReadUserData server request.
<?xml version="1.0" encoding="UTF-8"?>
<multiOTP version="4.0" xmlns="http://www.sysco.ch/namespaces/multiotp">
<DebugCode>ReadUserData</DebugCode>
<ServerPassword>c1d9eae32f86b1281f64fa74d7d24845</ServerPassword>
<ErrorCode>19</ErrorCode>
<ErrorDescription>INFO: Requested operation successfully done</ErrorDescription>
<User UserId="toto">
<UserData>
...
</UserData>
</User></multiOTP>
Any idea what this bug is?
This discussion has been closed.
Comments
Could you please tell me the exact version of multiotp that you are using ?
(>multiotp -version)
The XML is well formed, it's probably a bug in the XML parser we use (based on the parser made by Adam A. Flynn).
Best regards,
Andre
Could you please download this beta version of multiotp.exe and give us the detailed error message ?
http://download.multiotp.net/beta/4.3.2.2-beta-2/multiotp.exe
Best regards
The display_log flag is probably still actived in the configuration of your server !
Please put display_log=0 in your multiotp.ini on the server side and try it again !
Best regards,
Andre
In the next release, the "server" component will ignore the display_log parameter.
Best regards, and thanks again for your valuable feedback in order to improve our library.
Andre