编程语言
首页 > 编程语言> > java-在Websphere Application Server上运行基于Filenet的Web应用程序时出现凭据异常

java-在Websphere Application Server上运行基于Filenet的Web应用程序时出现凭据异常

作者:互联网

我已经开发了一种REST服务,可以从内容引擎存储中检索数据.为简单起见,我使用以下代码创建了具有只读特权的用户帐户,并将其用于CE授权.

UserContext context = UserContext.get();
Connection connection = Factory.Connection.getConnection("connection.url");
Subject subject = UserContext.createSubject(connection, "connection.username", "connection.password", "connection.stanza");
context.pushSubject(subject);

在开发期间,我在本地Tomcat服务器上测试了我的服务,并且一切正常.现在,我已将该服务部署在ContentEngine所在的Websphere Application Server上,当我尝试访问REST服务时,出现以下异常:

Error 500: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.filenet.api.exception.EngineRuntimeException: FNRCS0005E: SECURITY_INVALID_CREDENTIALS: Access to the Content Engine was not allowed because the Content Engine API library or the Web Service Interface (WSI) Listener could not find the required security context information. Expected credentials were not found in the security context.

WAS要使此方法有效,是否需要任何额外的配置?还是存在解决授权问题的更好方法?

解决方法:

我已经设法通过使用不同的节来解决该问题.由于某种原因,我使用的那个(默认是FileNetP8)与Tomcat完美结合,但是Websphere Application Server出现了问题.在WAS安全性登录配置中,我找到了FileNetP8WSI节,它起到了作用.

标签:jaas,websphere,java,filenet-p8,filenet
来源: https://codeday.me/bug/20191031/1973417.html