21 January 2010

Handling HTTP POST requests in Livelink, Part One

I recently found myself needing to handle HTTP POST requests in Livelink. I could control the Livelink URL the request was sent to, but I could not control the POST body. There were two parts to the challenge, and one had a happy answer, whilst the other did not.

First, I created a new Livelink module and orphaned a request handler. In this particular case, I orphaned WebDsp:WebDsp Root:RequestHandler because I did not want or need a Livelink login. I then tested submitting the HTTP POST using a form like this one:

<form method="POST"
action="/Livelink/livelink.exe?func=myhandler">

To my surprise, the request was not sent to my handler. I was instead sent to the Livelink login form with a nextURL pointing at func=llworkspace, i.e., the default request handler.

It turns out that Livelink ignores query parameters in the URL on a POST request. When my request got to the Dispatch function, there was no visible "func" parameter, so the default request handler was called.

The solution is to add a PathInfoHandler, and embed the request for myhandler in the path info:

<form method="POST"
action="/Livelink/livelink.exe/mypathhandler">

I orphaned WebDsp:WebDsp Root:PathInfoHandler and overrode the 0 Setup script to contain:

.fReplacementArgs = {{ 'func', 'myhandler' }}
.fPathInfoName = 'mypathhandler'

So now Livelink sees the /mypathhandler in the URL path info, and infers a func=myhandler query parameter from that. (The use of two different names is completely optional, and I think undesirable. I have used them only to make the distinction clear.)

14 January 2010

Restricting Documentum superuser logins

All of the documentation for the restrict_su_ticket_login property of the server config object says that it restricts superuser access with global login tickets. Even the DA UI label says "Restrict superusers from connecting to the server using a global login ticket".

I tested this with other ticket scopes:

API> getlogin,c,dmadmin,docbase
...
DM_TICKET=xyzzy
API> connect,dctm65,dmadmin,DM_TICKET=xyzzy
...
[DM_SESSION_E_AUTH_FAIL]error: "Authentication
failed for user dmadmin with docbase dctm65."

So I filed a ticket with EMC, and after conferring with their developers for three months they have decided that it's a doc bug. The restrict_su_ticket_login restricts all login tickets for superusers, of any scope, and not just global login tickets.

08 January 2010

Introduction

I'm finally joining the 21st century and starting a blog. What's this about? Like most other technical folks, I depend heavily on digging up esoteric nuggets on the web to do my job. The Wikipedia pledge drive (you did donate to Wikipedia, didn't you?) reminded me of the need to give back.

Back in the days of Usenet (even unto the forgotten time of UUCP) I was a contributor to topics on C++, Java, and JDBC. With the lapse of Usenet I helped out for while in the Netscape server newsgroups, but then work and family filled my time.

Here then, is my incredibly modest attempt to share things that I dug up myself when they might be of some use to others. Most of these will probably have something to do with EMC Documentum, Open Text Content Server (once and still Livelink), or the Google Search Appliance.

If you're still reading this, please go find something defensibly worthwhile to do instead.