MIS Professor Sandvig MIS 324 Professor Sandvig

Slides:



Advertisements
Similar presentations
7 Copyright © 2005, Oracle. All rights reserved. Maintaining State in J2EE Applications.
Advertisements

Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
CIS 451: ASP Sessions and Applications Dr. Ralph D. Westfall January, 2009.
6/10/2015Cookies1 What are Cookies? 6/10/2015Cookies2 How did they do that?
Chapter 10 Managing State Information Using Sessions.
What are cookies? Cookies are text files stored on one’s computer after visiting a website Used for: -Storing information such as a unique visitor ID -Allowing.
Client State Management & Application Security  Client State Management  Concept  ASP Examples  Application Security  Database Based Approach 
Chapter 10 Managing State Information PHP Programming with MySQL.
CSE 154 LECTURE 13: SESSIONS. Expiration / persistent cookies setcookie("name", "value", expiration); PHP $expireTime = time() + 60*60*24*7; # 1 week.
Chapter 10 Maintaining State Information Using Cookies.
Objectives Learn about state information
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP does not maintain state. State Information can be passed using: HTTP Headers.
 A cookie is a piece of text that a Web server can store on a user's hard disk.  Cookie data is simply name-value pairs stored on your hard disk by.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Cookies & Sessions.
Cookies Set a cookie – setcookie() Extract data from a cookie - $_COOKIE Augment user authentication script with a cookie.
CSC 2720 Building Web Applications Cookies, URL-Rewriting, Hidden Fields and Session Management.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
Working with Cookies Managing Data in a Web Site Using JavaScript Cookies* *Check and comply with the current legislation regarding handling cookies.
Session 10: Managing State. Overview State Management Types of State Management Server-Side State Management Client-Side State Management The Global.asax.
CSE 154 LECTURE 12: COOKIES. Including files: include include("filename"); PHP include("header.html"); include("shared-code.php"); PHP inserts the entire.
SSL, Single Sign On, and External Authentication Presented By Jeff Kelley April 12, 2005.
Chapter 8 Cookies And Security JavaScript, Third Edition.
12/3/2012ISC329 Isabelle Bichindaritz1 PHP and MySQL Advanced Features.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Maintaining State MacDonald Ch. 9 MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
1 Maryland ColdFusion User Group Session Management December 2001 Michael Schuler
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
ASP.NET State Management. Slide 2 Lecture Overview Client state management options Cookies Server state management options Application state Session state.
Session and Cookie Management in.Net Sandeep Kiran Shiva UIN:
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
COOKIES and SESSIONS. COOKIES A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each.
Web Database Programming Week 7 Session Management & Authentication.
Cookies and Sessions IDIA 618 Fall 2014 Bridget M. Blodgett.
CSCI 6962: Server-side Design and Programming Java Server Faces Scoping and Session Handling.
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP Headers Client IP Address HTTP User Login FAT URLs Cookies.
1 Chapter Overview Planning to Install SQL Server 2000 Deciding SQL Server 2000 Setup Configuration Options Running the SQL Server 2000 Setup Program Using.
CIS 451: Cookies Dr. Ralph D. Westfall February, 2009.
Copyright © 2006, Infinite Campus, Inc. All rights reserved. User Security Administration.
Database Access Control IST2101. Why Implementing User Authentication? Remove a lot of redundancies in duplicate inputs of database information – Your.
Cookies / Sessions Week 10 TCNJ Web 2 Jean Chu. Webpages have no memories.
MIT AITI 2004 JSP – Lecture 4 Sessions and Cookies.
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
©SoftMooreSlide 1 Cookies. ©SoftMooreSlide 2 Cookies Basic idea –web application sends a simple name/value pair to the client –when the client connects.
Active Server Pages Session - 3. Response Request ApplicationObjectContext Server Session Error ASP Objects.
Cookies and Sessions in PHP. Arguments for the setcookie() Function There are several arguments you can use i.e. setcookie(‘name’, ‘value’, expiration,
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
COOKIES AND SESSIONS.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
Cookies Tutorial Cavisson Systems Inc..
CSE 154 Lecture 20: Cookies.
19.10 Using Cookies A cookie is a piece of information that’s stored by a server in a text file on a client’s computer to maintain information about.
ITM 352 Cookies.
Maintaining State in PHP Part II - Sessions
Cookies and Sessions in PHP
What is Cookie? Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve.
MIS Professor Sandvig MIS 324 Professor Sandvig
MIS Professor Sandvig MIS 424 Professor Sandvig
HTML5 and Local Storage.
CSE 154 Lecture 22: Sessions.
CSc 337 Lecture 27: Cookies.
HTML5 and Local Storage.
Cookies A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer.
Servlet Session Tracking: Session API
MIS Professor Sandvig MIS 324 Professor Sandvig
CSc 337 Lecture 25: Cookies.
Presentation transcript:

MIS 324 -- Professor Sandvig MIS 324 Professor Sandvig 11/22/2018 Maintaining State MIS 324 Professor Sandvig

MIS 324 -- Professor Sandvig 11/22/2018 Maintaining State Client-Server Model Tools: Cookies Session Security

Client-Server Model Communication is intermittent Server needs to know “state” of each client Logged in UserID Items in cart Etc. Solution: cookies

MIS 324 -- Professor Sandvig 11/22/2018 Cookies Created by server (us) Stored on user’s computer Included with each subsequent request

Cookies Persist between sessions

MIS 324 -- Professor Sandvig 11/22/2018 Cookies Write: Single value per cookie: Response.Cookies[“Name”].Value = “Bart”; Multiple values per cookie Response.Cookies[“Name”][“First”] = “Bart”; Response.Cookies[“Name”][“Last”] = “Simpson”; Read Request.Cookies[“Name”].Value; Request.Cookies[“Name”][“First”].Value;

MIS 324 -- Professor Sandvig 11/22/2018 Cookies Expiration: Default: when browser is closed Response.Cookies[“CookieName”].Expires = DateTime.Now.AddDays(180); Delete Cookie: set expiration to past (-1)

MIS 324 -- Professor Sandvig 11/22/2018 Cookies Testing for cookie Attempt to read a cookie that is not present: Error: Object reference not set to an instance of an object Solution: If (Request.Cookies[“Name”] != null) { //safe to read cookie name = Request.Cookies[“Name”] .Value; }

Cookies Amazon.com

Cookies User can block Chrome Can’t do much…

Cookies Gmail

MIS 324 -- Professor Sandvig 11/22/2018 Cookies Benefits: Persist between sessions Keep track of usernames, last visit, etc. Easy to use Drawbacks: Client can block Not secure Example: output (see handout for source)

MIS 324 -- Professor Sandvig 11/22/2018 2. Sessions Data stored on server Server create unique session ID for each user Session data stored in server memory Create: Session[“LastName”] = “Simpson”; Delete Session.Abandon; – Deletes the session Session.Remove[“LastName”]; – removes items

Sessions Uses cookie to pass SessionID with each request User must have cookies enabled Class example view with Chrome developer tools:

MIS 324 -- Professor Sandvig 11/22/2018 Sessions Expiration Default: 20 minutes Session.Timeout = 60; Benefits Secure Client cannot view, edit, delete Automatic timeout Drawbacks Do not persist Require cookies Use server resources

Security Session hijacking Thief steals sessionID Session Hijacking Cookie Hijacking Thief steals sessionID Impersonates user Session Hijacking

Security Solution SSL Browser IDs server Encrypts all data

Security Require SSL for project - easy Add to Global.asax GlobalFilters.Filters.Add(new RequireHttpsAttribute()); Not in MIS 324 Too many issues with Visual Studio in labs

MIS 324 -- Professor Sandvig 11/22/2018 Summary Two options for maintaining state: Cookies Text stored by browser Passed with each request Persists between sessions Sessions Data stored in server memory Secure Auto timeout Depends upon cookies for SessionID