run-xacml-client-sample.sh revision 4fe4e4f798a84a46e567f64ceadd3648eb0582d4
2842N/A#!/bin/sh
3177N/A#
3177N/A#------------------------------------------------------------------------------
3177N/A#README file for OpenSSO stand alone client sdk samples
3177N/A#------------------------------------------------------------------------------
3177N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3177N/A#
3177N/A#Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
3177N/A#
3177N/A#The contents of this file are subject to the terms
3177N/A#of the Common Development and Distribution License
3177N/A#(the License). You may not use this file except in
3177N/A#compliance with the License.
3177N/A#
3177N/A#You can obtain a copy of the License at
3177N/A#https://opensso.dev.java.net/public/CDDLv1.0.html or
3177N/A#opensso/legal/CDDLv1.0.txt
3177N/A#See the License for the specific language governing
3177N/A#permission and limitations under the License.
3177N/A#
3177N/A#When distributing Covered Code, include this CDDL
3177N/A#Header Notice in each file and include the License file
3177N/A#at opensso/legal/CDDLv1.0.txt.
3177N/A#If applicable, add the following below the CDDL Header,
3215N/A#with the fields enclosed by brackets [] replaced by
3177N/A#your own identifying information:
2842N/A#"Portions Copyrighted [year] [name of copyright owner]"
2842N/A#
2842N/A#$Id: run-xacml-client-sample.sh,v 1.9 2008/08/19 19:11:25 veiming Exp $
2842N/A#------------------------------------------------------------------------------
2842N/A#
2842N/A#Runs the xacml client sample program
2842N/A#
2842N/A#constructs a xacml-context:Request
2842N/A#makes XACMLAuthzDecisionQuery to PDP,
2842N/A#receives XACMLAuthzDecisionStatement
2842N/A#prints out xacml-context:Response
2842N/A#
2842N/A#Requires one parameter: the name of the resource file that defines
2909N/A#property values used by the sample
2842N/A#Default is xacmlClientSamples
2842N/A#The corresponding file that would be read from classpath
2842N/A#is xacmlClientSample.properites
2842N/A#from classpath.
2909N/A#A default template is included
2909N/A#at ../resources/xacmlClientSample.properties
2909N/A#See the template for more information on the properties
2842N/A#Please update it to match your deployment
2842N/A#You have to create user and policy at PDP to get right policy decision
2842N/A#see ../resources/xacmlClientSample.properties for more information
2842N/A#
2909N/A#Requires ../resources/AMConfig.properties
2909N/A#Must run "setup.sh" once to configure the client to find the OpenSSO server, this
2909N/A#is referred as PEP host below. Modify AMConfig.properties, set value of
2909N/A#"com.sun.identity.agents.app.username" property to "amadmin", set value of
2842N/A#"com.iplanet.am.service.password" property to the amadmin password if it is
2842N/A#different from the password entered when running setup.sh command.
2842N/A#
2842N/A#Setting up PDP OpenSSO and PEP OpenSSO
2842N/A#
2842N/A# At PDP host, that is the host that would run the OpenSSO acting as PDP.
2842N/A# We would call this PDP OpenSSO. At PDP host, do the following:
2842N/A#
2842N/A# deploy opensso.war and configure it on a supported java ee container
2842N/A# using OpenSSO console, Configuration > SAMLv2 SOAP Binding,set soap handler,
2842N/A# key=/xacmlPdp|class=com.sun.identity.xacml.plugins.XACMLAuthzDecisionQueryHandler
2842N/A#
2842N/A# unzip ssoAdminTools.zip and setup OpenSSO admin tools
# opensso/bin/ssoadm create-cot -t xacml-pdp-cot -u amadmin -f <password_file>
# opensso/bin/ssoadm create-metadata-templ -y xacmlPdpEntity -p /xacmlPdp -m xacmlPdp.xml -x xacmlPdp-x.xml -u amadmin -f <password_file>
# opensso/bin/ssoadm import-entity -t xacml-pdp-cot -m xacmlPdp.xml -x xacmlPdp-x.xml -u amadmin -f <password_file>
#
#
# At PEP host, that is the host that would run the OpenSSO acting as PEP metadata
# repository, do
#
# deploy opensso.war and configure it on a supported java ee container
#
# unzip ssoAdminTools.zip and setup OpenSSO admin tools
# opensso/bin/ssoadm create-cot -t xacml-pep-cot -u amadmin -f <password_file>
# opensso/bin/ssoadm create-metadata-templ -y xacmlPepEntity -e /xacmlPep -m xacmlPep.xml -x xacmlPep-x.xml -u amadmin -f <password_file>
# opensso/bin/ssoadm import-entity -t xacml-pep-cot -m xacmlPep.xml -x xacmlPep-x.xml -u amadmin -f <password_file>
#
# copy xacmlPdp.xml from PDP host as xacmlPdp-r.xml to PEP host, do
# opensso/bin/ssoadm import-entity -t xacml-pep-cot -m xacmlPdp-r.xml -u amadmin -f <password_file>
#
#
# At PDP host, do the following:
# copy xacmlPep.xml from PEP host as xacmlPep-r.xml to PDP host
# opensso/bin/ssoadm import-entity -t xacml-pdp-cot -m xacmlPep-r.xml -u amadmin -f <password_file>
#
# Then, run this script
java -classpath resources:lib/openssoclientsdk.jar:lib/j2ee.jar:lib/jaxb-libs.jar:lib/jaxb-impl.jar:lib/webservices-rt.jar:classes samples.xacml.XACMLClientSample xacmlClientSample