1 / 15

Client Identification and Cookies

Client Identification and Cookies. Herng-Yow Chen. HTTP headers that carry information about user identification Client IP addressing tracking User login, using authentication to identify users Fat URLs, a technique for embedding identify in URLs

Télécharger la présentation

Client Identification and Cookies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Client Identification and Cookies Herng-Yow Chen

  2. HTTP headers that carry information about user identification Client IP addressing tracking User login, using authentication to identify users Fat URLs, a technique for embedding identify in URLs Cookies, a technique for maintaining persistent state Outline

  3. HTTP Headers

  4. Client IP Address Proxy server client server 56.41.11.4 209.172.34.56 Client-ip:56.41.11.4 X-Forwarded-For:209.172.34.56

  5. User Login GET /index.html HTTP/1.0 Host: www.joes-hardware.com (a) Internet server client (b) HTTP/1.0 401 Login Required WWW-authenticate: Basic realm="Plumbing and Fixtures" Internet server client

  6. User Login GET /index.html HTTP/1.0 Host: www.joes-hardware.com Authorization: Basic am910jrmdw4= (c) Internet server client (d) HTTP/1.0 200 OK Content-length: 4342 Content-type: text/html … Internet server client

  7. Cookie Jar: Client-Side State (a) GET /index.html HTTP/1.0 Host: www.ncnu.edu.tw Internet server client HTTP/1.0 200 OK Set-cookie: id=“34294”; domain=“www.ncnu.edu.tw” Content-type: text/html Content-length: 1903 … (b) Internet Id=34294 client Set-Cookie server (c) GET /index.html HTTP/1.0 Host: www.ncnu.edu.tw Cookie: id=“34294” Cookie Internet Id=34294 client server

  8. Different Cookies for Different Sites Can open MISE cookies in A text viewer program Name=“session-id-time“ Value=“1068624000” Domain/path=“amazon.com” Proprietary format for Other attributes Coookie Each cookie file has cookies For a particular site;the cookies Are stored in text lines,one after The other Coookie

  9. Cookie Ingredients

  10. MAME=VALUE Expires Domain Path Secure Version 0 Set-Cookie header

  11. NAME=VALUE Version Comment CommentURL Discard Domain Max-Age Path Port Secure Version1(RFC 2965) Set-Cookie2 attributes

  12. Cookies and Caching client server (a) GET / HTTP/1.0 Host: www.amazon.com (b) Http/1.1 302 Found Location: http://www.amazon.com:80/exc/obidos/subst/home/redirect.html (c) GET /exc/obidos/subst/home/redirect.html HTTP/1.0 Host: www.amazon.com HTTP/1.1 302 Found Date: Wed, 05 Nov 2003 14:05:19 GMT Set-Cookie: session-id=103-6021036-0351066; Path=/; Domain=.amazon.com; expires=Sunday, 10-Nov-2003 20:00:00 GMT Set-Cookie: session-id-time=1068624000; Path=/; Domain=.amazon.com; expires=Sunday, 10-Nov-2003 20:00:00 GMT (d)

  13. Cookies and Caching client server GET /exc/obidos/subst/home/redirect.html/103-6021036-0351066 HTTP/1.0 Host: www.amazon.com Cookie: session-id=103-6021036-0351066; session-id-time=1068624000 (e) HTTP/1.1 302 Found Date: Wed, 05 Nov 2003 14:30:55 GMT Set-Cookie: ubid-main=430-2474191-8563948; Path=/; Domain=.amazon.com; expires=Tuesday, 10-Nov-2035 20:00:01 GMT Set-Cookie: x-main="hQ...bf"; Path=/; Domain=.amazon.com; expires=Tuesday, 10-Nov-2035 20:00:01 GMT Location: http://www.amazon.com/exec/obidos/subst/home/home.html/103-6021036-0351066 (f)

  14. Cookies and Caching client server GET /exc/obidos/subst/home/redirect.html/103-6021036-0351066 HTTP/1.0 Host: www.amazon.com Cookie: session-id=103-6021036-0351066; session-id-time=1068624000; ubid-main=430-2474191-8563948; x-main="hQ...bf" (g) (h)

  15. Cookies Simon St.Laurent,McGraw-Hill http://www.ietf.org/rfc/rfc2965.txt HTTP State Management Mechanism http://www.ietf.org/rfc/rfc2964.txt Use of HTTP State Management http://home.netscape.com/newsref/std/cookie_spec.html “PERSISTENT CLIENT STATE:HTTP COOKIES“ For More Information

More Related