Skip to main content

Overview

A Library is a Styra DAS resource that enables teams to share policies, policy fragments, and data across the enterprise. All Styra DAS Systems, Stacks, and other Libraries can import a Library in their policies.

Library resources replace the read-only Global resources, which are now deprecated, and introduce the ability to author and edit policies as well as manage data sources in a Library in the Styra DAS UI and the /v1/libraries API, in addition to Git-backed Library resources. Customers may continue to create and use Global resources, however this feature will not receive new functionality. To migrate existing Global policies and data to a Library, refer to the Migration page.

note

The Library functionality is enabled by a tenant-level feature flag. If this feature is disabled for your tenant, contact Styra customer support or your organization's Self-Hosted Styra DAS administrator.

Create a Library

Libraries appear in the Styra DAS UI below the Workspace, Systems, and Stacks sections of the navigation panel and above the legacy Globals section.

To create a Library:

  1. Login to the Styra DAS UI.
  2. In LIBRARIES, click Add (the ⨁ icon). The Add Library dialog box appears.
  3. Type in the Library Name. The library name is used as part of the Rego libraries package and is referenced as data.libraries.
  4. (Optional) Type the description for the Library.
  5. (Optional) Use Read-only to prevent users from editing policies in the Styra DAS UI and only allows policies to be edited through the Styra API or via a connected Git repository.
  6. Click Add library.

The library is created.

Optionally, configure the Library to Use Git Storage.