Friday, February 8, 2013

EZProxy wish list: Better scripting support

EZproxy has a built-in expression language that is used in various capacities within config.txt.  A common mechanism is to use the expressions during login to set variables that can be used in other parts of the login sequence, or later on in database definitions.  I have even seen references to these variables being able to be parsed in the various EZproxy HTML files to do things like add a link in web pages for administrators to navigate to the /admin URL easily.

It is a powerful feature, no doubt, but one that is shrouded in mystery and mystique.

Then there are the conditions and actions settings, which can be used in the user.txt file.  A common technique is to use these to override access for specific accounts retrieved from a central account repository.

And while we're talking about scripting, let's not forget about SPUEdit as well.  I'm not sure that I totally understand the purpose of this directive, but I think it's intended to be used to provide a way to accommodate legacy links while not having to fill your database stanzas with cruft for old Starting Point Urls (hence the SPU in SPUEdit).

Here's today's challenge, though:  Find a good Howto, Tutorial, or Cookbook reference for EZproxy's expression language.  

Go ahead, I'll wait...

Couldn't find one either, eh?

This is something that OCLC needs to address in addition to finishing out the EZproxy reference manual.  Producing a Cookbook document showing various goals, and how to achieve them using EZproxy's expression language would go a long way towards documenting the expression language, and perhaps open our eyes to ways to harness the power of this facility to accomplish things that we cannot today.

Earlier in this series, I had put for the idea of adopting Lua for scripting within EZproxy for services that needed to perform a authentication handshake to generate a token value for patrons to use to connect to the service.

Why not go all the way, and adopt Lua as the internal scripting language for all of EZproxy?  This would give EZproxy the benefit of a mature scripting language with third party library support.

Want to authenticate against a SQL database?  You're out of luck today if you are not running Windows and can use ODBC.  But with LuaSQL, you could tie into the most popular databases on the market from either platform.  Want to go all Web 2.0 and adopt OAuth, OpenID, or some other authentication framework?  I'm pretty sure you can find Lua support for it.

This is why opening up EZproxy would be a good thing for OCLC.  They would not have to go all the way to open sourcing EZproxy (which I think would be a good thing for them to do), even if all they did was open up and expose APIs and interfaces, and adopt a standard scripting language that could be extended, it would be a fantastic step in the right direction.

No comments:

Post a Comment