4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%--
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster The contents of this file are subject to the terms
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster of the Common Development and Distribution License
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster (the License). You may not use this file except in
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster compliance with the License.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster You can obtain a copy of the License at
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster https://opensso.dev.java.net/public/CDDLv1.0.html or
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster opensso/legal/CDDLv1.0.txt
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster See the License for the specific language governing
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster permission and limitations under the License.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster When distributing Covered Code, include this CDDL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster Header Notice in each file and include the License file
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster at opensso/legal/CDDLv1.0.txt.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster If applicable, add the following below the CDDL Header,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster with the fields enclosed by brackets [] replaced by
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster your own identifying information:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "Portions Copyrighted [year] [name of copyright owner]"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster $Id: configure.jsp,v 1.13 2008/08/21 18:03:33 qcheng Exp $
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster--%>
45cbbdf2c42e20970c2539ba6cc4b94c2599c3d7Kohei Tamura<%--
45cbbdf2c42e20970c2539ba6cc4b94c2599c3d7Kohei Tamura Portions Copyrighted 2012 ForgeRock Inc
45cbbdf2c42e20970c2539ba6cc4b94c2599c3d7Kohei Tamura Portions Copyrighted 2012 Open Source Solution Technology Corporation
45cbbdf2c42e20970c2539ba6cc4b94c2599c3d7Kohei Tamura--%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<html>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<head>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<title>Configure Service Provider</title>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<link rel="stylesheet" type="text/css" href="../../../com_sun_web_ui/css/css_ns6up.css" />
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String errorMsg = null;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%@ include file="../header.jsp"%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%@ include file="../../cli.jsp"%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%@ page
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster import="com.sun.identity.federation.meta.IDFFMetaException,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster com.sun.identity.federation.meta.IDFFMetaManager,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster com.sun.identity.federation.meta.IDFFMetaUtils,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster com.sun.identity.federation.jaxb.entityconfig.EntityConfigElement,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster com.sun.identity.liberty.ws.meta.jaxb.EntityDescriptorElement,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster com.sun.identity.cot.CircleOfTrustDescriptor,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster com.sun.identity.cot.CircleOfTrustManager,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster com.sun.identity.cot.COTConstants,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster java.util.HashSet,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster java.util.Set"
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if (localAuthUrl != null) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster out.println("<script language=\"Javascript\">");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster out.println("top.location.replace('" + localAuthUrl + "');");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster out.println("</script>");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster boolean configured = false;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String hostedSPEntityID = null;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String remoteIDPEntityID = null;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String SAMPLE_COT_NAME = "sampleidffcot";
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String REALM = "/";
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if ((localAuthUrl == null) && (errorMsg == null)) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String proto = request.getParameter("proto");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String host = request.getParameter("host");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String port = request.getParameter("port");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String deploymenturi = request.getParameter("deploymenturi");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if ((proto != null) && (host != null) && (port != null) &&
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster (deploymenturi != null)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster proto = proto.trim();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster host = host.trim();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster port = port.trim();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster deploymenturi = deploymenturi.trim();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if ((proto.length() > 0) && (host.length() > 0) &&
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster (port.length() > 0) && (deploymenturi.length() > 0)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster ) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if (deploymenturi.charAt(0) != '/') {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster deploymenturi = "/" + deploymenturi;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster try {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Make a call to CLI to get the meta data template
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String entityName = baseURL;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String[] args = {"create-metadata-templ",
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "--spec", "idff",
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "--entityid", entityName,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "--serviceprovider", "/sp"};
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster CLIRequest req = new CLIRequest(null, args, ssoToken);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster cmdManager.addToRequestQueue(req);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster cmdManager.serviceRequestQueue();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String result = outputWriter.getMessages();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Make a call to CLI to get the meta data template
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Parse the output of CLI to get metadata XML
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String endEntityDescriptorTag = "</EntityDescriptor>";
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster int metaStartIdx = result.indexOf("<EntityDescriptor");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster int metaEndIdx = result.indexOf(endEntityDescriptorTag,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaStartIdx);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String metaXML = result.substring(metaStartIdx, metaEndIdx +
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster endEntityDescriptorTag.length() +1);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // handle LB case
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if (!realBaseURL.equals(baseURL)) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaXML = metaXML.replaceAll(realBaseURL, baseURL);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Parse the output of CLI to get metadata XML
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Parse the output of CLI to get extended data XML
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String endEntityConfigTag = "</EntityConfig>";
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster int extendStartIdx = result.indexOf("<EntityConfig ");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster int extendEndIdx = result.indexOf(endEntityConfigTag,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster extendStartIdx);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String extendedXML = result.substring(extendStartIdx,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster extendEndIdx + endEntityConfigTag.length() + 1);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // handle LB case
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if (!realBaseURL.equals(baseURL)) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster extendedXML =
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster extendedXML.replaceAll(realBaseURL, baseURL);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Parse the output of CLI to get extended data XML
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] modify extended config to set providerHomePageURL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster int exStartIdx = extendedXML.indexOf(
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "<Attribute name=\"providerHomePageURL\">");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster int exValueIdx = extendedXML.indexOf("<Value>",
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster exStartIdx);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster extendedXML = extendedXML.substring(0, exValueIdx + 7) +
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster baseURL + "/samples/idff/sp/index.jsp" +
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster extendedXML.substring(exValueIdx + 7);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] modify extended config to set providerHomePageURL
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Import these XMLs
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster IDFFMetaManager metaManager = new IDFFMetaManager(ssoToken);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster EntityDescriptorElement descriptor =
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster (EntityDescriptorElement)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster IDFFMetaUtils.convertStringToJAXB(metaXML);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster hostedSPEntityID = entityName;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaManager.createEntityDescriptor(REALM, descriptor);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster EntityConfigElement extendConfigElm = (EntityConfigElement)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster IDFFMetaUtils.convertStringToJAXB(extendedXML);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaManager.createEntityConfig(REALM, extendConfigElm);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Import these XMLs
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Make a call to CLI to get IDP meta data template
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String[] args2 = {"create-metadata-templ",
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "--spec", "idff",
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "--entityid", realBaseURL,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster "--identityprovider", "/idp"};
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster outputWriter = new StringOutputWriter();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster env.put(CLIConstants.SYS_PROPERTY_OUTPUT_WRITER,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster outputWriter);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster cmdManager = new CommandManager(env);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster req = new CLIRequest(null, args2, ssoToken);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster cmdManager.addToRequestQueue(req);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster cmdManager.serviceRequestQueue();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster result = outputWriter.getMessages();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Make a call to CLI to get the meta data template
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Parse the output of CLI to get metadata XML
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaStartIdx = result.indexOf("<EntityDescriptor");
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaEndIdx = result.indexOf(endEntityDescriptorTag,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaStartIdx);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaXML = result.substring(metaStartIdx,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaEndIdx + endEntityDescriptorTag.length() +1);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Parse the output of CLI to get metadata XML
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Swap protocol, host, port and deployment URI
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // to form IDP metadata XML and import it
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster String idpMetaXML = metaXML.replaceAll(realBaseURL,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster proto + "://" + host + ":" + port + deploymenturi);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster EntityDescriptorElement idpDescriptor =
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster (EntityDescriptorElement)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster IDFFMetaUtils.convertStringToJAXB(idpMetaXML);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster remoteIDPEntityID = idpDescriptor.getProviderID();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster metaManager.createEntityDescriptor(REALM, idpDescriptor);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Swap protocol, host, port and deployment URI
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // to form IDP metadata XML and import it
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [START] Create Circle of Trust
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster Set providers = new HashSet();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster providers.add(hostedSPEntityID + COTConstants.DELIMITER +
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster COTConstants.IDFF);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster providers.add(remoteIDPEntityID + COTConstants.DELIMITER +
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster COTConstants.IDFF);
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster CircleOfTrustManager cotManager = new
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster CircleOfTrustManager();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster cotManager.createCircleOfTrust(REALM,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster new CircleOfTrustDescriptor(SAMPLE_COT_NAME, REALM,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster COTConstants.ACTIVE, "", null, null,
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster null, null, providers));
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster // [END] Create Circle of Trust
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster configured = true;
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster } catch (Exception clie) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster errorMsg = clie.getMessage();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster clie.printStackTrace();
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster } else {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster errorMsg = "Required fields are missing.";
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster }
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster</head>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<body class="DefBdy">
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<div class="MstDiv"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="MstTblTop" title="">
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<tbody><tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<td nowrap="nowrap">&nbsp;</td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<td nowrap="nowrap">&nbsp;</td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster</tr></tbody></table>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<table width="100%" border="0" cellpadding="0" cellspacing="0" class="MstTblBot" title="">
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<tbody><tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<td class="MstTdTtl" width="99%">
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<div class="MstDivTtl"><img name="ProdName" src="../../../console/images/PrimaryProductName.png" alt="" /></div></td><td class="MstTdLogo" width="1%"><img name="RMRealm.mhCommon.BrandLogo" src="../../../com_sun_web_ui/images/other/javalogo.gif" alt="Java(TM) Logo" border="0" height="55" width="31" /></td></tr></tbody></table>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<table class="MstTblEnd" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><img name="RMRealm.mhCommon.EndorserLogo" src="../../../com_sun_web_ui/images/masthead/masthead-sunname.gif" alt="Sun(TM) Microsystems, Inc." align="right" border="0" height="10" width="108" /></td></tr></tbody></table></div><div class="SkpMedGry1"><a name="SkipAnchor2089" id="SkipAnchor2089"></a></div>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<div class="SkpMedGry1"><a href="#SkipAnchor4928"><img src="../../../com_sun_web_ui/images/other/dot.gif" alt="Jump Over Tab Navigation Area. Current Selection is: Access Control" border="0" height="1" width="1" /></a></div>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<table border="0" cellpadding="10" cellspacing="0" width="100%">
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<tr><td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if (!configured) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<h3>Configuring this instance as Service Provider</h3>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<form action="configure.jsp" method="GET">
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster This sample will create and load metadata for a hosted Service Provider and a remote Identity Provider, it will also setup circle of trust for the two providers.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <p>&nbsp;</p>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster Please provide the remote Identity Provider (must also be an Open Federation instance) information:
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <p>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <table border=0 cellpadding=5 cellspacing=0>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster if (errorMsg != null) {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td colspan="2" align="center">
45cbbdf2c42e20970c2539ba6cc4b94c2599c3d7Kohei Tamura <b><font color="red"><%= errorMsg %></font></b>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <br><br>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster}
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td>Protocol:</td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td><input name="proto" type="text" size="6" value="http" /></td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td>Host:</td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td><input name="host" type="text" size="30" value="" /></td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td>Port:</td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td><input name="port" type="text" size="6" value="" /></td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td>Deployment URI:</td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td><input name="deploymenturi" type="text" size="15" value="" /></td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <td colspan="2" align="center">
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <input type="submit" value="Configure" />
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster <input type="reset" value="Reset" />
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </td>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster </table>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster</form>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster} else {
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<p>&nbsp;</p>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterHosted Service Provider <%= hostedSPEntityID %> is created.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<p>&nbsp;</p>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterRemote Identity Provider <%= remoteIDPEntityID %> is created.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<p>&nbsp;</p>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterCircle of Trust <%= SAMPLE_COT_NAME %> is created.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<p>&nbsp;</p>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<p>&nbsp;</p>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterService Provider is configured. Click <a href="../index.html">here</a> to return
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Fosterto main page.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster<%
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster}
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster%>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster</td></tr>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster</table>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster</body>
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster</html>