README.txt for JAAS Provider callerInfo Demo (JAZN-XML)
=======================================================


I. Introduction
===============

This demo illustrates the following features of JAAS Provider (JAZN):

- integration of OC4J Web Container with HTTP basic authentication.

Please refers to the README_LDAP.txt for deploying the callerInfo demo using JAZN-LDAP.


II. Configuration
=================


The demo is pre-configured to use JAZN-XML. No configuration steps are necessary
to test run the demo as is.

This JAZN data file contains a sample realm "jazndemo.com":

Realm: jazndemo.com

Users (username/password):
- manager/welcome
- developer/welcome
- anonymous (no password)

Roles:
- managers (members: manager)
- developers (members: manager, developer)

In the demo, the following security-role-mapping is predefined:

sr_manager   -> managers
sr_developer -> developers

This mapping is established in orion-application.xml. 


OC4J
-----

To deploy callerInfo into OC4J, use dcmctl. Refer to $ORACLE_HOME/dcm/README for reference.

e.g. $ORACLE_HOME/dcm/bin/dcmctl deployApplication -verbose -file $ORACLE_HOME/j2ee/home/jazn/demo/callerInfo/callerInfo.ear -application jazn -component home -t 240 

Alternatively, do the following 2 tasks:
1) $ORACLE_HOME/j2ee/home/config/server.xml:

Add this line:

	<application name="callerInfo" path="../jazn/demo/callerInfo/callerInfo.ear" />

Note that if you rebuild the demo, however, you'll need to change this line to the following:

	<application name="callerInfo" path="../jazn/demo/callerInfo/build/callerInfo.ear" />

2) $ORACLE_HOME/j2ee/home/config/default-web-site.xml (AJP + Apache) *OR* http-web-site.xml (HTTP):

Add this line:

	<web-app application="callerInfo" name="callerInfo-web" root="/jazn" />


III. Running the demo
=====================

Assuming you have all the components properly configured, you may launch 
JAZN-enabled OC4J Server (standalone-mode) in this manner:

(This example assumes you are in directory $ORACLE_HOME/j2ee/home)

> $(JAVA_HOME)/bin/java -jar oc4j.jar

There are many different ways to launch OC4J, please refer to the OC4J documentation.

After OC4J is successfully launched, you may use your favorite
browser to point to the OC4J listener:

http://myoc4j.us.oracle.com:port/jazn

and follow instructions on the web page.

For logon using the default settings (using JAZN-XML and jazn-data.xml), 
you may use the following credentials:

developer/welcome	-> assigned role "managers"	    -> mapped to "sr_manager"
manager/welcome		-> assigned role "developers"	    -> mapped to "sr_developer"

Note: see Appendix B for using Apache listener.

Appendix A: Building Instructions
=================================

Make sure you have installed Ant from Apache's Jakarta Project
(http://jakarta.apache.org/ant/index.html). Ant is a XML-based
build tool (similar to make).

Before building the demo, you may want to customize the following files:

- etc/orion-application.xml: 
	Specify your JAZN provider to XML - default is XML
	[OPTIONAL]  specify your realm name - if you have more than one realm in your configuration file
	[OPTIONAL]  specify your security-role-mapping (the default mappings reference roles defined in jazn-data.xml)
	[JAZN-XML]  specify which data file to use (default to jazn-data.xml)



Once you have Ant installed and build.xml configured, simply type the following at 
the command line (assuming you're in jazn/demo/callerInfo directory)

> ant

a new directory ("build") will be created and the .EAR and .WAR files
for callerInfo will be created there.

Note that the default OC4J config files assume that callerInfo.ear resides 
in the callerInfo directory, not the build sub-directory.



Appendix B: Configuring & Running JAZN with Apache
==================================================


mod_oc4j.conf

Add redirection info to redirect uri jazn to the oc4j home instance.
For example:

Oc4jMount /jazn/* home
Oc4jMount /jazn   home


Running the demo with Apache listener
-------------------------------------

After OC4J is successfully launched, you may use your favorite
browser to point to the Apache (where mod_osso/mod_oc4j reside) listener.

http://myapache.us.oracle.com:1234/jazn







