The basic provision of the plugin are twin macros that store sql and generate a cachable table of information from a database when viewed. Sending SQL and building a cached table of data from the result is the trivial part of the task. The more difficult part is controlling access and monitoring usage so the plugin doesn't generate performance problems either on the Confluence server or the database. The plugin also contains a generic macro to cache results from any plugin.

At the time of this development, there are several commercially available plugins that do the same thing. There are two reasons for authoring this work. First is cost. We presently have an unlimited user license for our Confluence instance and are looking to try out a few experiments that need to pull data from a database. It was a rather expensive proposition to buy an unlimited user license to one of the commercial SQL plugins as we experiment with how we want to to use the functionality. By releasing this code open source, it allows others to explore this functionality with minimal cost.

The second rationale for making yet another SQL plugin was wanting a different security paradigm. This plugin allows the Confluence administrators to set some limits to protect Confluence and then delegate access to others to manage the connection profiles. When creating a profile, there is a provision to specify which users are allowed to use the profile so that only users who know how to safely write SQL against the database can. The Confluence administrator can also setup an audit log in three ways. First, by sending email to a generic account. Secondly, by inserting a row into a audit log database. Finally, by inserting entries into the atlassian-confluence.log file.

At present, the plugin should be able to talk to DB2, Derby, Microsoft SQL Server, MongoDB, MySQL, Oracle, PostgreSQL and Sybase; however, only Microsoft SQL Server, MySQL, Oracle and PostgreSQL have been tested at this time.

Share this project:

Updates