Editing a connection-scope security policy

When a connection-scope security policy has been set up, that is a data source security entry has been added to a connection, you can further edit it according to your requirements.

To editing a connection-scope security policy, in the Data tab of the Catalog Browser, select the data source that contains the security policy, right-click the security entry in the Data Source Security node and select Edit Security from the shortcut menu. In the Security dialog, edit the security policy as required. See the dialog.

In addition, with the Security dialog, you can import security information from JReport Server, or import/export security information from/to external XML files as you like.

Importing security information from JReport Server

Besides defining users, roles and groups in JReport Designer, you can also use the users, roles and groups defined in JReport Server by importing user/role/group information from the server. Before importing, make sure that JReport Server has been started. Then:

  1. In the Security dialog, click Security > Import from JReport Server.

  2. In the Import from JReport Server dialog, specify the server information as required. See the dialog.
  3. Specify whether to replace or merge users, roles and groups with JReport Server by checking the corresponding radio button.
  4. Click OK to start importing.

Notes:

Importing/exporting security information from/to external XML files

You can import or export your security information from/to external XML files (*.acl.xml). To do this, on the Security menu of the Security dialog, click Import from File or Export to File.

The security information contained in the XML file is shown as follows:

You can create your own XML format security information files according to the above structure. However, the best way to generate an XML security information file is to use the Security dialog. With this dialog, you can edit the security information, and then export it to an external XML file.

For example, if the simple security policy has been set up as follows:

USER
User Name: d_d_u1
Belongs to Role: d_d_r1
Permissions: (@"Customer ID">=5 AND @"Customer ID"<=10) AND @"YTD Sales"<=65000
ROLE
Role Name: d_d_r1
Belongs to User: d_d_u1

The corresponding XML code would be:

<ACL version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <ACLEntry>
      <User>
         <Roles>d_d_r1</Roles>
         <UserName>d_d_u1</UserName>
         <SourceName>UserDefined</SourceName>
      </User>
      <Permission>
         <PermissionType>RLS</PermissionType>
         <PermissionName>visible</PermissionName>
         <Policy>
             <SCGroup>
                 <AndCondition>
                   <logic>AND</logic>
                   <Left>@&quot;Customer ID&quot;</Left>
                   <operator>&gt;=</operator>
                   <Right>5</Right>
                 </AndCondition>
                 <AndCondition>
                   <logic>AND</logic>
                   <Left>@&quot;Customer ID&quot;</Left>
                   <operator>&lt;=</operator>
                   <Right>10</Right>
                 </AndCondition>
             </SCGroup>
             <SCGroup>
                 <AndCondition>
                   <logic>End</logic>
                   <Left>@&quot;YTD Sales&quot;</Left>
                   <operator>&lt;=</operator>
                   <Right>65000</Right>
                 </AndCondition>
             </SCGroup>
         </Policy>
      </Permission>
   </ACLEntry>
   <ACLEntry>
      <Role>
         <RoleName>d_d_r1</RoleName>
         <Users>d_d_u1</Users>
         <SourceName>UserDefined</SourceName>
      </Role>
      <Permission>
         <PermissionType>RLS</PermissionType>
         <PermissionName>visible</PermissionName>
         <Policy></Policy>
      </Permission>
   </ACLEntry>
</ACL>

Note: If you want to use XML security information, you must first purchase a special license. For more information, contact Jinfonet Support (support@jinfonet.com).