加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

在websphere中的应用 用cews(wsi)方式连接/登陆filenet ce

发布时间:2020-12-17 01:03:22 所属栏目:安全 来源:网络整理
导读:连接filenet ce用二种方式:ejb和webservice,下面的是用ws。 一、设置websphere应用服务器 安全性 - 安全管理、应用程序和基础结构 - java认证和授权服务 - 应用程序登陆 - 新建 FileNetP8WSI 别名和FileNetP8WSI固定写法 - ?JAAS登陆模块 - 新建com.filene

连接filenet ce用二种方式:ejb和webservice,下面的是用ws。

一、设置websphere应用服务器

安全性 - 安全管理、应用程序和基础结构 - java认证和授权服务 - 应用程序登陆 - 新建 FileNetP8WSI
别名和FileNetP8WSI固定写法 - ?JAAS登陆模块 - 新建com.filenet.api.util.WSILoginModule - 使用登陆模块代理
定制属性— 新建 name: delegate ?value:com.filenet.api.util.WSILoginModule


注意:FileNetP8WSI是jaas.conf.wsi中的FileNetP8WSI ,是用webservice连接的意思。

FileNetP8 {
? ? com.filenet.api.util.WSILoginModule required;
};
FileNetP8WSI {
? ? com.filenet.api.util.WSILoginModule required;
};
FileNetP8Engine {
? ? com.filenet.api.util.WSILoginModule required;
};
FileNetP8Server {
? ? com.filenet.api.util.WSILoginModule required;
};

也可以用下面的。其实是一样的。只要FileNetP8WSI 一样即可。

jaas.conf.WebSphere

FileNetP8 {
? ? com.ibm.ws.security.common.auth.module.WSLoginModuleImpl required;
};
FileNetP8WSI {
? ? com.filenet.api.util.WSILoginModule required;
};
FileNetP8Engine {
? ? com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required
? ? ? ? delegate=com.ibm.ws.security.common.auth.module.WSLoginModuleImpl;
};
FileNetP8Server {
? ? com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required
? ? ? ? delegate=com.ibm.ws.security.common.auth.module.WSLoginModuleImpl;
};
FileNetP8KerberosService {
? ? com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required
? ? ? ? delegate=com.filenet.engine.authentication.kerberos.login.KrbServiceLoginModule;
? ? com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required
? ? ? ? delegate=com.ibm.ws.security.server.lm.ltpaLoginModule;
? ? com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required
? ? ? ? delegate=com.ibm.ws.security.server.lm.wsMapDefaultInboundLoginModule;
};
Credentials {
? ? com.idoox.security.jaas.GSSLoginModule required debug=true;
};
ReceivedCredentials {
? ? com.idoox.security.jaas.GSSLoginModuleNoAuth required debug=true;
};
HttpCredentials {
? ? com.idoox.security.jaas.HttpLoginModule required debug=true;
};
KrbCredentials {
? ? com.ibm.security.auth.module.Krb5LoginModule required debug=false credsType=both;
};
CachedKrbCredentials {
? ? com.ibm.security.auth.module.Krb5LoginModule required debug=false useDefaultCcache=true;
};
NamePasswordNoAN {
? ? com.idoox.security.jaas.NamePasswordLoginModuleNoAuth required debug=true;
};
NamePasswordAN {
? ? com.idoox.security.jaas.NamePasswordLoginModule required debug=true;
};
NameDigestAN {
? ? com.idoox.security.jaas.NameDigestLoginModule required debug=true;
};
NameMapping {
? ? com.idoox.security.jaas.NameLoginModuleNoAuth required debug=true;
};
CertsMapping {
? ? com.idoox.security.jaas.CertsLoginModule required debug=true;
};

二、就是连接代码了

具体的就不贴出来了,主要是要下面的

System.setProperty("wasp.location",location);
System.setProperty("java.security.auth.login.config",location+"/jaas.conf.WSI");
System.setProperty("filenet.pe.bootstrap.ceuri",url);


Subject m_Subject = UserContext.createSubject(m_Connection,username,password,"FileNetP8WSI");

就是FileNetP8WSI,和上面的是一样的。

这样就可以接连好了。哈哈,挺高兴的。


下面是搜索到的资料也贴出来吧

1、Setting Up a Thin Client Application Development Environment Using CEWS Transport

http://publib.boulder.ibm.com/infocenter/p8docs/v4r5m1/index.jsp?topic=%2Fcom.ibm.p8.doc%2Fdeveloper_help%2Fcontent_engine_api%2Fguide%2Fgs_concepts_setup_thin_client_cews_transport.htm


2、java call filenet ejb api

http://blog.csdn.net/hyhbyl/article/details/6858305


3、FileNet_ecm_help中Developer Help>Content Engine Development>Java and .NET Developer's Guide>Geting Started>Concepts>Setting up a Thick Client Devlopment

CEWS transport protocol (non-application-server dependent)

When setting up a thick client development machine using the CEWS protocol,the following tasks are required.

NOTE ?Examples assume a default directory of C:Program Files. If your directory structure is not the default,modify the path in the examples to reflect your directory structure.

  • After the Content Engine client installation is performed,make sure the following JAR files are installed on the client machine: Jace.jar,log4j.jar,and wasp.jar (for Systinet). After a client installation,these files should be in the following locations:
    • For Systinet JAR files: C:Program FilesFileNetContentEnginewsilib
    • For Java API and log4j JAR files: C:Program FilesFileNetContentEnginelib

    (See Required Java Archive (JAR) Files for more information.)

  • Set the wasp.location property,specifying the directory in which Systinet WASP is installed,as shown in the example below:

    java -Dwasp.location=C:Program FilesFileNetContentEnginewsi

  • Specify the FileNetP8WSI login module for JAAS. (Note that you can use the FileNetP8WSI default stanza,which is bundled with the Jace.jar.) You can accomplish this task in one of the two ways described below.
    1. Add the FileNetP8WSI stanza to a JAAS configuration file and specify a JVM command line argument pointing to the file,as shown in the example below:

      Here is the stanza that must exist in the JAAS configuration file:

      FileNetP8WSI {
      ??? com.filenet.api.util.WSILoginModule required;
      };


      Here is the command line argument you provide to the JVM that tells the system which JAAS configuration file to use:

      -Dwasp.security.auth.login.config=C:jaas.conf

      and then use "FileNetP8WSI" in the constructor of the LoginContext JAAS class.
    2. Call UserContext.createSubject with a stanza name of "FileNetP8WSI":

      Subject subject = UserContext.createSubject(connection,"userid","password","FileNetP8WSI");
      UserContext uc = UserContext.get();
      uc.pushSubject(sub);
      try
      {
              // your code here
      }
      finally
      {
              uc.popSubject();
      }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读