Installed Lua modules
LuaRocks is a package manager for Lua scripts. It allows you to create and install Lua modules as self-contained packages called rocks.
It is not possible to install additional rocks into the firmware, but several rocks have been preinstalled. The following table lists the preinstalled rocks that are available to the transformation rule scripting:
| Rock | Description |
|---|---|
| basexx | A Lua library which provides base2(bitfield), base16(hex), base32(crockford/rfc), base64(rfc/url), base85(z85) decoding and encoding. |
| binaryheap | Binary heaps are an efficient sorting algorithm. This module implements a plain binary heap (without reverse lookup) and a 'unique' binary heap (with unique payloads and reverse lookup). |
| cqueues | cqueues is a type of event loop for Lua, except it's not a classic event loop. It does not use callbacks—neither as part of the API nor internally—but instead you communicate with an event controller by the yielding and resumption of Lua coroutines using objects that adhere to a simple interface. |
| fifo | A Lua library/'class' that implements a FIFO. Objects in the FIFO can be of any type, including nil. |
| http | A HTTP library for Lua.
Note: By default, this library uses a shared cookie store and a shared HTTP Strict Transport Security store. These stores are shared across all requests from a WebSEAL instance.
If the target server uses cookies to maintain state that must not be shared across all requests, configure a separate cookie store for each request. |
| lpeg | LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). The nice thing about PEGs is that it has a formal basis (instead of being an ad-hoc set of features), allows an efficient and simple implementation, and does most things we expect from a pattern-matching library (and more, as we can define entire grammars). |
| lpeg_patterns | A collection of LPEG patterns. |
| lualdap | LuaLDAP is a simple interface from Lua to an LDAP client. It is a binding to OpenLDAP. It enables a Lua program to connect to an LDAP server, execute any operation (search, add, compare, delete, modify and rename), retrieve entries, and references of the search result.
Note: Configuring SSL connectivity to the LDAP server can be challenging. The lua-ldap-ca-cert-label configuration entry can be used to specify the label of the CA certificate to be used when you are validating the server certificate.
In addition to this, the various LDAP environment variables, (for example LDAPTLS_REQCERT and LDAPTLS_REQSAN), can be set with the [system-environment-variables] configuration stanza. For example, to disable server certificate validation, the following configuration entry can be set:
|
| luaossl |
IBM Verify Identity Access includes an extended version of this module along with following capabilities:
|
| luasocket | LuaSocket is a Lua extension library that provides support for the TCP and UDP transport layers, commonly needed by applications that deal with the Internet. |
| lua-cjson | Lua CJSON provides fast UTF-8 JSON parsing/encoding support for Lua. |
| redis-lua | A Lua client library for the redis key value storage system. |
| urlencode | A URL encoder/decoder with native extension. |