Table of Contents for
Squid: The Definitive Guide

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Squid: The Definitive Guide by Duane Wessels Published by O'Reilly Media, Inc., 2004
  1. Cover
  2. Squid: The Definitive Guide
  3. Squid: The Definitive Guide
  4. Dedication
  5. Preface
  6. 1. Introduction
  7. 2. Getting Squid
  8. 3. Compiling and Installing
  9. 4. Configuration Guide for the Eager
  10. 5. Running Squid
  11. 6. All About Access Controls
  12. 7. Disk Cache Basics
  13. 8. Advanced Disk Cache Topics
  14. 9. Interception Caching
  15. 10. Talking to Other Squids
  16. 11. Redirectors
  17. 12. Authentication Helpers
  18. 13. Log Files
  19. 14. Monitoring Squid
  20. 15. Server Accelerator Mode
  21. 16. Debugging and Troubleshooting
  22. A. Config File Reference
  23. http_port
  24. https_port
  25. ssl_unclean_shutdown
  26. icp_port
  27. htcp_port
  28. mcast_groups
  29. udp_incoming_address
  30. udp_outgoing_address
  31. cache_peer
  32. cache_peer_domain
  33. neighbor_type_domain
  34. icp_query_timeout
  35. maximum_icp_query_timeout
  36. mcast_icp_query_timeout
  37. dead_peer_timeout
  38. hierarchy_stoplist
  39. no_cache
  40. cache_access_log
  41. cache_log
  42. cache_store_log
  43. cache_swap_log
  44. emulate_httpd_log
  45. log_ip_on_direct
  46. cache_dir
  47. cache_mem
  48. cache_swap_low
  49. cache_swap_high
  50. maximum_object_size
  51. minimum_object_size
  52. maximum_object_size_in_memory
  53. cache_replacement_policy
  54. memory_replacement_policy
  55. store_dir_select_algorithm
  56. mime_table
  57. ipcache_size
  58. ipcache_low
  59. ipcache_high
  60. fqdncache_size
  61. log_mime_hdrs
  62. useragent_log
  63. referer_log
  64. pid_filename
  65. debug_options
  66. log_fqdn
  67. client_netmask
  68. ftp_user
  69. ftp_list_width
  70. ftp_passive
  71. ftp_sanitycheck
  72. cache_dns_program
  73. dns_children
  74. dns_retransmit_interval
  75. dns_timeout
  76. dns_defnames
  77. dns_nameservers
  78. hosts_file
  79. diskd_program
  80. unlinkd_program
  81. pinger_program
  82. redirect_program
  83. redirect_children
  84. redirect_rewrites_host_header
  85. redirector_access
  86. redirector_bypass
  87. auth_param
  88. authenticate_ttl
  89. authenticate_cache_garbage_interval
  90. authenticate_ip_ttl
  91. external_acl_type
  92. wais_relay_host
  93. wais_relay_port
  94. request_header_max_size
  95. request_body_max_size
  96. refresh_pattern
  97. quick_abort_min
  98. quick_abort_max
  99. quick_abort_pct
  100. negative_ttl
  101. positive_dns_ttl
  102. negative_dns_ttl
  103. range_offset_limit
  104. connect_timeout
  105. peer_connect_timeout
  106. read_timeout
  107. request_timeout
  108. persistent_request_timeout
  109. client_lifetime
  110. half_closed_clients
  111. pconn_timeout
  112. ident_timeout
  113. shutdown_lifetime
  114. acl
  115. http_access
  116. http_reply_access
  117. icp_access
  118. miss_access
  119. cache_peer_access
  120. ident_lookup_access
  121. tcp_outgoing_tos
  122. tcp_outgoing_address
  123. reply_body_max_size
  124. cache_mgr
  125. cache_effective_user
  126. cache_effective_group
  127. visible_hostname
  128. unique_hostname
  129. hostname_aliases
  130. announce_period
  131. announce_host
  132. announce_file
  133. announce_port
  134. httpd_accel_host
  135. httpd_accel_port
  136. httpd_accel_single_host
  137. httpd_accel_with_proxy
  138. httpd_accel_uses_host_header
  139. dns_testnames
  140. logfile_rotate
  141. append_domain
  142. tcp_recv_bufsize
  143. err_html_text
  144. deny_info
  145. memory_pools
  146. memory_pools_limit
  147. forwarded_for
  148. log_icp_queries
  149. icp_hit_stale
  150. minimum_direct_hops
  151. minimum_direct_rtt
  152. cachemgr_passwd
  153. store_avg_object_size
  154. store_objects_per_bucket
  155. client_db
  156. netdb_low
  157. netdb_high
  158. netdb_ping_period
  159. query_icmp
  160. test_reachability
  161. buffered_logs
  162. reload_into_ims
  163. always_direct
  164. never_direct
  165. header_access
  166. header_replace
  167. icon_directory
  168. error_directory
  169. maximum_single_addr_tries
  170. snmp_port
  171. snmp_access
  172. snmp_incoming_address
  173. snmp_outgoing_address
  174. as_whois_server
  175. wccp_router
  176. wccp_version
  177. wccp_incoming_address
  178. wccp_outgoing_address
  179. delay_pools
  180. delay_class
  181. delay_access
  182. delay_parameters
  183. delay_initial_bucket_level
  184. incoming_icp_average
  185. incoming_http_average
  186. incoming_dns_average
  187. min_icp_poll_cnt
  188. min_dns_poll_cnt
  189. min_http_poll_cnt
  190. max_open_disk_fds
  191. offline_mode
  192. uri_whitespace
  193. broken_posts
  194. mcast_miss_addr
  195. mcast_miss_ttl
  196. mcast_miss_port
  197. mcast_miss_encode_key
  198. nonhierarchical_direct
  199. prefer_direct
  200. strip_query_terms
  201. coredump_dir
  202. ignore_unknown_nameservers
  203. digest_generation
  204. digest_bits_per_entry
  205. digest_rebuild_period
  206. digest_rewrite_period
  207. digest_swapout_chunk_size
  208. digest_rebuild_chunk_percentage
  209. chroot
  210. client_persistent_connections
  211. server_persistent_connections
  212. pipeline_prefetch
  213. extension_methods
  214. request_entities
  215. high_response_time_warning
  216. high_page_fault_warning
  217. high_memory_warning
  218. ie_refresh
  219. vary_ignore_expire
  220. sleep_after_fork
  221. B. The Memory Cache
  222. C. Delay Pools
  223. D. Filesystem Performance Benchmarks
  224. E. Squid on Windows
  225. F. Configuring Squid Clients
  226. About the Author
  227. Colophon
  228. Copyright

Name

auth_param

Synopsis

The auth_param directive controls almost every aspect of Squid’s external user authentication interface. Squid currently supports three authentication schemes: Basic, Digest, and NTLM. Basic authentication support is compiled by default. For the others, you must use the —enable-auth option with ./configure.

Since the auth_param directive is very complex, I’m presenting it here as a separate directive for each combination of parameters.

Syntax

See the following subsections

Default

See the following subsections

Example

See the following subsections

Related

authenticate_cache_garbage_interval, authenticate_ttl, authenticate_ip_ttl

auth_param basic program

The command for the HTTP Basic authentication helper. You need to specify the full pathname to the program, plus any command-line options.

Syntax

auth_param basic program command ...

Default

No default

Example

auth_param basic program /usr/local/squid/libexec/ncsa_auth /usr/local/squid/etc/
ncsa_passwd

Related

auth_param basic children, auth_param basic realm, auth_param basic credentialsttl

auth_param basic children

This is the number of Basic authentication helper processes Squid uses.

Syntax

auth_param basic children count

Default

auth_param basic children 5

Example

auth_param basic children 10

Related

auth_param basic program, auth_param basic realm, auth_param basic credentialsttl

auth_param basic realm

This is the Basic authentication realm Squid sends in 407 (Proxy Authentication Required) responses. User agents typically display the realm string to the user when requesting a username and password. Refer to RFC 2617, Section 2.

Syntax

auth_param basic realm string

Default

No default

Example

auth_param basic realm Squid proxy-caching web server

Related

auth_param basic program, auth_param basic children, auth_param basic credentialsttl

auth_param basic credentialsttl

To reduce load on the external authentication processes, Squid caches successful answers for this amount of time. In other words, once a user is authenticated, Squid doesn’t query the helper program again until this TTL expires. If you change the external database (e.g., password file), Squid may not notice the change until the cached credentials time out.

Syntax

auth_param basic credentialsttl time-specification

Default

auth_param basic credentialsttl 5 minutes

Example

auth_param basic credentialsttl 15 minutes

Related

auth_param basic program, auth_param basic children, auth_param basic realm

auth_param digest program

As with Basic authentication, this specifies the command to execute for the external Digest authentication program.

Syntax

auth_param digest program command ...

Default

No default

Example

auth_param digest program /usr/local/squid/libexec/digest_auth /usr/local/squid/etc/
digest_passwd

Related

auth_param digest children, auth_param digest realm, auth_param digest nonce_garbage_interval, auth_param digest nonce_max_duration, auth_param digest nonce_max_count

auth_param digest children

This is the number of Digest authentication helper processes that Squid uses.

Syntax

auth_param digest children count

Default

auth_param digest children 5

Example

auth_param digest children 11

Related

auth_param digest program, auth_param digest realm, auth_param digest nonce_garbage_interval, auth_param digest nonce_max_duration, auth_param digest nonce_max_count

auth_param digest realm

This is the Digest authentication realm that Squid sends in 407 (Proxy Authentication Required) responses. User agents typically display the realm string to the user when requesting a username and password. Refer to RFC 2617, Section 3.2.1.

Syntax

auth_param digest realm string

Default

No default

Example

auth_param digest realm Squid proxy-caching web server

Related

auth_param digest program, auth_param digest children, auth_param digest nonce_garbage_interval, auth_param digest nonce_max_duration, auth_param digest nonce_max_count

auth_param digest nonce_garbage_interval

As I explained in Section 12.3, a nonce is a special string of data that changes from time to time. Its purpose is to prevent replay attacks with captured digest authentication data.

Squid maintains a cache of nonce values it has sent to clients requiring authentication. This cache must be pruned occasionally because nonce strings expire. This directive specifies how often Squid executes the garbage collection procedure for the nonce cache.

If Squid is very busy, you may want to clean the nonce cache more frequently to reduce the amount of time spent in the garbage collection function each time it runs.

Syntax

auth_param digest nonce_garbage_interval time-specification

Default

auth_param digest nonce_garbage_interval 5 minutes

Example

auth_param digest nonce_garbage_interval 5 minutes

Related

auth_param digest program, auth_param digest children, auth_param digest realm, auth_param digest nonce_max_duration, auth_param digest nonce_max_count

auth_param digest nonce_max_duration

This directive specifies how long a Digest nonce value remains valid. It is similar to the credentialsttl directive for Basic authentication.

If an attacker captures the client’s digest authentication headers from an HTTP request, a simple replay attack provides authenticated access to Squid until the nonce value times out or until the maximum usage count is reached. Decrease this value to reduce that risk.

Syntax

auth_param digest nonce_max_duration time-specification

Default

auth_param digest nonce_max_duration 5 minutes

Example

auth_param digest nonce_max_duration 30 minutes

Related

auth_param digest program, auth_param digest children, auth_param digest realm, auth_param digest nonce_garbage_interval, auth_param digest nonce_max_count, auth_param basic credentialsttl

auth_param digest nonce_max_count

This directive specifies a limit on the number of requests for a Digest nonce value. If a client issues this many requests with the same nonce value, Squid invalidates it and causes a new one to be generated. See Section 4.3 of RFC 2617.

Syntax

auth_param digest nonce_max_count count

Default

auth_param digest nonce_max_count 50

Example

auth_param digest nonce_max_count 50

Related

auth_param digest program, auth_param digest children, auth_param digest realm, auth_param digest nonce_garbage_interval, auth_param digest nonce_max_duration

auth_param ntlm program

This directive specifies the command, including options, to execute for the external NTLM authentication program.

Syntax

auth_param ntlm program command

Default

No default

Example

auth_param ntlm program /usr/local/squid/libexec/ntlm_auth /usr/local/
squid/etc/ntlm_db

Related

auth_param ntlm children, auth_param ntlm max_challenge_reuses, auth_param ntlm max_challenge_lifetime

auth_param ntlm children

Specifies the number of NTLM authentication helper process that Squid uses.

Syntax

auth_param ntlm children count

Default

auth_param ntlm children 5

Example

auth_param ntlm children 14

Related

auth_param ntlm program, auth_param ntlm max_challenge_reuses, auth_param ntlm max_challenge_lifetime

auth_param ntlm max_challenge_reuses

In Squid’s NTLM implementation, the NTLM challenge token comes from the external helper process, rather than Squid itself. Each helper process generates its own challenge token. This directive specifies how many times each token may be reused. By default, the tokens are never reused. Challenge reuse is also subject to the max_challenge_lifetime restriction.

Syntax

auth_param ntlm max_challenge_reuses count

Default

auth_param ntlm max_challenge_reuses 0

Example

auth_param ntlm max_challenge_reuses 5

Related

auth_param ntlm program, auth_param ntlm children, auth_param ntlm max_challenge_lifetime

auth_param ntlm max_challenge_lifetime

This directive also controls whether the external NTML helper processes can reuse their challenge tokens. It specifies the maximum amount of time a single challenge can be used.

Syntax

auth_param ntlm max_challenge_lifetime time-specification

Default

auth_param ntlm max_challenge_lifetime 1 minute

Example

auth_param ntlm max_challenge_lifetime 2 minutes

Related

auth_param ntlm program, auth_param ntlm children, auth_param ntlm max_challenge_reuses