本节为以下任务提供命令行选项,以从终端窗口中配置网关属性:
当启用“存储外部服务器 Cookie”选项时,网关存储并管理通过网关访问的任何第三方应用程序或服务器的 cookie。尽管应用程序或服务器不能服务于 cookieless 设备或依赖于 cookie 进行状态管理,网关也会透明地屏蔽应用程序或服务器,使其不知道网关正服务于 cookieless 设备。
有关 cookieless 设备和客户机检测的信息,参见《Access Manager 自定义和 API 指南》
键入以下命令并按 Enter 键以管理外部服务器 cookie 的存储。
启用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a CookieManagement true
禁用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a CookieManagement false
获取属性值:
PS_INSTALL_DIR /bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a CookieManagement
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
将 cookie 标记为安全 cookie 时,浏览器以额外的安全对待该 cookie。安全的实现方式取决于浏览器。如果要使用此功能,必须启用“启用 Cookie 管理”属性。
键入以下命令并按 Enter 键以将 cookie 标记为安全。
启用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a MarkCookiesSecure true
禁用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a MarkCookiesSecure false
获取属性值:
PS_INSTALL_DIR /bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a MarkCookiesSecure
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
网关会尝试直接连接到在“不可使用 Webproxy URL”列表中列出的 URL。Webproxy 将不用于连接到这些 URL。
键入以下命令并按 Enter 键以管理不使用的代理 URL。
如果有多个 URL,请使用空格分隔每个 URL。
指定不使用的 URL:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DontUseWebProxyURL -A "LIST_OF_URLS"
添加到现有 URL 列表:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DontUseWebProxyURL -A "LIST_OF_URLS"
从现有 URL 列表中删除:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DontUseWebProxyURL -E "LIST_OF_URLS"
获取现有 URL 列表:
PS_INSTALL_DIR /bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DontUseWebProxyURL
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
Secure Remote Access 支持 Microsoft Exchange 2000 SP3 安装和 Outlook Web Access (OWA) 的 MS Exchange 2003。
添加 URI 到现有列表:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile default -a DomainsAndRulesets -A "URI|RULE_SET_NAME URI|RULE_SET_NAME"
从现有列表中删除 URI:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile default -a DomainsAndRulesets -E "URI|RULE_SET_NAME URI|RULE_SET_NAME"
获取现有列表:
PS_INSTALL_DIR /bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DomainsAndRulesets
键入以下命令并按 Enter 键以管理 Outlook Web Access 的规则集。
添加规则集:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile default -a DomainsAndRulesets -A "EXCHANGE2000_SERVER_NAME exchange_2000sp3_owa_ruleset"
删除规则集:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile default -a DomainsAndRulesets -E "EXCHANGE2000_SERVER_NAME exchange_2000sp3_owa_ruleset"
设置 URI 至规则集的映射的列表:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DomainsAndRulesets "URI| RULE_SET_NAME URI|RULE_SET_NAME "
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
当 URL 仅包含不带域和子域的主机名时,才会用到默认域。在这种情况下,网关假定主机名在默认域列表中,并进行相应处理。
例如,如果 URL 中的主机名为 host1,并且将默认的域和子域指定为 red.sesta.com,则主机名会被解析为 host1.red.sesta.com。
键入以下命令并按 Enter 键以指定默认域。
设置默认域:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DefaultDomainsAndSubdomains "DOMAIN_NAME"
获取默认域:
PS_INSTALL_DIR /bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a DefaultDomainsAndSubdomains
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
重写器根据页面的 MIME 类型选择解析器。某些 Web 服务器(如 WebLogic 和 Oracle)不发送 MIME 类型。要回避这个问题,可通过在“将解析器映射至 URI”列表框中添加数据来启用 MIME 推测功能。
键入以下命令并按 Enter 键以管理 MIME 推测。
启用 MIME 推测:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a EnableMIMEGuessing true
禁用 MIME 推测:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a EnableMIMEGuessing false
获取值:
PS_INSTALL_DIR/bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a EnableMIMEGuessing
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
如果启用了“MIME 推测”复选框,并且服务器尚未发送 MIME 类型,可使用该列表框将解析器映射到 URI。
多个 URI 以分号进行分隔。
例如,HTML=*.html; *.htm;*Servlet。这意味着会使用“HTML 重写器”来重写具有 html、htm 或 Servlet 扩展名的任何页的内容。
键入以下命令并按 Enter 键以创建要解析的 URI 映射列表。
设置要解析的 URI 映射列表:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a MIMEMap
添加到现有列表:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a MIMEMap -A LIST
从现有列表中删除:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a MIMEMap -E LIST
获取现有列表:
PS_INSTALL_DIR /bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME-a MIMEMap
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”
屏蔽功能允许重写器重写 URI 以便使人们看不到页的内联网 URL。
键入以下命令并按 Enter 键以管理屏蔽。
启用屏蔽:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a EnableObfuscation true
禁用屏蔽:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a EnableObfuscation false
获取值:
PS_INSTALL_DIR/bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a EnableObfuscation
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
种子字符串用于屏蔽 URI。该字符串由屏蔽算法生成。
如果该种子字符串已更改或是重启了网关,则可能无法为屏蔽后的 URI 加书签。
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
一些应用程序(如 applet)需要一个 Internet URI,而且不能对其进行屏蔽。要指定这些应用程序,可将 URI 添加到列表框中。
例如,当您将 */Applet/Param* 添加到列表框中后,如果内容 URI http://abc.com/Applet/Param1.html 与规则集中的规则匹配,则不会屏蔽该 URL。
如果有多个 URI,请使用空格分隔每个 URI。
键入以下命令并按 Enter 键以创建禁止屏蔽的 URI 列表。
设置禁止屏蔽的 URI 列表:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a NotToObscureURIList LIST_OF_URI
添加到现有列表:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a NotToObscureURIList -A LIST_OF_URI
从现有列表中删除:
PS_INSTALL_DIR /bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a NotToObscureURIList -E LIST_OF_URI
获取现有值:
PS_INSTALL_DIR /bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a NotToObscureURIList
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”
当网关同时运行于 HTTP 和 HTTPS 模式下时,您可以允许重写器使用一致的协议来访问 HTML 内容中引用的资源。
例如,如果原始 URL 是 http://intranet.com/Public.html,则添加 http 网关。如果原始 URL 是 https://intranet.com/Public.html,则添加 https 网关。
这只适用于静态 URI,不适用于 Javascript 中生成的动态 URI。
键入以下命令并按 Enter 键以使网关协议与原始 URI 协议一致。
启用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a UseConsistentProtocolForGateway true
禁用:
PS_INSTALL_DIR/bin/psadmin set-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a UseConsistentProtocolForGateway false
获取值:
PS_INSTALL_DIR/bin/psadmin get-attribute -u amadmin -f PASSWORD_FILE -m gateway --gateway-profile PROFILE_NAME -a UseConsistentProtocolForGateway
《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin set-attribute”和《Sun Java System Portal Server 7.2 Command-Line Reference》中的“psadmin get-attribute”