As a follow-up on this post :
set-the-application-security-on-connections-4.5-applications-updated.htm, I updated the script for Connections 5.0, and added the possibility to create an input file for the current situation.

This allows you to start from the current situation, and then modify the inputfile as you go.
Another use case would be in rolling out releases or changes : prepare your application’s security settings (for instance, disable all unauthenticated access, and add a group to the admin roles) in your Test environment, use the “get” script, copy everything to your Production environment and use the “set” script. You do have at least 1 additional environment next to your production environment, right ?

You can download them here , and change at your leisure:

Get the current situation:

These scripts depend on environment variables being set first , with the path to the outputfile.
To what you define as output file, the script will add a timestamp and “.txt”. So in the situation below, the end result will look like /tmp/outfile20141209190000.txt.

export APPSECURITYOUTFILE=/tmp/outfile
./ -lang jython -f /path-to/

You can edit the resulting file as input in the command.

Set the application security

export APPLICATIONSECURITYINPUTFILE=/tmp/modified.appsecurity.txt
./ -lang jython -f /path-to/