Configuring security plugins - tooltwist/documentation GitHub Wiki

ToolTwist security plugins provide information to the Designer about what the current user is allowed to do.

Each plugin equates to a specific jar file. By default the command line Designer uses a plugin named ttsec-standaloneDesigner. To switch plugins, a few steps are required:

  1. Include the jar file dependancy in the gradle build. It is important that only one plugin is included, as they have identical packages and classes.

  2. Specify an appropriate login page is defined. For example, sometimes a password is required, and other times not.

  3. Define the plugin in site-conf/config/tooltwist.xml as a regular project.

  4. If a database is used, ensure that it is running and can be accessed.

Standalone Plugin

This plugin does not ask the user for a password. It is used for the command line (CLI) version of Tooltwist, and uses the current user's username as their userId.

The build.gradle should contain the following definitions:

// Provide a security plugin
compile group: 'com.tooltwist', name: 'ttsec-standaloneDesigner', version: TOOLTWIST_VERSION, transitive: true, changing: true
zipConfiguration "com.tooltwist:ttsec-standaloneDesigner:${TOOLTWIST_VERSION}:tooltwist-config@zip"
zipConfiguration "com.tooltwist:ttsec-standaloneDesigner:${TOOLTWIST_VERSION}:tooltwist-widgets@zip"
zipConfiguration "com.tooltwist:ttsec-standaloneDesigner:${TOOLTWIST_VERSION}:tooltwist-webcontent@zip"

In tooltwist.xml these definitions should be used:

<loginUrl>/tooltwist/basic/login-systemUser.jsp</loginUrl>

<project>
    <name>ttsec-standaloneDesigner</name>
    <type>directory</type>
    <path>ttsec-standaloneDesigner/config</path>
</project>

<webapp>
    ...
    <projectLayer>ttsec-standaloneDesigner</projectLayer>
</webapp>

MySql plugin

This plugin uses a Mysql database to store user names and passwords. This database uses the legacy security tables, as used for the past ten years, and may be replaced at some stage.

In build.gradle the following dependencies should be defined:

// Provide a security plugin
compile group: 'com.tooltwist', name: 'ttsec-mysql', version: TOOLTWIST_VERSION, transitive: true, changing: true
zipConfiguration "com.tooltwist:ttsec-mysql:${TOOLTWIST_VERSION}:tooltwist-config@zip"
zipConfiguration "com.tooltwist:ttsec-mysql:${TOOLTWIST_VERSION}:tooltwist-widgets@zip"
zipConfiguration "com.tooltwist:ttsec-mysql:${TOOLTWIST_VERSION}:tooltwist-webcontent@zip"

In tooltwist.xml these definitions should be used:

<loginUrl>/tooltwist/basic/login.jsp</loginUrl>

<project>
    <name>ttsec-mysql</name>
    <type>directory</type>
    <path>ttsec-mysql/config</path>
</project>

<webapp>
    ...
    <projectLayer>ttsec</projectLayer>
</webapp>

Tooltwist-auth Plugin

This plugin checks a user against a tooltwist-auth database, using it's RESTful API.

(work in progress)


⚠️ **GitHub.com Fallback** ⚠️