Has anyone seen a problem with CosignModule for IIS where users 
sometimes, but not always, receive a 503 "Service unavailable" message 
when they first try to access a cosign-protected resource? 
(Specifically, this error sometimes occurs when the user is redirected 
from the central weblogin servers to /cosign/valid on the server that is 
running CosignModule)

We're running CosignModule 3.1.0 under Windows Server 2008R2 SP1 (IIS 
7.5).  Here are the DebugView logs for a failed request:


00001464        7.48706007      [19560] [CosignModule] CosignModule created.
00001465        7.48711443      [19560] [CosignModule] 
OnAuthenticateRequest() Thread id = 40172l
00001466        7.48714542      [19560] [CosignModule] New 
GetConfig()uration logics!
00001467        7.48717213      [19560] [CosignModule] Metapath = 
MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE/COSIGN/VALID
00001468        7.48728895      [19560] [CosignModule] unprotected url
00001469        7.48735619      [19560] [CosignModule] execreqhandler: 
qs = 
cosign-webapps.lsa.umich.edu=6Uf2+BIoBjEQ7c34Qj1zIUK2myNWUW3EEqJ7WjnKu+9dLXKnQ97ADa+N7+RyoyWIQ968B-ITkXnkxU2lPKSvvi-yLjVrwL4VQ41Evq7KOHLqsdCRHsuGCHdtHqjL&https://webapps.lsa.umich.edu/advappts
00001470        7.48739100      [19560] [CosignModule] 
{*********************GetValidationConfig*********************}
00001471        7.48741770      [19560] [CosignModule] Metapath = 
MACHINE/WEBROOT/APPHOST/DEFAULT WEB SITE/COSIGN/VALID
00001472        7.48753500      [19560] [CosignModule] NumFactors = 0
00001473        7.48756695      [19560] [CosignModule] 
{*********************GetValidationConfig Done****************}
00001474        7.48759222      [19560] [CosignModule] Regex is 
https?:\/\/.*\.umich\.edu(/.*)?
00001475        7.48763275      [19560] [CosignModule] CHECK'ing cookie
00001476        7.48765802      [19560] [CosignModule] CHECKing cookie, 
waiting for mutex.
00001477        7.48768282      [19560] [CosignModule] Obtained the mutex.
00001478        7.48770666      [19560] [CosignModule] 
connections.size() = 6
00001479        7.48773193      [19560] [CosignModule] CheckCookie iter 0
00001480        7.48775911      [19560] [CosignModule]>>  CHECK 
cosign-webapps.lsa.umich.edu=6Uf2+BIoBjEQ7c34Qj1zIUK2myNWUW3EEqJ7WjnKu+9dLXKnQ97ADa+N7+RyoyWIQ968B-ITkXnkxU2lPKSvvi-yLjVrwL4VQ41Evq7KOHLqsdCRHsuGCHdtHqjL
00001481        7.48786736      [19560] [CosignModule] recv()'ing bytes 
at offset 0
00001482        7.48786736      [19560] readBufferSize = 16425
00001483        7.48786736      [19560] readBufferSize - 
readBufferOffset = 16425
00001484        7.50066996      [19560] [CosignModule] Received 106 
encrypted bytes
00001485        7.50070763      [19560] [CosignModule] ss is SEC_E_OK
00001486        7.50073433      [19560] [CosignModule] Found 0 bytes of 
SECBUFFER_DATA at 1
00001487        7.50075912      [19560] [CosignModule] Found 69 bytes in 
SECBUFFER_EXTRA[ 3 ]
00001488        7.50078440      [19560] [CosignModule] Putting 69 bytes 
from SECBUFFER_EXTRA[ 3 ] into extraBuffer
00001489        7.50080824      [19560] [CosignModule] Decrypted 0 bytes as:
00001490        7.50083160      [19560] [CosignModule] cbBuffer is 0
00001491        7.50085545      [19560] [CosignModule] Found extra data!
00001492        7.50087929      [19560] [CosignModule] secureRead looping(0)
00001493        7.50090885      [19560] [CosignModule] ss is SEC_E_OK
00001494        7.50093365      [19560] [CosignModule] Found 30 bytes of 
SECBUFFER_DATA at 1
00001495        7.50095749      [19560] [CosignModule] Decrypted 30 
bytes as: 533 CHECK: cookie not in db!
00001496        7.50098133      [19560] [CosignModule] No extra data found!
00001497        7.50100517      [19560] [CosignModule]<<  533 CHECK: 
cookie not in db!
00001498        7.50102854      [19560] [CosignModule] Trying a 
different server: 533 CHECK: cookie not in db!
00001499        7.50105381      [19560] [CosignModule] CheckCookie iter 1
00001500        7.50108051      [19560] [CosignModule]>>  CHECK 
cosign-webapps.lsa.umich.edu=6Uf2+BIoBjEQ7c34Qj1zIUK2myNWUW3EEqJ7WjnKu+9dLXKnQ97ADa+N7+RyoyWIQ968B-ITkXnkxU2lPKSvvi-yLjVrwL4VQ41Evq7KOHLqsdCRHsuGCHdtHqjL
00001501        7.50112438      [19560] [CosignModule] recv()'ing bytes 
at offset 0
00001502        7.50112438      [19560] readBufferSize = 16425
00001503        7.50112438      [19560] readBufferSize - 
readBufferOffset = 16425
00001504        7.50115442      [19560] [CosignModule] Socket error on 
recv(): 10053
00001505        7.50117874      [19560] [CosignModule] Error reading 
data(4) from socket 1
00001506        7.50120258      [19560] [CosignModule] CheckCookie iter 2
00001507        7.50122643      [19560] [CosignModule]>>  STARTTLS 2
00001508        7.50126743      [19560] [CosignModule] Error reading 
data from socket 2
00001509        7.50129271      [19560] [CosignModule] CheckCookie iter 3
00001510        7.50131559      [19560] [CosignModule]>>  STARTTLS 2
00001511        7.50135183      [19560] [CosignModule] Error reading 
data from socket 3
00001512        7.50137663      [19560] [CosignModule] CheckCookie iter 4
00001513        7.50139999      [19560] [CosignModule]>>  STARTTLS 2
00001514        7.50143576      [19560] [CosignModule] Error reading 
data from socket 4
00001515        7.50146008      [19560] [CosignModule] CheckCookie iter 5
00001516        7.50148392      [19560] [CosignModule]>>  STARTTLS 2
00001517        7.50152016      [19560] [CosignModule] Error reading 
data from socket 5
00001518        7.50154543      [19560] [CosignModule] Released the mutex.
00001519        7.50156927      [19560] [CosignModule] Service cookie 
invalid: all weblogin servers returned RETRY.
00001520        7.50321245      [19560] [CosignModule] CosignModule 
destructed.


Here is the code that is generating the two different "Error reading 
data" messages above:

http://cosign.git.sourceforge.net/git/gitweb.cgi?p=cosign/cosignmodule;a=blob;f=ConnectionList.cpp;h=32f9aad027e0f1597adf27d5386873261d16f7cb;hb=HEAD#l142


Several things strike me as being strange:

- So far, we have only observed the failure on the initial URL 
validation.  If the user re-loads the page, the validation succeeds and 
the user is able to use the web application normally without problem.

- ConnectionList::CheckCookie is using a pool of already-open 
connections but is experiencing read errors.  The first read error 
("data(4)", above) is on a connection on which TLS has already been 
started -- CosignModule sends a CHECK command, and then is unable to 
read the response.  It then tries four other connections, none of which 
have had TLS started, sends the STARTTLS command, and then is unable to 
read the responses.  I've checked the DebugView logs for four separate 
503 errors and this patten holds exactly for all of them (failure to 
read CHECK response on the first connection, followed by failure to read 
STARTTLS responses on four other connections).


Any ideas or assistance would be appreciated, but if anyone else has 
seen this issue, too, then that's something we'd definitely like to know.


--
   Mark Montague
   [email protected]

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Cosign-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cosign-discuss

Reply via email to