VIRTUAL HOSTING FEATURES IN GLASSFISH. Jan Luehe Sun Microsystems, Inc.



Similar documents
create-virtual-server creates the named virtual server

Sun Access Manager CAC Authentication Deployment Configuration Guide

Crawl Proxy Installation and Configuration Guide

Technical White Paper - JBoss Security

Working With Virtual Hosts on Pramati Server

Learning GlassFish for Tomcat Users

Secure Messaging Server Console... 2

LICENSE4J AUTO LICENSE GENERATION AND ACTIVATION SERVER USER GUIDE

Configuring Nex-Gen Web Load Balancer

Apache Server Implementation Guide

Single Sign On. Configuration Checklist for Single Sign On CHAPTER

TROUBLESHOOTING RSA ACCESS MANAGER SINGLE SIGN-ON FOR WEB-BASED APPLICATIONS

App Orchestration 2.5


NGASI Shared-Runtime Manager Administration and User Guide WebAppShowcase DBA NGASI

DEPLOYMENT GUIDE Version 2.1. Deploying F5 with Microsoft SharePoint 2010

Websense Web Security Gateway: Integrating the Content Gateway component with Third Party Data Loss Prevention Applications

Xerox DocuShare Security Features. Security White Paper

1. Introduction 1.1. Project/Component Working Name: SailFin 2.0 / Converged Load Balancer

CumuLogic Load Balancer Overview Guide. March CumuLogic Load Balancer Overview Guide 1

REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER

1. Configuring the Dispatcher / Load Balancer

Setup Guide Access Manager 3.2 SP3

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP system v10 with Microsoft Exchange Outlook Web Access 2007

Magento Search Extension TECHNICAL DOCUMENTATION

Apache JMeter HTTP(S) Test Script Recorder

Use Enterprise SSO as the Credential Server for Protected Sites

IP Phone Presence Setup

Glassfish Architecture.

StreamServe Persuasion SP5 StreamStudio

Administering mod_jk. To Enable mod_jk

Asia Web Services Ltd. (vpshosting.com.hk)

Architecture and Data Flow Overview. BlackBerry Enterprise Service Version: Quick Reference

IM and Presence Service Network Setup

Security Guidelines for MapInfo Discovery 1.1

AVG Business SSO Connecting to Active Directory

How To Use Netiq Access Manager (Netiq) On A Pc Or Mac Or Macbook Or Macode (For Pc Or Ipad) On Your Computer Or Ipa (For Mac) On An Ip

Cloud Services. Introduction...2 Overview...2. Security considerations Installation...3 Server Configuration...4

TECHNICAL NOTE Stormshield Network Firewall AUTOMATIC BACKUPS. Document version: 1.0 Reference: snentno_autobackup

NEFSIS DEDICATED SERVER

Configuring Single Sign-On for Documentum Applications with RSA Access Manager Product Suite. Abstract

Configuration Worksheets for Oracle WebCenter Ensemble 10.3

CA SiteMinder Secure Proxy Server

Enabling single sign-on for Cognos 8/10 with Active Directory

Semantic based Web Application Firewall (SWAF - V 1.6)

AVG Business Secure Sign On Active Directory Quick Start Guide

Setting Up a Unisphere Management Station for the VNX Series P/N Revision A01 January 5, 2010

NETASQ ACTIVE DIRECTORY INTEGRATION

Installation & Configuration Guide

Enabling Kerberos SSO in IBM Cognos Express on Windows Server 2008

ShoreTel Advanced Applications Web Utilities

EQUELLA. Clustering Configuration Guide. Version 6.0

SSL VPN Server Guide. Access Manager 3.2 SP2. June 2013

Deploying F5 to Replace Microsoft TMG or ISA Server

Deploying the BIG-IP System v10 with Oracle Application Server 10g R2

Deploying System Center 2012 R2 Configuration Manager

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

APACHE WEB SERVER. Andri Mirzal, PhD N

Setup Guide Access Manager Appliance 3.2 SP3

PowerLink for Blackboard Vista and Campus Edition Install Guide

ADOBE CONNECT ENTERPRISE SERVER 6

Tenrox and Microsoft Dynamics CRM Integration Guide

DameWare Server. Administrator Guide

F-Secure Internet Gatekeeper

Name Services (DNS): This is Quick rule will enable the Domain Name Services on the firewall.

How to Configure Active Directory based User Authentication

Technical Publications

Chapter 6 Virtual Private Networking Using SSL Connections

Configure ActiveSync with a single Exchange server (Exchange sync for an iphone)

How To Connect A Gemalto To A Germanto Server To A Joniper Ssl Vpn On A Pb.Net 2.Net (Net 2) On A Gmaalto.Com Web Server

ThinkTel ITSP with Registration Setup Quick Start Guide

Upgrading VMware Identity Manager Connector

Introductions. Christopher Cognetta Practice Manager Client Field Engineering Microsoft Dynamics CRM MVP

1. Introduction 2. Getting Started 3. Scenario 1 - Non-Replicated Cluster 4. Scenario 2 - Replicated Cluster 5. Conclusion

SSL VPN Server Guide Access Manager 3.1 SP5 January 2013

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

Apache Tomcat. Load-balancing and Clustering. Mark Thomas, 20 November Pivotal Software, Inc. All rights reserved.

Single Sign On. Configuration Checklist for Single Sign On CHAPTER

OpenSRS Service DNS Configuration Guide


Abila MIP Mobile. System Requirements

Websense Content Gateway v7.x: Troubleshooting

WHITE PAPER Citrix Secure Gateway Startup Guide

Revision ORACLE CORPORATION. Application Server Deployment Architecture Series. Using Web Cache as Reverse Proxy

Sametime Version 9. Integration Guide. Integrating Sametime 9 with Domino 9, inotes 9, Connections 4.5, and WebSphere Portal

fåíéêåéí=péêîéê=^çãáåáëíê~íçêûë=dìáçé

INTEGRATE SALESFORCE.COM SINGLE SIGN-ON WITH THIRD-PARTY SINGLE SIGN-ON USING SENTRY A GUIDE TO SUCCESSFUL USE CASE

DEPLOYMENT GUIDE Version 1.1. Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5

Deploying the BIG-IP LTM with. Citrix XenApp. Deployment Guide Version 1.2. What s inside: 2 Prerequisites and configuration notes

Secure Web Appliance. Reverse Proxy

How To Guide. SIP Trunking Configuration Using the SIP Trunk Page

Web Server Configuration Guide

IM and Presence Service Network Setup

Intellicus Cluster and Load Balancing (Windows) Version: 7.3

<Insert Picture Here> Oracle Web Cache 11g Overview

Forward proxy server vs reverse proxy server

Single Sign-on (SSO) technologies for the Domino Web Server

Session Service Architecture

Hosted Connecting Steps Client Installation Instructions

GlassFish Security. open source community experience distilled. security measures. Secure your GlassFish installation, Web applications,

Transcription:

VIRTUAL HOSTING FEATURES IN GLASSFISH Jan Luehe Sun Microsystems, Inc. 1

Agenda Virtual hosting concepts Root context configuration choices Security Access logging Customization features Dynamic reconfiguration Isolation Q&A 2

Virtual Hosting: How does it work? Refers to the ability to run several web sites (domains) from a single physical server machine with a single IP address Also known as Shared IP Hosting Each web site is identified by its domain (host) name HTTP requests are routed to the appropriate domain, based on the host name in their URL DNS must be configured in such a way that each hosted domain name resolves to the server's IP address Enables ISP/ASP business models 3

Example http://mydomain.com:1024/ http://yourdomain.com:1024/ mydomain.com and yourdomain.com are virtual server (host) names that resolve to the same IP address The HTTP listener on port 1024 dispatches incoming requests to the appropriate virtual server, based on the host name of the request URL mydomain.com and yourdomain.com may share the same HTTP port(s) (as in this example), or use different ports 4

Virtual Servers and HTTP Listeners A <virtual-server> receives requests from only those HTTP listeners listed in its http-listeners attribute An <http-listener> knows about the virtual servers that it is supposed to dispatch to If an <http-listener> receives a request with an unknown host name, it dispatches the request to the virtual server referenced by its default-virtualserver attribute 5

Example: Virtual Servers and HTTP Listeners Protocol Domain Name Port Number URL Prefix Target Virtual Server http mydomain.com 1111 http://mydomain.com:1111 vs-1 https mydomain.com 2222 https://mydomain.com:2222 vs-1 http yourdomain.com 3333 http://yourdomain.com:3333 vs-2 https yourdomain.com 4444 https://yourdomain.com:4444 vs-2 6

Example (cont.): Virtual Servers and HTTP Listeners <http-listener id="http-listener-1" port="1111"/> <http-listener id="http-listener-2" port="2222" securityenabled="true"/> <http-listener id="http-listener-3" port="3333"/> <http-listener id="http-listener-4" port="4444" securityenabled="true"/> <virtual-server id="vs-1" hosts="mydomain.com" http-listeners="http-listener-1,http-listener-2"/> <virtual-server id="vs-2" hosts="yourdomain.com" http-listeners="http-listener-3,http-listener-4"/> 7

Virtual Server States A virtual server may be in one of 3 states: > on (default) > off Any requests mapped to the virtual server will result in 404 responses > disabled Any requests mapped to the virtual server will result in 403 responses A virtual server's state is configured via the state attribute of <virtual-server> in domain.xml 8

Root Context Configuration Choices A virtual server's root context is defined as the context with the empty path (/) Any requests that cannot be mapped to any of the web modules deployed on a virtual server will be mapped to the virtual server's root context GlassFish supports the following root context configuration choices: > Docroot > Default web module > Alternate docroots 9

docroot Specifies the physical location of a virtual server's root context Specified via the virtual server's "docroot" attribute and property Every virtual server may be configured with its own individual docroot 10

Example: docroot <virtual-server hosts="mydomain.com" docroot="${com.sun.aas.instanceroot}/docroot"/> http://mydomain.com/ Contents of ${com.sun.aas.instanceroot}/docroot/index.html 11

Default Web Module Makes it possible to map a virtual server's root context to one of its deployed web modules Convenient way for having a single web module occupy both its designated context root as well as the virtual server's root context "Shadows" the virtual server's docroot (that is, the docroot is ignored for as long as the default web module is in place) When the default web module is no longer in place, the virtual server's docroot is reinstantiated as the virtual server's root context Specified via the "default-web-module" attribute of <virtual-server> 12

Example: Default Web Module <virtual-server default-web-module="abc" hosts="mydomain.com" /> <web-module context-root="abc" location="${com.sun.aas.instanceroot}/applications/j2eemodules/abc" name="abc"/> http://mydomain.com/ http://mydomain.com/abc/ Contents of ${com.sun.aas.instanceroot}/applications/j2ee-modules/abc/index.html 13

Alternate Docroots In GlassFish, a virtual server may specify alternate docroots in addition to its main docroot Each alternate docroot is associated with one or more URL patterns An alternate docroot is selected over the main docroot if the request matches one of its URI patterns Both path (prefix) and extension matches are supported If a request matches multiple alternate docroot URL patterns, the following precedence order is used: > Exact match > Longest path match > Extension match Alternate docroots allow virtual servers to share a subset of their 14

Example: Alternate Docroots <virtual-server id="server" [...]> <property name="alternatedocroot_1" value="from=/images/* dir=/usr/gifs"/> <property name="alternatedocroot_2" value="from=*.jpg dir=/usr/gifs"/> <property name="alternatedocroot_3" value="from=*.jsp dir=/usr/jsps"/> <property name="docroot" value="${com.sun.aas.instanceroot}/docroot"/> </virtual-server> 15

Security Single Sign On (SSO) Authentication realms 16

Security: Single Sign on (SSO) Enables web applications to share client authentication state Configured via virtual server's "sso-enabled" property When enabled, any user who successfully authenticates to any one web application becomes implicitly logged in to any other web application deployed on the same virtual server that shares the same authentication realm 17

Security: Authentication Realm Webapps that require authentication specify the name of an authentication realm Authentication realm may be specified at virtual server level (via "authrealm" property), with the expectation that it apply to all web modules deployed on the virtual server Referenced authentication realm must exist in domain.xml Standalone web modules inherit the authentication realm of their virtual server, unless they specify their own 18

Access Logging Every virtual server has its own individual access log file Access logging may be configured via a combination of the following elements in domain.xml: > ${appserver.instance.name}.http-service.property.accessloggingenabled: Enables or disables access logging > ${appserver.instance.name}.http-service.access-log: Configures access log format (pattern), as well as rotation policy, interval, and suffix > ${appserver.instance.name}.http-service.virtual-server.[vs].http-access-log: Configures access log file location, and whether to log the client's IP address or DNS name > ${appserver.instance.name}.http-service.virtual-server.[vs].property.accesslog: Configures access log file location 19

Access Log Patterns Any combination of the following tokens may be used to specify an access log pattern in domain.xml: %auth-user-name% %client.dns% %client.name% %cookie.value% %datetime% %header.accept% %header.% %header.auth% %header.date" %header.if-mod-since% %header.user-agent% %header.referer% %http-method% %http-uri% %http-version% %query-str% %referer% %request% %response.length% %status% %user.agent% %vs.id% GlassFish also supports shortcuts for some well-known access log patterns 20

Support for Apache Access Log Formats common > http://httpd.apache.org/docs/2.2/logs.html#common > domain.xml: <http-service> <access-log format="common"/> </http-service> combined > http://httpd.apache.org/docs/2.2/logs.html#combined > domain.xml: <http-service> <access-log format="combined"/> </http-service> 21

Custom Valves and Listeners GlassFish allows custom implementations of the following interfaces to be added to any <virtualserver> in domain.xml: > org.apache.catalina.valve: Allows to intercept the request and response objects passed through the virtual server > org.apache.catalina.containerlistener: Gets notified of any web context and valve registrations with, and unregistrations from the virtual server > org.apache.catalina.lifecyclelistener: Receives notifications for any lifecycle changes of the virtual server Implementations are specified as <virtual-server> properties, using their fully qualified class names 22

Example: Custom Valves and Listeners <virtual-server id= server [...]> <property name="valve_1" value="com.sun.enterprise.myvalve"/> <property name="listener_1 value="com.sun.enterprise.mycontainerlistener"/> <property name="listener_2" value="com.sun.enterprise.mylifecyclelistener"/> </virtual-server> 23

Dynamic Reconfiguration All aspects of virtual hosting, including > the creation and deletion of virtual servers > the manipulation of virtual server attributes and properties are dynamically reconfigurable, i.e., do not require any domain restart in order to take effect 24

Profile Dependent Defaults GlassFish V2 introduces 3 profiles to better address the specific configuration requirements of various runtime environments: > developer > cluster > enterprise Profiles supersede earlier product editions Access logging and SSO are disabled by default in the developer and cluster profiles 25

Isolation If co-located on a single instance, virtual servers and the webapps deployed on them may interfere with each other: > A buggy (or malicious) webapp deployed on one virtual server may affect all other virtual servers > No "jailed manager" If isolation of virtual servers is a concern: > Create one domain for each virtual server (GlassFish V1 and V2) > Create one standalone instance, or cluster of instances, for each virtual server in a single domain (GlassFish V2) 26

Comparison with other Products GlassFish and Tomcat comparison table at: http://www.glassfishwiki.org/gfwiki/wiki.jsp? page=glassfishvstomcat GlassFish community effort: Originally started by Roger Keays, then turned into the above Wiki by Jason Lee Tomcat's Configure same webapp differently" feature is being added to GlassFish as we speak 27

Q&A 28

VIRTUAL HOSTING FEATURES IN GLASSFISH Jan Luehe jan.luehe@sun.com 29