扩展你的WebCenter_Spaces应用程序(4)
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字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [专业资料]《蜜蜂之家》教学反思
- [专业资料]过去分词作定语和表语1
- [专业资料]苏州工业园区住房公积金贷款申请表
- [专业资料]保安管理制度及处罚条例细则
- [专业资料]2018年中国工程咨询市场发展现状调研及
- [专业资料]2015年电大本科《学前教育科研方法》期
- [专业资料]数字信号处理实验 matlab版 离散傅里叶
- [专业资料]“十三五”重点项目-虎杖白藜芦醇及功
- [专业资料]2015-2020年中国竹木工艺市场需求及投
- [专业资料]国际贸易理论与实务作业五:理论案例分
- [专业资料]财政部修订发布事业单位会计制度
- [专业资料]BCA蛋白浓度测定试剂盒(增强型)
- [专业资料]工程进度总计划横道图模板(通用版)
- [专业资料]七年级地理同步练习(天气与气候)
- [专业资料]X光安检机介绍火灾自动报警系统的组成
- [专业资料]衢州市人民政府办公室关于印发衢州市区
- [专业资料]经济全球化及其影响[1]
- [专业资料]质粒DNA限制性酶切图谱分析
- [专业资料]国家安全人民防线工作“六项”制度
- [专业资料]劳动力投入计划及保证措施
- 电子账册联网监管培训手册
- 人教版语文七年级上第1课《在山的那边
- 对我区担保行业发展现状的思考与建议
- 平面四边形网格自动生成方法研究
- 2016年党课学习心得体会范文
- 如何设置电脑定时关机
- 全球最美人妖排行榜新鲜出炉
- 社会实践调查报告及问卷
- Visual Basic习题集
- 《鱼我所欲也》课件2
- 浙江省会计从业资格考试试卷
- 全遥控数字音量控制的D 类功率放大器资
- 鞍钢宪法与后福特主义
- 电表的改装与校准实验报告(1)
- 2014年高考理科数学真题解析分类汇编:
- Windows 7 AIK 的使用
- 风电场全场停电事故应急处置方案
- 化工原理选填题题库(下)
- 关于产学研合作教育模式的学习与思考
- 西安先锋公馆项目前期定位报告




