Configuration data
A Lua module API is provided to allow configuration data to be retrieved from the WebSEAL configuration file.
It is sometimes useful to be able to access the WebSEAL configuration data directly from a Lua
script. The Control.getConfig() function can be used to retrieve WebSEAL
configuration data. This capability is especially useful if the Lua script requires access to
sensitive information, for example an LDAP password. Rather than embedding the sensitive information
directly within the script, the information can be added as obfsucated data to the WebSEAL
configuration file and then accessed by using the Control.getConfig() function.
The [http-transformations:secrets] stanza can be used to store sensitive
information as all configuration entries that are added to this stanza are obfuscated.
The following example illustrates how to retrieve the bind-pwd configuration
entry from the [ldap] configuration stanza of the WebSEAL configuration file:
password = Control.getConfig("ldap", "bind-pwd")