341N/A<%--
341N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
341N/A
341N/A Copyright (c) 2011-2016 ForgeRock AS. All Rights Reserved
943N/A
341N/A The contents of this file are subject to the terms
341N/A of the Common Development and Distribution License
919N/A (the License). You may not use this file except in
919N/A compliance with the License.
919N/A
919N/A You can obtain a copy of the License at
919N/A http://forgerock.org/license/CDDLv1.0.html
919N/A See the License for the specific language governing
919N/A permission and limitations under the License.
919N/A
919N/A When distributing Covered Code, include this CDDL
919N/A Header Notice in each file and include the License file
919N/A at http://forgerock.org/license/CDDLv1.0.html
919N/A If applicable, add the following below the CDDL Header,
919N/A with the fields enclosed by brackets [] replaced by
919N/A your own identifying information:
919N/A "Portions Copyrighted [year] [name of copyright owner]"
919N/A
919N/A--%>
341N/A
341N/A<%@ page language="java" %>
341N/A<%@ page import="com.iplanet.sso.SSOToken" %>
341N/A<%@ page import="com.sun.identity.sm.*" %>
493N/A<%@ page import="java.util.*" %>
341N/A
341N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
962N/A<html xmlns="http://www.w3.org/1999/xhtml">
341N/A<head>
911N/A <title>OpenAM</title>
962N/A <link rel="stylesheet" type="text/css" href="com_sun_web_ui/css/css_ns6up.css"/>
962N/A <link rel="shortcut icon" href="com_sun_web_ui/images/favicon/favicon.ico" type="image/x-icon"/>
911N/A
341N/A <style type="text/css">
341N/A
341N/A .attribute {
341N/A color: red;
341N/A width: 550px;
341N/A padding: 0px;
341N/A /*background-color: #eeeeee;*/
341N/A }
341N/A
341N/A .attributeRowA {
392N/A width: 100%;
604N/A background-color: #eeeeee;
646N/A padding: 6px;
812N/A }
688N/A
688N/A .attributeRowB {
688N/A width: 100%;
688N/A background-color: #dddddd;
688N/A padding: 6px;
688N/A }
688N/A
688N/A .attribute .name {
688N/A color: blue;
688N/A font-size: 12px;
688N/A font-family: courier;
688N/A /*background-color: #00008b;*/
688N/A }
688N/A
688N/A .attribute .description {
688N/A color: black;
688N/A font-size: 15px;
688N/A /*background-color: #b8860b;*/
688N/A }
688N/A
688N/A .attribute .descriptionMissing {
688N/A color: #666666;
688N/A font-size: 15px;
688N/A }
688N/A
688N/A .attribute .help {
688N/A color: green;
851N/A font-size: 12px;
688N/A /*background-color: #006400;*/
688N/A }
688N/A
688N/A .schemaType {
688N/A position: relative;
688N/A float: left;
688N/A clear: left;
688N/A padding: 2px;
688N/A width: 750px;
688N/A font-family: arial, helvetica;
688N/A }
688N/A
688N/A .schemaBlock {
688N/A position: relative;
688N/A float: left;
816N/A width: 630px;
962N/A display: block;
341N/A font-family: arial, helvetica;
341N/A }
341N/A
341N/A .schemaTitle {
341N/A width: 120px;
341N/A float: left;
341N/A font-size: 12px;
493N/A }
969N/A
341N/A .service {
341N/A position: relative;
493N/A float: left;
851N/A padding-top: 10px;
341N/A width: 800px;
341N/A font-family: arial, helvetica;
341N/A }
341N/A
341N/A .serviceName {
493N/A position: relative;
341N/A float: left;
341N/A font-weight: bold;
341N/A font-size: 16px;
341N/A /*background-color: #bbbbcc;*/
493N/A padding: 2px;
341N/A width: 796px;
965N/A }
965N/A
851N/A .serviceBlock {
851N/A position: relative;
851N/A float: left;
851N/A clear: left;
851N/A left: 10px;
341N/A width: 790px;
493N/A display: block;
341N/A }
341N/A
341N/A
341N/A </style>
341N/A
341N/A <script src="js/jquery.js"></script>
341N/A
493N/A <script type="text/javascript">
341N/A
341N/A $(document).ready(function () {
341N/A $(".schemaTitle").click(function () {
341N/A $(this).parent().children(".schemaBlock").toggle("fast");
341N/A });
493N/A $(".serviceName").click(function () {
493N/A $(this).parent().children(".serviceBlock").toggle("fast");
493N/A });
493N/A });
341N/A
341N/A </script>
341N/A
922N/A</head>
922N/A
910N/A
963N/A<body class="DefBdy">
963N/A<div class="SkpMedGry1"><a href="#SkipAnchor3860"><img src="com_sun_web_ui/images/other/dot.gif" alt="Jump to End of Masthead" border="0" height="1" width="1"/></a></div>
963N/A<div class="MstDiv">
922N/A <table class="MstTblBot" title="" border="0" cellpadding="0" cellspacing="0" width="100%">
922N/A <tr>
922N/A <td class="MstTdTtl">
851N/A <div class="MstDivTtl"><img name="AMConfig.configurator.ProdName" src="com_sun_web_ui/images/PrimaryProductName.png" alt="OpenAM" border="0"/></div>
851N/A </td>
851N/A </tr>
341N/A </table>
851N/A</div>
922N/A<table class="SkpMedGry1" border="0" cellpadding="5" cellspacing="0" width="100%">
851N/A <tr>
963N/A <td><img src="com_sun_web_ui/images/other/dot.gif" alt="Jump to End of Masthead" border="0" height="1" width="1"/></a></td>
963N/A </tr>
963N/A</table>
963N/A<table border="0" cellpadding="10" cellspacing="0" width="100%">
963N/A <tr>
963N/A <td></td>
963N/A </tr>
963N/A</table>
963N/A<%@ include file="/WEB-INF/jsp/admincheck.jsp" %>
963N/A<%
SSOToken ssoToken = requireAdminSSOToken(request, response, out, "showServerConfig.jsp");
if (ssoToken == null) {
%>
</body></html>
<%
return;
}
%>
<table cellpadding=15>
<tr>
<td>
<div id="doc" style="max-width: 800px; display: block;">
<p><strong>OpenAM Service Attributes</strong></p>
<p>In order to translate configuration changes made in OpenAM console to
<code>ssoadm</code> commands, you must first match the GUI settings to
service attributes used by <code>ssoadm</code>. This page lists
available service attributes, including their labels and online help from
OpenAM console where available. Service attributes apply according to their type:</p>
<dl>
<dt>Dynamic</dt>
<dd>Applies to a role or a realm</dd>
<dt>Global</dt>
<dd>Applies to the entire OpenAM server</dd>
<dt>Organization</dt>
<dd>Applies to a realm</dd>
</dl>
<p>To find the service attribute that corresponds to a particular GUI
setting, click Expand below, and then search for the label of the GUI
setting within this page.</p>
<p>For example, suppose you changed <code>Maximum Session Time</code> in
the OpenAM console to 240 seconds. You search this page for
<code>Maximum Session Time</code> and find the dynamic attribute
<code>iplanet-am-session-max-session-time</code> on the
<code>iPlanetAMSessionService</code> service. To set maximum session
time to 240 seconds by script, you use the following command.</p>
<pre>ssoadm set-attr-defs -u amadmin -f /tmp/pwd.txt -s iPlanetAMSessionService \
-t dynamic -a "iplanet-am-session-max-session-time=240"</pre>
<hr>
</div>
<br/>
<div>
<div style="font-size: 12px; display: inline; text-color: #666666; text-decoration: underline;"
onclick="$(document).find('.serviceBlock').show(); $(document).find('.schemaBlock').show();">Expand all
</div>
&nbsp;|&nbsp;
<div style="font-size: 12px; display: inline; text-color: #666666; text-decoration: underline;"
onclick="$(document).find('.serviceBlock').hide(); $(document).find('.schemaBlock').hide();">Collapse all
</div>
</div>
<br/>
<%
ServiceManager sm = new ServiceManager(ssoToken);
Set serviceNames = sm.getServiceNames();
for (Object o : serviceNames) {
String serviceName = o.toString();
out.println("<div class='service' name='" + o + "'>");
out.println("<div class='serviceName'>" + serviceName + "</div>");
out.println("<div class='serviceBlock'>");
// Assume version 1.0 (as of 2012-06 all services are version 1.0)
ServiceConfigManager scm = sm.getConfigManager(serviceName, "1.0");
Set<String> instances = scm.getInstanceNames();
// To list instances
// for (String instance : instances) {
// out.println("Instance: " + instance + "");
// }
ServiceSchemaManager ssm = sm.getSchemaManager(serviceName, "1.0");
if (ssm != null) {
Map<String, ServiceSchema> serviceSchemaList = new HashMap<String, ServiceSchema>();
ServiceSchema dynamic = ssm.getDynamicSchema();
if (dynamic != null) {
serviceSchemaList.put("Dynamic", dynamic);
}
ServiceSchema global = ssm.getGlobalSchema();
if (global != null) {
serviceSchemaList.put("Global", global);
}
ServiceSchema org = ssm.getOrganizationSchema();
if (org != null) {
serviceSchemaList.put("Organization", org);
}
for (String schemaType : serviceSchemaList.keySet()) {
ServiceSchema ss = serviceSchemaList.get(schemaType);
String i18nFilename = ss.getI18NFileName();
ResourceBundle bundle = null;
if (i18nFilename != null) {
try {
bundle = ResourceBundle.getBundle(i18nFilename);
} catch (MissingResourceException ex) {
}
}
if (ss != null) {
Set<String> serviceAttributeNames = ss.getServiceAttributeNames();
// Ignore this schema if it is empty
if (serviceAttributeNames == null || serviceAttributeNames.isEmpty()) {
continue;
}
out.println("<div class='schemaType'><div class='schemaTitle'>" + schemaType + "</div>");
out.println("<div class='schemaBlock'>");
boolean rowAlternator = true;
for (String s : serviceAttributeNames) {
// Alternating row backgrounds
rowAlternator = !rowAlternator;
AttributeSchema as = ss.getAttributeSchema(s);
out.println("<div class='attribute'>");
if (rowAlternator)
out.println("<div class='attributeRowA'>");
else
out.println("<div class='attributeRowB'>");
out.println("<div class='name'>" + s + "</div>");
try {
if (as.getI18NKey() != null)
out.println("<div class='description'>" + (bundle!=null ? bundle.getString(as.getI18NKey()) : as.getName()) + "</div>");
} catch (MissingResourceException mre) {
out.println("<div class='descriptionMissing'>" + s + " (missing description)</div>");
}
try {
if (bundle != null && as.getI18NKey() != null)
out.println("<div class='help'>" + bundle.getString(as.getI18NKey().concat(".help")) + "</div>");
} catch (MissingResourceException mre) {
}
out.println("</div>");
out.println("</div>");
}
out.println("</div>");
out.println("</div>");
}
}
}
out.println("</div></div>");
}
%>
</td>
</tr>
</table>
</body>
</html>