Bluecoat, errores en autenticación (BCAAA)

Un problema recurrente al que no somos capaces de dar solución. Proxy con la versión 6.5.5.7 autenticando contra IWA 5.5.3.1 (que es antigua). En los logs se ven muchos errores de autenticación (authentication_failed PROXIED).


Lo curioso del tema es que los errores se ven en la misma sesión en la que se ven cosas aceptadas ..

algo de este estilo…

2015-05-19 10:30:32 5 x.x.x.x – – authentication_failed PROXIED «Business/Economy» http://edition.cnn.com/ 407 TCP_DENIED GET – http jadserve.postrelease.com 80 /trk.gif ?ntv_at=44&r=2086209765&ntv_a=AAAAAAAAAA21YLA gif «Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)» x.x.x.x 1486 563 – – –
2015-05-19 10:30:36 16 x.x.x.x user1 – – OBSERVED «Business/Economy;Web Ads/Analytics» http://edition.cnn.com/ 200 TCP_MISS GET text/javascript http ads.rubiconproject.com 80 /ad/11078.js – js «Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)» x.x.x.x 7455 430 – – –
2015-05-19 10:30:40 35 x.x.x.x user1 – – OBSERVED «Technology/Internet» http://edition.cnn.com/ 200 TCP_HIT GET image/png http cdn3.gigya.com 80 /gs/i/shareBar/button/buttonCenterImgUp.png – png «Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)» x.x.x.x 501 387 – – –

En los logs del BCAAA no se ve nada relevante … si que se ven un montón (miles) de errores como este…

Could not read protocol version number from ProxySG Appliancce; pero segun su KB es algo normal (hay que joderse).

http://bluecoat.force.com/knowledgebase/articles/Solution/BCAAAseventlogisreportingCouldnotreadprotocolversionnumberfromProxySGAppliance

El caso es que hay dos formas de pasar credenciales si usas proxy explicito …

Según la documentación son estas:

Proxy The ProxySG appliance issues a proxy challenge (HTTP 407) for every new connection
Proxy IP The ProxySG appliance issues a proxy challenge (HTTP 407) for the first connection request from an unauthenticated client. It only reissues the challenge when the IP surrogate expires.

https://bto.bluecoat.com/webguides/proxysg/6.5/authentication_webguide/Content/Topics/Authentication/Concepts/auth_modes_co.htm

Entonces, la lógica dice que se use proxy IP para evitar que con cada descarga te tengas que autenticar … pero no todo es tan bonito. En un entorno citrix (como el nuestro) en el que mucha gente navega a través del mismo servidor (con la misma ip) se empiezan a mezclar las sesiones (mas bien, autentica el primero y el resto usa las mismas credenciales) así que no nos vale.

Al final le puse dos reglas, una restrictiva desde las ips de los citrix para que autentique como Proxy y otra para que desde el resto de redes se use Proxy IP.

Los errores han bajado en numero … pero siguen siendo demasiados.

Lo siguiente … activar mas nivel de logs en el BCAAA

c:\Program files(x86)\blue coat systems\bcaa\bcaa.ini

; The EventLogMask can have the following values:
; -1 = Turn off routine logging (errors during startup will still be logged)
; 0 = Log default events (most of these events are errors)
; The following settings also log all Default events:
; 1 = Log Authentication events (User and Group authentication failures)
; 2 = Log Debug events
; 3 = Log Authentication and Debug events
EventLogMask=1

Poniéndolo a 3 (y reiniciando el servicio) empezó a dar algo mas de información:

Context not in list … request rejected

Que según la documentación es por esto…

he «context lost» messages are a result of failed NTLM authentications. NTLM requires two round-trips between the browser and the BCAAA server, and BCAAA has to save state between these round-trips. The «context lost» message means that the client began its second round-trip, but BCAAA was unable to find the «context» it saved from the first round-trip. BCAAA therefore fails the request, because it no longer has the information it needs to validate the user credentials.

Some possible causes of «context lost» event :
1. The client took a realy long time to respond and begin the second round-trip. BCAAA keeps these NTLM context objects in a linked list, and will purge this list every two minutes. Any context object that is more than two minutes old will be deleted. Since the thread which does this purge only wakes up every two minutes, each context will have a maximum lifetime of between two and four minutes.

2. If the BCAAA processor (bcaaa-130.exe) was restarted, or if the BCAAA processor crashed between round-trips, then this problem might occur. In either of these cases, BCAAA would reset its TCP connection with the ProxySG, and the ProxySG would then reconnect. However, since BCAAA stores the context objects in the RAM, clients who performed their first round-trip before the crash would likely fail with this error.

http://bluecoat.force.com/knowledgebase/articles/Solution/WhatarethepotentialcausesoftheAuthenticationagentrejectedrequestcontextlosteventontheProxySG

De momento sigo investigando …
*** Actualizo ***

Dado que el soporte aun sigue pidiéndome datos (va para 5 días) hemos estado haciendo pruebas.

Actualizando la versión del servidor BCAAA a la ultima y ademas instalándola en uno de los DC’s para intentar eliminar cualquier retraso (balanceos, etc) sin resultado aparente.

Hemos configurado la autenticación mediante kerberos como dice el manual.

https://bto.bluecoat.com/webguides/proxysg/security_first_steps/Content/Solutions/Authentication/IWA/Kerberos_IWA_BCAAA_ta.htm
https://bto.bluecoat.com/webguides/proxysg/security_first_steps/Content/Solutions/Authentication/IWA/IWA_verify_Kerberos_auth_ta.htm

En los logs ya aparece Kerberos… pero siguen los errores, yo diría que aparecen menos pero aun es pronto para decirlo.