#### Configuring security

JReport Designer allows you to allocate security permissions to different principles (users, groups and roles), and thus you can make the cube elements in a business/report cube available only for some special principles.

To configure security for a business/report cube, follow the procedures below:

1. Add or import principles.
2. Set the permissions to the cube elements of the business/report cube.
3. Save the catalog to save the security configuration.

##### Adding or importing principles

Before you can configure security for a business/report cube, you first need to define the principles. To do this, in the Business/Report Cube Editor window, click Tools > Security Configuration to display the Security Configuration dialog. You can either add principles manually or import them from JReport Enterprise Server. See the dialog.

- To add principles manually, follow the steps below:
  1. In the Security Configuration dialog, check the Add Role/Group/User manually option.
  2. In the Role/Group/User tab, click the Add button to add a role/group/user, and give a description for it as required.
  3. Click OK to save the settings.
- To import principles from JReport Enterprise Server, you must first make sure that JReport Enterprise Server has been started. Then,
  1. Check Import from JReport Enterprise Server in the Security Configuration dialog.
  2. Click the Options button, and specify the connection information in the Import from JReport Enterprise Server dialog, then click OK to connect to the server.
  3. All the principles defined in JReport Enterprise Server will then be imported, and you can click OK to save them.

##### Setting permissions

To set permissions to the cube elements of a business/report cube, follow the steps below:

1. Right-click the cube element in the Business/Report Cube Editor window, and then choose the corresponding item for editing the cube element.
2. In the Edit Cube Element dialog, click the Security tab and set permissions to the element as required. See the dialog.

   The Visible permission controls whether a principle can view the business/report cube element in the resource tree of JReport Web and whether he or she can perform actions based on the element. These actions include inserting, removing, grouping by, drilling down, drilling to, and drilling to by value. Filtering and sorting are not under security control.

3. Click OK to save the permission settings.

##### Saving the configuration

When you save the catalog, the permission settings are also saved and they are saved in an authorization file in the same folder as the catalog file. The catalog and authorization files have the same file name but different extensions, for example, if the catalog file is test.cat, the authorization file will be named test.auth. The authorization file is loaded by the cube authorization manager of its catalog during runtime.

Note: You can configure security for categories and cube elements when creating them, that is, in the Category Property or Add Cube Element dialog, switch to the Security tab, and then set the permissions as above. If there is no principle specified to the business/report cube, the Security Configuration dialog will be displayed automatically for you to add or import principles.