教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 专业资料 >

扩展你的WebCenter_Spaces应用程序(4)

来源:网络收集 时间:2026-05-18
导读: 3. 应用和Webcenter Spaces之间的固定连接 在你的webcenter门户应用Webcenter APIs之前,你必须保证应用程序(消费者)和Webcenter Spaces(生产者)之间的通信是安全的。调用API的用户身份以安全的方式传递到Webce

3. 应用和Webcenter Spaces之间的固定连接

在你的webcenter门户应用Webcenter APIs之前,你必须保证应用程序(消费者)和Webcenter Spaces(生产者)之间的通信是安全的。调用API的用户身份以安全的方式传递到Webcenter Spaces,这个通信具有完整性和保密性。

要做到安全,Webcenter Spaces的消息保护基于SAML的令牌传递策略。作为管理员必须创建一

个java密钥库和一个更新凭据存储。在收到你的应用程序的请求后Webcenter Spaces可以验证令牌真 伪。然后你必须用Jdeveloper注册密钥和存储凭证。

开始前要从管理员处获取以下条件:

a:消费者密钥是一个安全的连接。 这是一个 .jks 文件 (for example, consumer.jks).

b: 消费者公共应用程序密钥存储在 密钥库 (for example, consumer).

c: 消费者公用应用程序钥匙的密码(for example, mypassword1).

d: 生产者公共应用程序密钥存储在消费者密钥库 (for example, producer).

这是由管理员导入生产者公共应用程序密钥可信任证书。

e: 消费者密钥库密码 (for example, mypassword2).

确保连接安全:

a.复制密钥库到文件系统在你的Webcenter 门户运行的时候。如:DOMAIN_HOME/config/fmwconfig b.打开jps-config.xml配置管理员创建的密钥库

<!-- KeyStore Service Instance -->

<serviceInstance name="keystore" provider="keystore.provider" location="./consumer.jks">

如何扩展WebCenter Spaces 应用程序

<description>Default JPS Keystore Service</description>

<property name="keystore.type" value="JKS"/>

<property name="keystore.csf.map" value="oracle.wsm.security"/>

<property name="keystore.pass.csf.key" value="keystore-csf-key"/>

<property name="keystore.sig.csf.key" value="enc-csf-key"/>

<property name="keystore.enc.csf.key" value="enc-csf-key"/>

</serviceInstance>

c. 备份cwallet.sso

d. 打开一个命令行

e.找到Jdeveloper安装目录C:\Jdev\jdeveloper\common\bin

f.运行以下命令In Windows: wlst.cmd 、In Linux: ./wlst.sh

g.Run: connect('admin_user', 'admin_password', 'host:port')

Where:

admin_user is the user name for the administrator of the server on which the application is running

(for example, weblogic)

admin_password is the password for the administrator

host:port is the server on which the application is running

h.Run the following commands:

createCred(map="oracle.wsm.security", key="enc-csf-key", user="alias",

password="key_password", desc="Enc Password")

createCred(map="oracle.wsm.security", key="sign-csf-key", user="alias",

password="key_password",desc="Enc Password")

createCred(map="oracle.wsm.security",key="keystore-csf-key",user="keystore-csf-key",

password="keystore_password", desc="Keystore password")

Where:

alias is the consumer public alias key in the keystore

key_password is the password for the public key

keystore_password is the keystore password

i.重启部署应用的服务器

4.设置WebCenter Spaces客户端上下文

a.当你部署在WLS上的应用程序调用Webcenter Spaces APIs时域范围内的配置被使用,除非你不

重写他们。使用GroupSpaceWSContext类提供的API覆盖或设置安全配置参数。

特别是,你必须为WebcenterSpaces设置SAML issuer name 和public key alias,这些都需要数

据加密。如果WebCenter Spaces Web service的端口没有设置在connections.xml文件中。你也

可以像如下这样设置:

GroupSpaceWSContext context = new GroupSpaceWSContext();

context.setEndPoint("endPointUrl");

context.setSamlIssuerName("samlIssuer");

context.setRecipientKeyAlias("producer");

groupSpaceWSClient = new GroupSpaceWSClient(context);

where:

1.endPointUrl是WebCenter Spaces Web service的端口,

如::8912/webcenter/SpacesWebService).

如何扩展WebCenter Spaces 应用程序

2.samlIssuer is the issuer URI of the SAML Authority issuing assertions for this SAML Asserting Party (for example, /webcenter)

3.producer 是WebCenter Spaces 的公共密钥程序, 如:wcspaces.

b.通过上下文初始化Webcenter Spaces客户端。

如:GroupSpaceWSClient client = new GroupSpaceWSClient(context);

c.初始化了客户端,检查设置是否正确,getWebCenterSpacesURL();

如果返回了正确的URL,就可以使用APIs。

4.如何在Webcenter 门户应用提供Spaces功能

执行Webcenter Spaces常用的操作APIs:

1. 管理Spaces和Spaces Template

使用createGroupSpace 、setCustomAttribute 、createGroupSpaceTemplate 、deleteGroupSpace管理 a. Creating a Space

使用createGroupSpace API 创建一个基于现有Spaces模板的Spaces。

使用说明:

@.Spaces的内部名称. 此名称可以包含空格。

@.Spaces的现实名称。

@.Spaces描述. 这项虽然不是强制的但是建议填写以帮助用户确定Spaces的目的。

@.这个名字是要用Spaces模板的名字. 这个必须是Spaces模板的内部名称不是显示名称。 或者你可以提供一个以逗号分隔的关键字列表,帮助用户在搜索中找到Spaces。

Example : Creating a Space

//create the Space

GroupSpaceWSMetadata gsMetadata =

client.createGroupSpace("Databases", "Databases" "A community for people interested in

如何扩展WebCenter Spaces 应用程序

databases", "databases, oracle", "CommunityofInterest");

//print the Space GUID to provide confirmation of creation

System.out.println("GUID: " + gsMetadata.getGuid());

b. Creating a Custom Attribute(自定义属性)

每个Spaces都配备了内置的属性,如:名称、描述、创建日期和图表等。此外,你可以定义自定义属性存储其他信息(元数据)。

Spaces通过setCustomAttribute API来指定一个自定义属性,使用这个API指定名称和spaces名称、描述、类型和自定义属性。

Example :Creating a Custom Attribute创建一个数据空间,并为 …… 此处隐藏:3887字,全部文档内容请下载后查看。喜欢就下载吧 ……

扩展你的WebCenter_Spaces应用程序(4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/268869.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)