IBM Verse on Premises 1.0.0.1 integration with Connections Files. How to make it work – Updated

 

I installed Verse on Premises 1.0.0.1 in my environment but when I tried to add a link to a file in Connections when composing an email I got an error “Sorry we cannot retrieve your files at the moment”.

After a chat with my excellent friend and IBM Champion Christoph Stoettner, he found the problem and the solution.
The official documentation about integrating VoP with Connections says to add a few lines at the end of the httpd.conf file:

 

  • Make a backup copy of httpd.conf.
  • Remove any comment symbols (#) from the following lines:
    LoadModule headers_module modules/mod_headers.so
    LoadModule rewrite_module modules/mod_rewrite.so
  • Find the following two lines:
    LoadModule was_ap22_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so
    WebSpherePluginConfig /opt/IBM/WebSphere/Plugins/config/webserver1/plugin-cfg.xml

    Copy the following lines and paste them directly after the two lines:

    RewriteEngine on
    
    # Minor change to adjust for Cloud vs On-Premises API variation of parameter name
    RewriteCond %{REQUEST_METHOD} PUT
    RewriteCond %{QUERY_STRING} ^(.*)uid=(.*)
    RewriteRule ^/profiles/photo.do /profiles/photo.do?%1userid=%2 [L]
    
    # Added necessary CORS headers when Origin header present
    Header unset Access-Control-Allow-Origin
    SetEnvIf Origin "^https://(vop_server_hostname\.)?(domain_name)$" origin_is=$0
    Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is
    Header always set Access-Control-Allow-Credentials "true" env=origin_is
    Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, slug" env=origin_is
    Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" env=origin_is
    
    Header always set Access-Control-Max-Age "1000" env=origin_is
    Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" env=origin_is
    # Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding, slug" env=origin_is
    Header always set Access-Control-Allow-Headers "X-Requested-With, Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma, slug, X-Update-Nonce" env=origin_is
    Header always set Access-Control-Expose-Headers "Content-Disposition, Content-Encoding, Content-Length, Date, Transfer-Encoding, Vary, ETag, Set-Cookie, Location, Connection, X-UA-Compatible, X-LConn-Auth, X-LConn-UserId" env=origin_is
    
    # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
    RewriteCond %{REQUEST_METHOD} OPTIONS
    RewriteRule .* - [R=200,L]
    
    # Remove the Origin header if it exists for other requests (POST, GET, DELETE, PUT). Causes problems with Connections returning 403 response.
    RequestHeader unset Origin env=origin_is

     You have to change this line

    SetEnvIf Origin "^https://(vop_server_hostname\.)?(domain_name)$" origin_is=$0

    putting your server name and domain name.
    Examples
    vop_server_hostname = mail01
    domain_name = company.com

    `SetEnvIf Origin “^https://(mail01\.)?(company\.com)$” origin_is=$0`

This is not enough.
Since in the httpd.conf I use a virtual host, as is common in Connections, you need to add those lines also in the virtual host definition, so I copied them after the line

SSLProtocolDisable SSLv2 SSLv3

in the virtual host definition.

Restarted the http server and now the integration works.

UPDATE

The excellent Tim Clark, a good friend of mine and an IBM Champion, made a couple of interesting and useful suggestions in his comment to this post. I will put them here because not everyone read the comments

  1. It is possible to make the https optional with the following RegEx, http(s)?
    So it all looks like this in the end.
    `SetEnvIf Origin “^http(s)?://(mail01\.)?(company.com)$” origin_is=$0`
  2. you can put all the lines to copy and paste in a separate file so that you don’t have to have it listed twice in your httpd.conf file and then use an include to insret it (**twice**) where you need it.`Include “X:\IBM\HTTPServer\conf\vop.conf”`

 

Want a discount for attending IBM Connect ?
A kind request to conference organizers

Comments

  1. TimsterC (@TimsterC)
    15th February 2017 - 20:08

    So this works, so long as you edit the following line and don’t just cut and paste it without editing.

    `SetEnvIf Origin “^https://(vop_server_hostname.)?(domain_name)$” origin_is=$0`

    Examples
    vop_server_hostname = mail01
    domain_name = company.com

    `SetEnvIf Origin “^https://(mail01.)?(company.com)$” origin_is=$0`

    I would also recommend making the https optional with the following RegEx, http(s)?
    So it all looks like this in the end.
    `SetEnvIf Origin “^http(s)?://(mail01.)?(company.com)$” origin_is=$0`

    Also you can put this in a separate file so that you don’t have to have it listed twice in your httpd.conf file and then use an include to inset it (**twice**) where you need it.

    `Include “X:IBMHTTPServerconfvop.conf”`

Leave a Reply

Your email address will not be published / Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.