The output of the export command and the input to the import command is called a catalog. It's a set of folders and files that comprise the server's internal database, including users, roles, scheduled jobs, and repository resources such as reports and associated files. When you don't need the entire database, you can specify options to export only the contents you need, for example one role and its users.
The catalog can be exported either as a hierarchy of folders and files, or as a single zip file (compressed archive). Regardless of the catalog format, the content of the catalog is not intended for external access. Objects in the database, such as users, roles, and folders are described in XML files, and repository resources are stored in various private formats consisting of data files and subfolders. The XML syntax of the catalog files is not publicly defined, and the data files aren't meant to be accessed.
To access and interact with the server's internal objects, use the REST v2 API. This web service has well defined datatypes and resource descriptors in XML or JSON formats and a complete set of methods for reading and writing objects on the server. For more information, see the JasperReports Server REST API Reference.
While user passwords and data source passwords are encrypted in exported catalogs as well as in the server's internal database, you should still take appropriate measures to secure the catalog file from unauthorized access. Catalog files may contain sensitive metadata such as user names, database URLs, and customer information. Catalog files may also contain data in the form of report output such as the PDF of an executive report. |
Dependencies During Import and Export
The resources in the repository often have dependencies on other resources, for example a report that relies on images, input datatypes, and a data source. When exporting a resource, you have the option of including all of its dependencies, even if they are stored in folders that were not selected in the repository. Importing a catalog that contains such dependencies will re-create the same folder structure in the target repository. Once imported, you can move and redefine the dependencies of these resources.
The Import-Export Encryption Keys
As of JasperReports Server 7.5, the management of the encryption keys used during import and export has been automated. These encryption keys are used by the server to encrypt user passwords so they are not revealed in export catalogs.
In previous versions of the server, the import-export key had to be configured manually and shared between servers. Beginning with version 7.5, the server creates and manages its import-export key internally, and also includes a copy of the key in the export catalog so that the importing server can decrypt the catalog.
The following table summarizes the three cases for importing catalogs into the current version of the server:
Origin of Export Catalog | Status of the Import-Export Key |
---|---|
Prior to version 7.5 with default key | The server handles previous export catalogs created with legacy keys, and even older catalogs that did not use encryption. |
Prior to version 7.5 with custom import-export keys | The custom keys were not included in the export catalogs. In order to import these catalogs into the latest server, you will need to give the server a copy of the custom key. When importing from the UI, there are optional fields for specifying your custom key, and the command-line import utility has options to import custom keys. |
Version 7.5 and later | If you manage several severs such as test and production servers, and you need to move export catalogs between them, you will need to share key between them. Once the keys are shared, export catalogs can be exported from either sever and imported into the other one. |
The JasperReports Server Security Guide documents the following import and export operations:
• | Importing catalogs from older servers with custom keys. |
• | Importing keys used by other servers. |
• | Exporting catalogs with specific key. |
• | Exporting keys for use in other servers. |
• | Creating keys for use in multiple servers. |
Once you have imported data from your old server, if necessary, and shared keys between your servers, if you have more than one instance of JasperReports Server, those operations are no longer needed, and you can rely on the commands and options documented in the rest of this chapter.
Recommended Comments
There are no comments to display.