WEB2P security Java web application security Dr Jim Briggs.

Slides:



Advertisements
Similar presentations
Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
Advertisements

Forms Authority Database Store Username and Passwords: ASP.NET framework allows you to control access to pages, classes, or methods based on username and.
Cryptography Chapter 7 Part 4 Pages 833 to 874. PKI Public Key Infrastructure Framework for Public Key Cryptography and for Secret key exchange.
The Basic Authentication Scheme of HTTP. Access Restriction Sometimes, we want to restrict access to certain Web pages to certain users A user is identified.
Understanding WebLogic Security
Web Application Security SSE USTC Qing Ding. Agenda General security issues Web-tier security requirements and schemes HTTP basic authentication based.
Http Web Authentication Web authentication is used to verify a users identity before allowing access to certain web pages On web browsers you get a login.
Authentication and Security Joshua Scotton.  Sessions  Login and Authentication.
Securing web applications using Java EE Dr Jim Briggs 1.
Holding slide prior to starting show. Supporting Collaborative Working of Construction Industry Consortia via the Grid - P. Burnap, L. Joita, J.S. Pahwa,
6/3/2015topic1 Web Security Qiang Yang Simon Fraser University Thanks: Francis Lau (HKU)
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
User and Security Management. Security Management in Web Applications.
Blackboard Building Blocks Authentication Overview Tuesday, June 30, 2015 Tom Joyce, Product Manager, Platform Architecture & Database.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Web Site Security Representation and Management of Data on the Web.
Web programming for project students Dr Jim Briggs.
SSL (Secure Socket Layer) and Secure Web Pages Rob Sodders, University of Florida CIS4930 “Advanced Web Design” Spring 2004
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP does not maintain state. State Information can be passed using: HTTP Headers.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Session 11: Security with ASP.NET
Cookies Set a cookie – setcookie() Extract data from a cookie - $_COOKIE Augment user authentication script with a cookie.
Remotely authenticating against the Service Framework.
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
Hyrax Architecture Two cooperating processes: –Front-end provides DAP interface –Back-end reads data Both parts can be customized –Front-end: different.
HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel Copyright Springer Verlag Berlin Heidelberg 2004.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Implementing ISA Server Publishing. Introduction What Are Web Publishing Rules? ISA Server uses Web publishing rules to make Web sites on protected networks.
© D. Wong  Indexes  JDBC  JDBC in J2EE (Java 2 Enterprise Edition)
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Securing a Microsoft ASP.NET Web Application.
1 Web services and security ---discuss different ways to enforce security Presenter: Han, Xue.
COMP3121 E-Commerce Technologies Richard Henson University of Worcester November 2011.
SSL, Single Sign On, and External Authentication Presented By Jeff Kelley April 12, 2005.
SE-2840 Dr. Mark L. Hornick1 Web Application Security.
C HAPTER 12 W EB APP SECURITY. T HE BAD GUYS ARE EVERYWHERE As a web application developer you need to protect your web site There are three main kind.
Oracle Application Express Security. © 2009 Oracle Corporation Authentication Out-of-the-Box Pre-Configured Schemes LDAP Directory credentials Oracle.
Running Jakarta/Tomcat CIT304/CSE301 University of Sunderland Harry R. Erwin, PhD.
SE-2840 Dr. Mark L. Hornick1 Web Application Security.
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
Department of Computer Science & Engineering San Jose State University
Module 11: Securing a Microsoft ASP.NET Web Application.
Web Database Programming Week 7 Session Management & Authentication.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
UMBC’s WebAuth Robert Banz – UMBC
Insee survey data response websites The « entreprises.insee.fr » portal Insee at businesses’ service.
PHP Secure Communications Web Technologies Computing Science Thompson Rivers University.
1 Web Programming with Servlets & JSP ASSIGNMENT GUIDELINE.
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
Access control 2/18/2009. TOMCAT Security Model Declarative Security:  the expression of application security external to the application, and it allows.
February, TRANSCEND SHIRO-CAS INTEGRATION ANALYSIS.
© Copyright 2009 SSLPost 01. © Copyright 2009 SSLPost 02 a recipient is sent an encrypted that contains data specific to that recipient the data.
Slide 1 Web Application Security ©SoftMoore Consulting.
15 Copyright © 2004, Oracle. All rights reserved. Adding JAAS Security to the Client.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
COEN 350: Network Security E-Commerce Issues. Table of Content HTTP Authentication Cookies.
Securing Web Applications Lesson 4B / Slide 1 of 34 J2EE Web Components Pre-assessment Questions 1. Identify the correct return type returned by the doStartTag()
CS520 Web Programming Declarative Security (I) Chengyu Sun California State University, Los Angeles.
Daniel Doubrovkine (dblock[at]dblock[dot]org) Single Sign-On w/ Tomcat & WAFFLE 6/8/2010 Tomcat -> Waffle ->
Communication protocols 2. HTTP Hypertext Transfer Protocol, is the protocol of World Wide Web (www) Client web browser Web server Request files Respond.
Setting and Upload Products
Chapter 5 Electronic Commerce | Security Threats - Solution
CAS and Web Single Sign-on at UConn
4166 Review.
Jim Fawcett CSE686 – Internet Programming Summer 2005
Chapter 5 Electronic Commerce | Security Threats - Solution
IBM Certified WAS 8.5 Administrator
Security in Web Applications
CS5220 Advanced Topics in Web Programming Secure REST API
Presentation transcript:

WEB2P security Java web application security Dr Jim Briggs

WEB2P security What is security? Usually ensuring that only authorised users can access specific parts of a website Security has two basic concepts: –authentication: who is it? –authorisation: what can they do?

WEB2P security Categories of security mechanism Container-managed (e.g. Tomcat) –Specified as part of the Java Servlet Specification –However, the implementation is container specific (and therefore not necessarily portable between containers) Application-managed –Independent of the container –However, you have to write the code yourself (or use some other mechanism)

WEB2P security HTTP authentication HTTP provides for authentication - see RFC 2617 Operates on a challenge/response paradigm: –Server receives a request for an access-protected object –Server responds with a "401 Unauthorized" status code –Client must then resend the request with an Authorization header –Most browsers will prompt the user for a username and password Most browsers cache this for the duration of the browser session Some will allow the user to save it between sessions Distinction between Basic Authentication and Digest Authentication: –Basic passes usernames and passwords in clear text (actually in Base64 format, but this is easily translatable) –Digest scrambles the password by sending a checksum (by default, MD5) of the username, the password, a given nonce value, the HTTP method, and the requested URI. The nonce value is sent by the server with the 401 response. Realm is the zone of security –Effectively the store against which credentials are checked

WEB2P security Mechanisms for securing Java web applications Fundamentals Container-managed techniques Application-managed techniques Mix and match

WEB2P security Fundamentals HTTP authentication Secure Sockets Layer (SSL) HTTP over SSL (HTTPS) –See how to set this up in Apache –See how to set this up in Tomcat –Unlikely to need latter if using Tomcat as auxiliary server (especially via AJP)

WEB2P security Container-managed security Security constraints in web.xml file –Authentication –Authorization –Secure transport

WEB2P security Authentication BASIC FORM /login.jsp /fail_login.html

WEB2P security Authorization Admin /admin/* private

WEB2P security Secure transport... CONFIDENTIAL

WEB2P security Authentication methods Basic - uses HTTP Basic Authentication Digest - uses HTTP Digest Authentication Form - presents a login form to the user Client certificate - requires digital certificate from client

WEB2P security Tomcat realms MemoryRealm –a file (tomcat-users.xml) in the TOMCAT/conf directory JDBCRealm –specify tables and columns of a database that contain usernames, passwords and roles DataSourceRealm –similar, but using a JNDI-named DataSource rather than a specific JDBC driver JNDIRealm –looks up users in an LDAP directory server accessed by a JNDI provider JAASRealm –authenticates users through the Java Authentication & Authorization Service (JAAS) framework

WEB2P security Application-managed security 1 Request properties: –request.getRemoteUser() –request.getUserPrincipal() –request.isUserInRole(role) Use session attributes to store the user's identity Use cookies to store username and password (can be persistent between browser sessions)

WEB2P security Application-managed security 2 Use a security filter Use a base servlet Use a custom JSP tag –forward request to a login page if the user is not logged in or does not have authorisation) Struts facilities: –Use Struts roles (each action has a roles attribute) –Customise the Struts RequestProcessor specifically the method processPreprocess –Use a Struts Base Action

WEB2P security Mix and match Many of the techniques can be used in combination SecurityFilter (from Sourceforge.net) is an application-managed mechanism that mimics container-managed security