Instantiating a ShiroSecurityPolicy Object - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

A ShiroSecurityPolicy object is instantiated as follows

private final String iniResourcePath = "classpath:shiro.ini";
private final byte[] passPhrase = {
   (byte) 0x08, (byte) 0x09, (byte) 0x0A, (byte) 0x0B,
   (byte) 0x0C, (byte) 0x0D, (byte) 0x0E, (byte) 0x0F,
   (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13,
   (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17};
List<permission> permissionsList = new ArrayList<permission>();
Permission permission = new WildcardPermission("zone1:readwrite:*");
permissionsList.add(permission);

final ShiroSecurityPolicy securityPolicy = 
   new ShiroSecurityPolicy(iniResourcePath, passPhrase, true, permissionsList);