title: Credentials exception when running Filenet-based web app on Websphere Application Server
body: <p>I have developed a REST service that retrieves data from the content engine storage. For simplicity I've created user account with read-only privileges and used it for CE authorization, using the following code:</p>
  
  <pre><code>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);
  </code></pre>
  
  <p>During development I tested my service on local Tomcat server and everything worked fine. Now I've deployed that service on Websphere Application Server where ContentEngine is located and when I try to access my REST service I get the following exception:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>Is any extra configuration required for WAS to make this approach work? Or maybe a better approach exists for addressing authorization issue?</p>