Running Jakarta/Tomcat CIT304/CSE301 University of Sunderland Harry R. Erwin, PhD.

Slides:



Advertisements
Similar presentations
Hyrax Installation and Customization ESIP ‘08 Summer Meeting Best Practices in Services and Data Interoperability Dan Holloway James Gallagher.
Advertisements

Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
20-753: Fundamentals of Web Programming 1 Lecture 11: Web Server Case Study Fundamentals of Web Programming Lecture 11: Web Server Case Study.
WEB2P security Java web application security Dr Jim Briggs.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Installing JDK and Tomcat Vijayan Sugumaran Department of DIS Oakland University.
Installing JDK and Tomcat Vijayan Sugumaran Department of DIS Oakland University.
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Apache Tomcat Representation and Management of Data on the Web.
DT211/3 Internet Application Development Web Servers.
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
Tomcat Configuration A Very, Very, Very Brief Overview.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Java Servlets and JSP.
Apache Jakarta Tomcat Suh, Junho. Road Map Tomcat Overview Tomcat Overview History History What is Tomcat? What is Tomcat? Servlet Container.
APACHE SERVER By Innovationframes.com »
Softsmith Infotech Installing and Configuring Tomcat.
Project Implementation for COSC 5050 Distributed Database Applications Lab1.
Tomcat Celsina Bignoli History of Tomcat Tomcat is the result of the integration of two groups of developers. – JServ, an open source.
Intro to Servlets Lec 26. Web-Based Enterprise Applications in Java Figure shows a simplified view of one application and its layers.
Amazon EC2 Quick Start adapted from EC2_GetStarted.html.
Hyrax Installation and Customization Dan Holloway James Gallagher.
Server-Side Development Basics Harry R. Erwin, PhD University of Sunderland CIT304/CSE301.
Using Opal to deploy a real scientific application as a Web service Sriram Krishnan
Installing and Configuring Tomcat A quick guide to getting things set up on Windows.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
Apache Tomcat Web Server SNU OOPSLA Lab. October 2005.
Eucalyptus Virtual Machines Running Maven, Tomcat, and Mysql.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Applets & Servlets.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Web Applications Harry R. Erwin, PhD University of Sunderland CIT304/CSE301.
Securing Apache and PHP
Securing Large Applications CSCI 5931 Web Security Rungang Mo, Yingying Sun.
Apache Tomcat Representation and Management of Data on the Web.
Apache + Tomcat. Apache + Tomcat Download mod_webapp.so:
Application Servers: Tomcat. What is an application server? Servlets are Java’s answer to server-side programming. Servlets are a special type of Java.
CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES LECTURE 5_1 George Koutsogiannakis/ Summer
AN OVERVIEW OF SERVLET TECHNOLOGY SERVER SETUP AND CONFIGURATION WEB APPLICATION STRUCTURE BASIC SERVLET EXAMPLE Java Servlets - Compiled By Nitin Pai.
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
K. Liu, Q. Huang, J. Xia, Z. Li, P. Lostritto, Chapter 4 How to use cloud computing?, In Spatial Cloud Computing: a practical approach, edited by.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Apache Struts RIFE Ruby on Rails Harry R. Erwin, PhD University of Sunderland CIT304/CSE301.
SE-2840 Dr. Mark L. Hornick1 Web Application Security.
Tomcat Setup BCIS 3680 Enterprise Programming. Getting Web Apps to Work  Verify that Tomcat works.  Understand how context works.  Create folders/files.
Shibboleth: Installation and Deployment Scott Cantor July 29, 2002 Scott Cantor July 29, 2002.
SE-2840 Dr. Mark L. Hornick1 Web Application Security.
Apache Security Travis Jeffries. Introduction Authentication and Authorization Strict Access Methods Defending against Attacks Bad CGI Programs Apache.
Apache Web Server Quick and Dirty Evelyn NAMARA for AfNOG 2014 (Originally by Joel Jaeggli for AfNOG 2007) ‏
Shibboleth: Installation and Deployment Scott Cantor July 29, 2002 Scott Cantor July 29, 2002.
The HTTP is a standard that all Web browsers and Web servers must speak in order for the Web portion of the Internet to work.
Installing and Configuring Tomcat SSE. Downloading Tomcat l Download url: 4.0/release/v4.1.24/bin/
Application Index/Framework Security A. Petrov, 11/21/02.
NJIT 1 Apache Tomcat (Version 6.0) THETOPPERSWAY.COM.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 10: Internet Information Services (IIS)
Day 15 Apache. Being a web server Once your system is correctly connected to the network, you could be a web server. –When you go to a web site such as.
Tomcat Setup BCIS 3680 Enterprise Programming. One-Click Tomcat Setup 2  This semester we’ll try to set up Tomcat with a PowerShell script.  Preparation.
BlueDragon Editions and Advantages Lori Pacheco New Atlanta.
Apache Web Server v. 2.2 Reference Manual Chapter 2 Starting Apache.
APACHE TOMCAT WEB SERVER
Hyrax Configuration.
Apache web server Quick overview.
Module Overview Installing and Configuring a Network Policy Server
Tomcat Celsina Bignoli
Installing and Configuring Tomcat
Apache Tomcat Web Server
Introduction to JBoss application server
Installing Tomcat.
APACHE WEB SERVER.
Presentation transcript:

Running Jakarta/Tomcat CIT304/CSE301 University of Sunderland Harry R. Erwin, PhD

Resources Brittain and Darwin, 2003, Tomcat: the Definitive Guide, O’Reilly. Kurniawan and Deck, 2004, How Tomcat Works, BrainySoftware.com. Knuckles and Yuen, 2005, Web Applications: Concepts and Real World Design, Wiley. Nakhimovsky and Myers, 2004, Google, Amazon and Beyond, Apress.

Introduction The purpose of this lecture is to discuss how to set up and run a web application using Jakarta Tomcat. –Getting started –Configuring Tomcat –Deploying web applications –Integrating with Apache –Tomcat security –Configuration files If you manage web application development, this is what your programmers will be doing.

How Servlet Containers Work Servlet containers handle requests for service by… –Creating a request object and populating it with appropriate information. –Creating a response object that can be used to produce the response to the requester. –Calling a service method to translate the request object data to the response object.

Tomcat and Catalina Tomcat is the web server catalina is the servlet container in Tomcat catalina has two main modules: –A connector to connect the request to the container. It constructs the request object and the response object. –A container, which actually services the request.

Getting Started with Tomcat Installing –Download and run the compiled binary (you will need Java). Don’t compile Tomcat from source. Starting, stopping, and restarting –There are nine scripts, but you can get by with startup.sh (.bat) and shutdown.sh (.bat). Restarting is flaky, because you may have unhalted Java processes around. Run them to ground and gun them before you start up again.

Configuring Tomcat Using Apache –Tomcat can run standalone or with Apache. Both are common and appropriate in various situations. Managing web application security –You have two alternatives: Container-managed security Application-managed security –Users, passwords, and roles are managed by realm in container-managed security. –Your application has to handle login, etc., in application-managed security.

Configuration Options Controlling sessions –A session is a single browser instance –Sessions can persist through a server shutdown Accessing resources –JNDI and JDBC are available Using CGI –Yes, you can use CGI with Tomcat Tomcat admin application –A web-based application that automates most of this.

Deploying A Web Application Layout of an application –This is standardized—see the next slide Manual or automatic deployment –Web applications directories can be anywhere, but usually inside the Tomcat tree. You tell Tomcat about the new application using the manager application. –You can also deploy a web application automagically. The manager application automates all this. Jakarta ant can also be used.

Web Application Layout sample_webapp/ –xxx.html –yyy.jsp –zzz.other resources –WEB-INF/ web.xml classes/ –Java class files lib/ –jars and zips of class files

Integrating with Apache Sometimes you already have Apache running and you don’t want to change things. Why you might do this: –Tomcat is less mature and less known. –Fewer web server features in Tomcat –Tomcat is slower than Apache httpd Why you might not: –It’s easier to set Tomcat up standalone. –Security is better standalone. –Migration is easier. –Upgrading is easier.

Tomcat Security Security is important and Tomcat supports good security. Remember—good enough security, not perfect security. –Securing the system –Multiple security models –The chroot jail –Filtering bad input –SSL

Securing the System First, harden the operating system! Block private and internal ports: –Control port: 8005 –Connector port: 8009 –Anything else you don’t need. –Tomcat usually runs on 8080, so leave it open. If you have Apache running, you’ll need port 80 open, as well.

Multiple Security Models Watch for interactions between the Apache/IIS and Tomcat server models. They’re different. Use a connector module and isolate your Tomcat applications from Apache and IIS. You will need to edit httpd.conf and web.xml to do this. Unless you need it, disable the invoker servlet. Use Java security. It gives you fine-grained control over security policies.

The chroot Jail Unix-like operating systems can limit process access to a restricted subtree of the full directory tree. This is the chroot command. Use it! This jail is not escape-proof, but it’s pretty good. Some unix systems allow you switch the root user to some other user when you chroot. This is also good. Even if you’re using Tomcat’s built-in security features, use the chroot jail. Belt and suspenders.

Filtering Bad Input There are applications-level exploits that Tomcat generally can’t protect against. So… Never trust what users feed you. Possible exploits: –Cross-site scripting/HTTP session hijacking when unfiltered HTML input is echoed back to the user. –HTML injection –SQL injection/insertion –Command injection Most of these are controlled by input filtering, but SQL PreparedStatements help with SQL injection.

SSL Tomcat has native support for SSL, but you don’t need SSL if you’re running Tomcat behind Apache. The process of generating a server certificate is not complicated, but you will need a Certificate Authority to sign it if you don’t self-sign it. (Good browsers warn on self-signed certificates.) You will need to set up a SSL connector so Tomcat knows about the certificate.

Configuration Files server.xml –The main configuration file. web.xml –Configures servlets and web applications tomcat-users.xml –Roles, users, and passwords catalina.policy –The security policy file.

Conclusions This isn’t enough to even start to become a web applications designer—you have to read further for that. But this is enough to give insight into what the designer’s manager is responsible for.