Groovy Module (Platform)

Last modified by Vincent Massol on 2012/05/18 11:58

cogPlatform-specific Groovy Compilation Customizers
TypeJAR
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise, XWiki Enterprise Manager

Description

This module complements the Commons Groovy Module  by adding the following features:

  • A Secure Customizer allowing to run Groovy scripts in a Security Sandbox

Secure Customizer

At this point in time the Secure Customizer is pretty restrictive in what it allows. We'll loosen it as a progress to allow more and more safe operations to be performed.

Currently:

  • Prevents bytecode expressions and sequences
  • Prevents synchronized blocks
  • Prevents imports
  • Prevents method definition
  • Prevents any token

Examples

Forbidden:

  • synchronized(this) { }
  • System.exit(0)
  • "Hello World".value[0]

Allowed:

  • new Integer(6)

Prerequisites & Installation Instructions

No Groovy Customizers are defined by default.

To add a Compilation Customizer see Groovy Module (Commons).

More specifically to enable the Secure Customizer, add the following to xwiki.properties:

groovy.compilationCustomizers=secure
Tags:
Created by Vincent Massol on 2012/05/18 11:48
    

Get Connected