Authentication & Authorisation Is the user allowed to access the site?

Slides:



Advertisements
Similar presentations
A digression The next feature of programming HTTP clients that we will consider is user authentication Before considering that, however, we will digress.
Advertisements

Parameter Tampering. Attacking the Ecommerce Shopping Cart In the above image we see that a user who wants to purchase a Television visits an online Store.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
6/3/2015topic1 Web Security Qiang Yang Simon Fraser University Thanks: Francis Lau (HKU)
Introduction To Windows NT ® Server And Internet Information Server.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
Web Proxy Server Anagh Pathak Jesus Cervantes Henry Tjhen Luis Luna.
SSL (Secure Socket Layer) and Secure Web Pages Rob Sodders, University of Florida CIS4930 “Advanced Web Design” Spring 2004
Setting up in Outlook Express. Select “Tools” from the toolbar menu.
New School Websites Teacher Pages. Visit the SCUSD Website for videos tutorials: For more information.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Cookies Set a cookie – setcookie() Extract data from a cookie - $_COOKIE Augment user authentication script with a cookie.
Class 8Intro to Databases Authentication and Security Note: What we discuss in class today covers moderate to low security. Before you involve yourself.
How to create an account on. Open a web browser (e.g. Mozilla Firefox or Internet Explorer) and type in the address bar, then press.
Copyright 2000 eMation SECURITY - Controlling Data Access with
How KeePass password safe can save you time and energy
ZanderMail Agent And wireless software development - Introduction -WAP Architecture - Architechture (basis) - Security - Implememtation ZanderMail Development.
A little PHP. Enter the simple HTML code seen below.
Set 13: Web Servers (configuration and security) (Chapter 21) IT452 Advanced Web and Internet Systems.
This tip sheet focuses on the elements required to access SMART. Total Pages: 5 Accessing SMART Logging In Agency/Facility/Program Access Logging Out IGSR.
Feedback #2 (under assignments) Lecture Code:
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
Prof Frankl, Spring 2008CS Polytechnic University 1 Overview of Web database applications with PHP.
ITCS373: Internet Technology Lecture 5: More HTML.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
Web Database Programming Week 7 Session Management & Authentication.
Cookies and Sessions IDIA 618 Fall 2014 Bridget M. Blodgett.
1 Building FORMS In When a visitor enters information into a web form displayed in a web browser and clicks the submit button, the information is sent.
PHP-based Authentication
Telnet allows you to log in remotely to other computers connected to the Internet (but only computers that are set up to be logged in to). Once logged.
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP Headers Client IP Address HTTP User Login FAT URLs Cookies.
PHP Secure Communications Web Technologies Computing Science Thompson Rivers University.
ARMS Advanced Risk Management System User Documentation.
1 Mezzanine Ware (Pty) Ltd © 2014 Installing\Uninstalling the Mezzanine Helium Android application.
Web Technology – Web Server Setup : Chris Uriarte Meeting 4: Advanced Topics, Continued: Securing the Apache Server and Apache Performance Tuning Rutgers.
SESSIONS 27/2/12 Lecture 8. ? Operator Similar to the if statement but returns a value derived from one of two expressions by a colon. Syntax: (expression)
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.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
COOKIES AND SESSIONS.
LINUXCHIX WEBMAIL. Software run by an ISP or online service that provides access to send, receive, and review using only your Web browser. Users.
How to Make Yourself More Secure Using Public Computers and Free Public Wi-Fi.
Setting and Upload Products
Tonga Institute of Higher Education IT 141: Information Systems
Unit 7 Learning Objectives
Section 6.3 Server-side Scripting
Authentication & .htaccess
Creating an Account on Wikieducator
Assess Survey Invitations
ITM 352 Cookies.
Uses Uses of cryptography Lab today on RSA
Networks Problem Set 1 Due Oct 3 Bonus Date Oct 2
Web Programming Language
Web Server Design Week 11 Old Dominion University
Using SSL – Secure Socket Layer
7 Steps to Set Up AT&T on MS Outlook | Customer Support Number
Topic 5: Communication and the Internet
Security in Web Applications
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.
Tonga Institute of Higher Education IT 141: Information Systems
Web Servers / Deployment
Tonga Institute of Higher Education IT 141: Information Systems
Access eJournals Form Your Home
Web Server Design Week 11 Old Dominion University
Web Server Design Week 11 Old Dominion University
Web Programming Language
PHP-II.
Presentation transcript:

Authentication & Authorisation Is the user allowed to access the site?

October 2012Web Programming2 Restricting access to a page ● Is the user who they say they are? – Did they enter the right username and password? ● Is the user (even if authenticated) allowed to access this page? – Some pages may only be for certain people

October 2012Web Programming3 Two basic methods ● The HTTP level – is user allowed to see this page? ● The server-side script code – is user allowed (e.g.) to access this database, or to access it in this way? – May have: ● UID and password for page ● UID and password for database ● They may be different (and are, for example, in my csmanagegames.php for the assignment)

October 2012Web Programming4 Server side possibilities 1)Everyone can see the page; server side script accesses the DB on user's behalf with a non-specific account (e.g. cs- guest) 2)Page is restricted; if page is accessed, assume it's OK to access DB (using a non-specific account) 3)Page access is not restricted, but you need to give a UID/password to access the DB (e.g. using a form) 4)Both page and DB access are restricted (unnecessary effort?)

October 2012Web Programming5 How it's done ● Systems tend to restrict page access but then allow free DB access (option 2) – Database passwords can then be in the script – But the identity of the person who accessed the database is more difficult to trace ● How I did it for csmanagegames.php was via one database account (mine!), but restricting to read only unless user was logged in to the page (with a session) – if statements to control who sees what

October 2012Web Programming6 Who is this user? ● The normal way for authenticating a user is UID/password ● Other technologies exist (e.g. new ones such as fingerprinting, iris scanning, etc); card readers for online banking ● Used with sessions to maintain a login (so user doesn't have to repeat password for each page)

October 2012Web Programming7 HTTP level authentication ● Response from server can be “401 Authorization required” – Has a “WWW-authenticate” header – browsers (normally) handle this by popping up a box ● Request can have an “Authorization” header field – details from the pop-up (UID/password) – If OK, server will send the page

October 2012Web Programming8 On Apache ●.htaccess file AuthType Basic AuthName "Personal stuff" AuthUserFile /aber/ais/myfriends Require valid-user

October 2012Web Programming9 Script based authentication ● Instead of relying on HTTP and browsers to request the authentication data, use a script ● Use an XHTML form ● Keep usernames and associated password in a database ● Database will typically have just two columns: user ID and password ● Passwords are normally encrypted to the database (see later for HTTPS)

October 2012Web Programming10 Script based authentication 2 1.Generate form page 2.Get UID and password (from POST method – don't use GET!) 3.Encrypt the password (PHP has functions to do this) SELECT username from passwordtable WHERE userid=givenuserid AND password=encryptedpassword

October 2012Web Programming11 HTTP authentication - pros/cons  Easy – just write a config file  Browsers provide standard prompting  Browsers remember passwords  Can only have one login at a time (that's all the HTTP headers will send) – not nested

October 2012Web Programming12 For high security Browsers remember passwords! This is a big problem where high security is required. There are two ways to overcome this ● – You're trusting the browser to recognise and obey the autocomplete attribute ● For top security, allow user to select from a dropdown menu – this will also help foil keyloggers, e.g. (next page)

October 2012Web Programming13 Top security for internet banking Using some sort of password field, plus a dropdown selection like this, gives about as good a security as possible

October 2012Web Programming14 Browsers remember other things too ● Like credit card numbers ● And account names – Even knowing a bank account number can be useful to a criminal, or... – Did you really want your partner to know that you had an account called “KinkySlaveboy” on some dodgy site? ● Use the autocomplete="off" attribute whenever appropriate

October 2012Web Programming15 Database authentication ● Not so important now, as we can restrict access to the scripts that access the database. ● But one warning: if your password is a string in your PHP code, other people might just manage to get to read it! – How? Consider exploits we've looked at before, or maybe simply looking over your shoulder when you're editing the script.

October 2012Web Programming16 IP restriction ● Server and server-side scripts can see the IP address of a request ● Can limit access on this basis – e.g. some BBC pages are restricted to IP addresses that are registered as being in the UK ● But hackers can get around this ● And genuine users may have a problem with their own machine, so try to use another

October 2012Web Programming17 Snooping ● Passwords must be in requests ● Authorisation field is not encrypted ● Form field data are not encrypted ● Answer: SSL; it's a secure and encrypted connection ● URLs use it – HTTP operates, but the messages are encrypted, checked for tampering and for known origin ● Details are a comms issue (i.e. not CS25010) – But if you're interested, check this: –