Страница 1 из 1

squid + ntlm аутентификация

Добавлено: 17 ноя 2016 12:21
slava007
Добрый день.
Имеется squid 3.5.22

Код: Выделить всё

Squid Cache: Version 3.5.22
Service Name: squid
configure options:  '--build=x86_64-linux-gnu' '--program-prefix=' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--exec_prefix=/usr' '--libexecdir=/usr/lib/squid' '--localstatedir=/var' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid.pid' '--disable-dependency-tracking' '--enable-arp-acl' '--enable-follow-x-forwarded-for' '--enable-auth' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL,DB,POP3,squid_radius_auth' '--enable-ntlm-auth-helpers=smb_lm,no_check,fakeauth' '--enable-digest-auth-helpers=password,ldap,eDirectory' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=file_userip,LDAP_group,session,unix_group,wbinfo_group,SQL_session' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups' '--with-large-files' '--enable-linux-netfilter' '--enable-referer-log' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl' '--enable-storeio=aufs,diskd,ufs' '--enable-useragent-log' '--enable-wccpv2' '--enable-esi' '--with-aio' '--with-default-user=squid' '--with-filedescriptors=16384' '--with-dl' '--with-pthreads' '--prefix=/usr' 'build_alias=x86_64-linux-gnu'
так же имеется проблема ntlm аутентификации на sharepoint сервере. В журнале access прокси имеются такие записи:

Код: Выделить всё

1478880114.577 3 192.168.103.156 TCP_MISS/401 866 POST http://sharepointsrv/sites/portal/Company/PhoneBase.aspx - HIER_DIRECT/192.168.11.40 -
Напрямую, без прокси, аутентификация с рабочей станции происходит корректно.

Почитав немного документацию, пришел к выводу, что в случае с проксированием ntlm аутентификации hierarchy status должен быть PINNED вместо HIER_DIRECT. Поправил в конфиге директиву http_port, добавив параметр connection-auth=on (хоть, как пишут, по умолчанию о должен быть включен)

Код: Выделить всё

http_port 3128  tcpkeepalive=30,10,60 connection-auth=on
однако должного эффекта это не возымело.

Так же имеется другой прокси версии 3.1.8 и следующей конфигурации:

Код: Выделить всё

Squid Cache: Version 3.1.8
configure options:  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--exec_prefix=/usr' '--libexecdir=/usr/lib/squid' '--localstatedir=/var' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--with-logdir=$(localstatedir)/log/squid' '--with-pidfile=$(localstatedir)/run/squid.pid' '--disable-dependency-tracking' '--enable-arp-acl' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL,DB,POP3,squid_radius_auth' '--enable-ntlm-auth-helpers=smb_lm,no_check,fakeauth' '--enable-digest-auth-helpers=password,ldap,eDirectory' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups' '--with-large-files' '--enable-linux-netfilter' '--enable-referer-log' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl' '--enable-storeio=aufs,diskd,ufs' '--enable-useragent-log' '--enable-wccpv2' '--enable-esi' '--with-aio' '--with-default-user=squid' '--with-filedescriptors=16384' '--with-dl' '--with-openssl' '--with-pthreads' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --with-squid=/builddir/build/BUILD/squid-3.1.8 --enable-ltdl-convenience
данный сервер проксирование ntlm осуществляет корректно:

Код: Выделить всё

1479369471.703    490 192.168.103.156 TCP_MISS/200 38724 POST http://sharepointsrv/sites/portal/Company/PhoneBase.aspx - PINNED/192.168.11.40 text/html
Различие между конфигурациями серверов 3.1 и 3.5 это то, что на 3.1 установлена samba+winbind однако, насколько я понял, samba+winbind необходимы для ntlm аутентификации на самом прокси сервере, а не на sharepoint сервере.
Подскажите, пожалуйста, в чем может быть проблема.

Re: squid + ntlm аутентификация

Добавлено: 17 ноя 2016 12:31
Алексей Максимов
То есть у Вас пользователи ходят на локальный веб-узел SharePoint через прокси? А зачем? Может просто стоит настроить обход прокси для локальных узлов ?

Re: squid + ntlm аутентификация

Добавлено: 17 ноя 2016 12:47
slava007
Благодарю за ответ. Да, я думал над вариантом, просто хотелось разобраться в проблеме чисто из 'спортивного' интереса, к тому же на версии 3.1 работало. :)

Re: squid + ntlm аутентификация

Добавлено: 17 ноя 2016 12:51
Алексей Максимов
По-моему обход прокси для локальных узлов - это единственно верный вариант вне зависимости от версии Squid. Все остальные варианты - для любителей извращений и "спортом" тут и не пахнет.

Re: squid + ntlm аутентификация

Добавлено: 17 ноя 2016 13:11
slava007
Странно, считал это стандартным функционалом сквида http://wiki.squid-cache.org/Features/ConnPin Если нет других предложений думаю тему можно закрывать.