Security
Also available as:
PDF
loading table of contents...

Importing and Exporting Tag-Based Policies

You can export and import policies from the Ranger Admin UI for cluster resiliency (backups), during recovery operations, or when moving policies from test clusters to production clusters. You can export/import a specific subset of policies (such as those that pertain to specific resources or user/groups) or clone the entire repository (or multiple repositories) via Ranger Admin UI.

Interfaces

You can import and export policies from the Access Manager>Tag Based Policies page:

You can also export policies from the Reports page:

Table 3.74. Export Policy Options

 Access Manager PageReports Page
FormatsJSON

JSON

Excel

CSV

Filtering SupportedNoYes
Specific Service ExportYesVia filtering

Filtering

When exporting from the Reports page, you can apply filters before saving the file.

Export Formats

You can export policies in the following formats:

  • Excel

  • JSON

  • CSV

    Note: CSV format is not supported for importing policies.

When you export policies from the Access Manager page, the policies are automatically downloaded in JSON format. If you wish to export in Excel or CSV format, export the policies from the Reports page dropdown menu.

Required User Roles

The Ranger admin user can import and export only Resource & Tag based policies. The credentials for this user are set in Ranger Configs > Advanced ranger-env in the fields labeled admin_username (default: admin/admin).

The Ranger KMS keyadmin user can import and export only KMS policies. The default credentials for this user are keyadmin/keyadmin.

Limitations

To successfully import policies, use the following database versions:

  • MariaDB: 10.1.16+

  • MySQL: 5.6.x+

  • Oracle: 11gR2+

  • PostgreSQL: 8.4+

  • MS SQL: 2008 R2+

Partial policy import is not supported.

See also: Importing and Exporting Resource-Based Policies