Lecture 8a: WWW Proxy Servers and Cookies



Similar documents
Lecture 8a: WWW Proxy Servers and Cookies

The Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:

12. Firewalls Content

Network Technologies

Cookies Overview and HTTP Proxies

Internet Security Firewalls

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

Application Layer: HTTP and the Web. Srinidhi Varadarajan

The Hyper-Text Transfer Protocol (HTTP)

FAQs for Oracle iplanet Proxy Server 4.0

Proxy Server, Network Address Translator, Firewall. Proxy Server

CS 356 Lecture 19 and 20 Firewalls and Intrusion Prevention. Spring 2013

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

ATS Test Documentation

Proxies. Chapter 4. Network & Security Gildas Avoine

Cornerstones of Security

Firewalls. Ahmad Almulhem March 10, 2012

DATA COMMUNICATOIN NETWORKING

By Bardia, Patit, and Rozheh

The Web History (I) The Web History (II)

TELE 301 Network Management. Lecture 17: File Transfer & Web Caching

1 Introduction: Network Applications

Internet Security Firewalls

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

Interwise Connect. Working with Reverse Proxy Version 7.x

Security+ Guide to Network Security Fundamentals, Fourth Edition. Chapter 6 Network Security

<Insert Picture Here> Oracle Web Cache 11g Overview

DMZ Network Visibility with Wireshark June 15, 2010

Introduction to Computer Security Benoit Donnet Academic Year

HTTP Protocol. Bartosz Walter

Working With Virtual Hosts on Pramati Server

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

Internet infrastructure. Prof. dr. ir. André Mariën

GravityLab Multimedia Inc. Windows Media Authentication Administration Guide

Chapter 9 Firewalls and Intrusion Prevention Systems

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

Firewall Defaults, Public Server Rule, and Secondary WAN IP Address

GoToMyPC Corporate Advanced Firewall Support Features

Firewalls. Ola Flygt Växjö University, Sweden Firewall Design Principles

Semantic based Web Application Firewall (SWAF V 1.6) Operations and User Manual. Document Version 1.0

Fig : Packet Filtering

Chapter 7 Transport-Level Security

Design Notes for an Efficient Password-Authenticated Key Exchange Implementation Using Human-Memorable Passwords

World Wide Web. Before WWW

CIT 480: Securing Computer Systems. Firewalls

Intranet, Extranet, Firewall

Firewall VPN Router. Quick Installation Guide M73-APO09-380

VPN. Date: 4/15/2004 By: Heena Patel

FortiOS Handbook - WAN Optimization, Web Cache, Explicit Proxy, and WCCP VERSION 5.2.4

FortiOS Handbook WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 5.0

Chapter 4: Security of the architecture, and lower layer security (network security) 1

SFWR ENG 4C03 Class Project Firewall Design Principals Arash Kamyab March 04, 2004

Configuring Your Gateman Proxy Server

FortiOS Handbook - Load Balancing VERSION 5.2.2

CONTENT of this CHAPTER

Sage 300 ERP Online. Mac Resource Guide. (Formerly Sage ERP Accpac Online) Updated June 1, Page 1

Understanding Slow Start

Sage ERP Accpac Online

Chapter 7. Firewalls

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Figure 41-1 IP Filter Rules

Intro to Firewalls. Summary

SE 4C03 Winter 2005 An Introduction of Firewall Architectures and Functions. Kevin Law 26 th March,

ΕΠΛ 674: Εργαστήριο 5 Firewalls

REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER

Cisco Configuring Commonly Used IP ACLs

Internet Services. Amcom. Support & Troubleshooting Guide

Lecture 23: Firewalls

Chapter 4 Security and Firewall Protection

Network Security Management

Table of Contents. 1 Overview 1-1 Introduction 1-1 Product Design 1-1 Appearance 1-2

Load Balancing. FortiOS Handbook v3 for FortiOS 4.0 MR3

A Guide to New Features in Propalms OneGate 4.0

In today s world the Internet has become a valuable resource for many people.

WAN Optimization, Web Cache, Explicit Proxy, and WCCP. FortiOS Handbook v3 for FortiOS 4.0 MR3

Dissertation Title: SOCKS5-based Firewall Support For UDP-based Application. Author: Fung, King Pong

Configuration Guide BES12. Version 12.2

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Secure Web Appliance. Reverse Proxy

Configuration Guide BES12. Version 12.3

CSE 4482 Computer Security Management: Assessment and Forensics. Protection Mechanisms: Firewalls

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

SuperLumin Nemesis. Administration Guide. February 2011

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

FortiOS Handbook Load Balancing for FortiOS 5.0

Bandwidth Aggregation, Teaming and Bonding

Firewalls CSCI 454/554

Considerations In Developing Firewall Selection Criteria. Adeptech Systems, Inc.

Proxy firewalls.

Network Security CS 192

Chapter 6 Virtual Private Networking Using SSL Connections

Rproxy Servers and Caching - Explained

ΕΠΛ 475: Εργαστήριο 9 Firewalls Τοίχοι πυρασφάλειας. University of Cyprus Department of Computer Science

The Internet, Intranets, and Extranets. What is the Internet. What is the Internet cont d.

Transcription:

Internet and Intranet Protocols and Applications Lecture 8a: WWW Proxy Servers and Cookies March, 2004 Arthur Goldberg Computer Science Department New York University artg@cs.nyu.edu

Terminology Origin Server The Web server that hosts the resource Proxy Server Intermediate server that accepts requests from clients and forwards them to (towards) origin servers, to other proxy servers, or services request from its cache. Acts as server to requesting client, and as client to origin server 2

Web Caches (proxy server) Goal: satisfy client request without involving origin server configure browser: Web accesses via web cache client sends all http requests to web cache if object at web cache, web cache immediately returns object in http response else requests object from origin server, then returns http response to client client client http request http response http request http response Proxy server http request http response http request http response origin server origin server 3

Figure from RFC 2616 request chain --------------------------------------> UA -----v----- A -----v----- B -----v----- C -----v----- O <------------------------------------- response chain The figure above shows three intermediaries (A, B, and C) between the user agent (UA) and origin server (O). 4

Why Web Caching? Assume: cache is close to client smaller response time decrease traffic to distant servers link out of institutional/local ISP network is often a bottleneck institutional network public Internet 1.5 Mbps access link 10 Mbps LAN origin servers institutional cache 5

Web Caching Summary Web proxy Servers store copies of documents retrieved from origin servers Advantages Improve performance (latency reduction, bandwidth conservation) Advanced access control (intermediate requester in firewalled DMZ, authentication & authorization) Advanced filtering (e.g. detect espionage!) Logging and auditing Disadvantages Recognizing and avoiding stale (out of date) data 6

Proxy Server: Basic Operation Accept connection request from client establishes new Socket client_sock Read HTTP request Parse HTTP request reject invalid requests with appropriate response code Request is REQUIRED to be in absoluteuri form (see RFC 2396) Connect to (towards) requested server establishes new socket serv_sock Send original HTTP request to server or to next proxy on path to server 7

Proxy Server: Basic Operation (continued) Read response from Server If time-out server connection, then issue 504 Gateway Timeout Copy object in response to cache, if allowed Send response to client If Connection: close header received, close client connection (client_sock) What about server connection (serv_sock)? 8

HTTP 1.1 Cache Control Directives Control an object s cacheability RFC 2616 Section 14.9 Examples Cache-Control: general header is used to specify directives that MUST be obeyed by ALL proxy servers handling the request or response. Directives used in Requests no-cache an end-to-end revalidation should be preformed no-store sensitive information: do not store any part of request or response on disk max-age=<delta-seconds> max age acceptable to client 9

Cache Control Directives (cont.) Directives used in responses public response is cacheable by any cache (proxy or client) private response is cacheable by client only no-cache cache MUST NOT use the response to satisfy a subsequent request (for example, dynamic pages) no-store response may not be written to disk 10

Proxy Server: Using Cached Objects Parse HTTP request look for the URL in the cache if (object is found) then if (fresh) then send response to client with the object else // validation, see below end_if end_if 11

Proxy Server: Validate a Stale Object Proxy: Forward conditional request towards server with an If-Modified-Since header with the object s modification date Server: If (the object has been modified since the If- Modified-Since date) then return the object in the response Else (the object has not been modified) return a 304 (Not Modified) response Proxy: If( receives 304) then send object from cache If( receives new object) then cache and send it, Avoids transmitting the full response if the object is current 12 an extra round trip if the object is stale

Proxy Server: Validate a Stale Object, cont. Validation More general that creation date and If-Modified- Mince Includes Expires date Age allowed Heuristic expiration times Quite complex see 13.2 of 2616 13

Request Loops request chain --------------------------------------> UA -----v----- A -----v----- B -----v----- C -----v----- O ^--------------------------- to avoid request loops, a proxy MUST be able to recognize all of its server names, including any aliases, local variations, and the numeric IP address. 14

Cache Architectures Components of a Web proxy cache Network communications Storage mechanism for storing the cache data Mapping mechanism to establish relationship between URLs and their cached copies Format for cached object content and its metadata 15

Cache Architecture: mapping Direct mapping e.g, map URL to a file system path direct mappings are reversible Hash mapping compute some unique ID could be file name or index to table not reversible 16

Existing Mapping Mechanisms Directly mapping URLs to filesystem Original CERN httpd used a tree map Easy to implement, but not a good performer long pathnames = long inode search garbage collection requires complete traversal of tree 17

Existing Mapping Mechanisms Hashing URLs Netscape Proxy server Object location (on disk) based on MD5 hash very fast good distribution of different object types (image, text) across cache disadvantage: cannot compute URLs from hash 18

Alternative Cache Protocols On-Demand document does not exist in cache unless it has been requested (at least once) by some client On-Command, or Pre-Fetch proxy server automatically retrieves documents (or even entire web sites!) at regular intervals 19

General Purpose Proxy Servers Transparency users get same response whether connection was direct or to proxy (a non-transparent proxy modifies content in some way) Use is client controlled client programs (e.g., browsers) can be configured to use (or not use) proxy servers. Origin Server is unaware of proxy server Origin Server does not have to process request from proxy differently than from other client Example protocols Ftp, ssh, socks, telnet, SMTP Typical Location Firewalled DMZ 20

Other Intermediate Systems Firewall General term for hardware, software, or combination used to protect internal network from intruders. Uses packet filtering to enforce generic security policies Uses application level proxy servers to enforce protocol-specific polices Packet filter Control based on something in packet headers (e.g., IP addresses or port numbers) Application level proxy Control based on knowledge of application level protocol (.e.g, SMTP headers or HTTP methods) 21

HTTP State Management: Cookies We said earlier that HTTP is a stateless protocol We also said that stateful protocols can provide improved performance. This feature is usually established by the idea of a session between client and server. So, cookies enable HTTP sessions 22

Cookies Cookie protocol - RFC 2109 A cookie is a token given to a client by a server Server sends Set-cookie: <cookie> header in a response Client associates <cookie> with the server that sent it The cookie a sequence of name/value pairs Each cookie has a unique name 23

Cookie Fields NAME=VALUE REQUIRED. The name of the "cookie" is NAME, and its value is VALUE. Domain=value OPTIONAL. The Domain attribute specifies the domain for which the cookie is valid. Path=value OPTIONAL. The Path attribute specifies the subset of URLs on the origin server to which this cookie applies. Secure OPTIONAL. The Secure attribute directs the user agent to use only secure means to contact the origin server whenever it sends back this cookie. Version=value REQUIRED. The Version attribute identifies the version of the 24 state management specification to which the cookie conforms.

Example Cookies Origin server domain name Path Secure Name Value.google.com / FALSE PREF ID=3e9b22dc195e9901:LD=en:NR=50: TM=1027083506:LM=1061947174 :S=SOI90sazZHxYdFy4.intellicast.com / FALSE RMID 426cdd9b3ed8ad10 smallbusiness.yahoo.com /webhosting/ FALSE bmcpromocode 1 12.46.120.19 / FALSE HASBRO_ID 66.108.222.128-70824240.29582435: :863790A4DC04E40567FF2D0CF4145723 25

Client-server Interaction: Cookies server sends cookie to client in response message Set-cookie: 1678453 client presents cookie in later requests Cookie: 1678453 server matches presentedcookie with server-stored info authentication remembering user preferences, previous choices client usual http request msg usual http response + Set-cookie: # usual http request msg cookie: # usual http response msg usual http request msg cookie: # usual http response msg server cookiespectific action cookiespectific action 26