// Automatically set by JON server
configuration.setVersion(2);
PropertyList propertyList = new PropertyList("applicationPolicies");
PropertyMap applicationPolicy1 = new PropertyMap("jmx-console");
propertyList.add(applicationPolicy1);
// ------------------------------------
// Application Policy Properties
/* The following properties are used to describe the data found in the following
* example security domain:
*
* 1. <application-policy name="jmx-console"> 2. <authentication> 3. <login-module
* code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"> 4. <module-option
* name="usersProperties">props/jmx-console-users.properties</module-option> 5. <module-option
* name="rolesProperties">props/jmx-console-roles.properties</module-option> 6. </login-module> 7.
* </authentication> 8. </application-policy>
*/
/* Refers to line 1 in the example XML above.
* Note that the name of the property as exposed by the plugin is not necessarily identical to the underlying
* resource name for the property. Additionally, the display name of the property may further describe the
* property.
*/
applicationPolicy1.put(new PropertySimple("applicationPolicyName", "jmx-console"));
/* Refers to the login-module defined on lines 3-6. */
PropertyMap loginModule = new PropertyMap("userRolesLoginModule");
applicationPolicy1.put(loginModule);
loginModule.put(new PropertySimple("code", "org.jboss.security.auth.spi.UserRolesLoginModule"));
loginModule.put(new PropertySimple("flag", "required"));
PropertyMap loginModuleOptions = new PropertyMap("loginModuleOptions");
loginModuleOptions.put(new PropertySimple("usersProperties", "props/jmx-console-users.properties"));
loginModuleOptions.put(new PropertySimple("rolesProperties", "props/jmx-console-roles.properties"));
return configuration;
}