> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cystack.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Labeling and Policy Enforcement

> Guide to using the Data Labeling feature and applying label-based security policies

<Card>
  **Use Cases**

  * Classify documents to determine sharing permissions (allow or block).
  * Automatically assign labels to documents based on organizational rules.
  * Automatically block or allow the sharing of labeled data according to defined policies.
</Card>

## Understanding Document Labels

In CyStack Endpoint, administrators can define specific rules to automatically assign labels to documents on user endpoints. For example, a design firm wishing to prevent the external sharing of intellectual properties can configure the system to block the sharing of specific file types such as .psd, .psb, or .ai.

Data labels consist of the following components:

* **Data Rules**: Defined based on file name, file type, or content. Files with names, content, or types matching the criteria designed by the administrator will automatically receive the corresponding label.
* **Label Policies**: These determine sharing permissions—whether a document is allowed to be sent, restricted to specific channels, or strictly blocked. Administrators can define a unique policy for each label to control how labeled documents are handled.
* **A document may be assigned multiple labels** if its attributes match the rules of several different labels. In such cases, the system enforces the policy with the **most restrictive** sharing rules.

***Example:** If a file is assigned both <Badge color="green">Label A</Badge> with a `Block all sharing` policy and <Badge color="blue">Label B</Badge> with an `Allow via specific channels` policy {'\u2192'}, the system will apply the `Block all sharing` policy.*

***

## Creating and Applying Document Labels

Administrators can create document labels using the following workflow:

<Steps>
  <Step title={<>Access the dashboard, navigate to "Endpoint" {'\u2192'} "Data protection" {'\u2192'} "Data labeling".</>} />

  <Step title={<>Click the <code>New Label</code> button {'\u2192'} The "Create new label" screen appears.</>} />

  <Step title={<>Enter the <code>Label name</code>, <code>Description</code>, <code>Applicable devices</code>, and <code>Label policy</code>, then click <code>Continue</code>.</>}>
    <img src="https://mintcdn.com/cystack/NwFcT4Q52zfPNCn3/images/endpoint/en-labeling-create-label.png?fit=max&auto=format&n=NwFcT4Q52zfPNCn3&q=85&s=928f2e146b2026671450279b9abee3d1" alt="labeling-create-label" width="2048" height="1233" data-path="images/endpoint/en-labeling-create-label.png" />
  </Step>

  <Step title="On the next screen, configure the rules for the label.">
    You can set rules based on `File name`, `File type`, or a combination of both. Files with attributes matching these rules will be assigned this label.

    <img src="https://mintcdn.com/cystack/NwFcT4Q52zfPNCn3/images/endpoint/en-labeling-config-rule.png?fit=max&auto=format&n=NwFcT4Q52zfPNCn3&q=85&s=4bd7accff5b89bae5518d9d9b68bf26d" alt="labeling-config-rule" width="2048" height="664" data-path="images/endpoint/en-labeling-config-rule.png" />
  </Step>

  <Step title={<>Click the <code>Create Label</code> button {'\u2192'} The label will be created and displayed in the list.</>}>
    <img src="https://mintcdn.com/cystack/NwFcT4Q52zfPNCn3/images/endpoint/en-labeling-completed-label.png?fit=max&auto=format&n=NwFcT4Q52zfPNCn3&q=85&s=f8733692f34a5b8aa8f0fd9cbc54fd24" alt="labeling-completed-label" width="2048" height="752" data-path="images/endpoint/en-labeling-completed-label.png" />
  </Step>

  <Step title="The label will be automatically applied to matching files on endpoints." />
</Steps>

<Note>
  **Note:** Administrators can also define policies for documents that have not been assigned any label. For example, setting a default rule to block the sharing of unlabeled documents ensures maximum data control and reduces the risk of accidental leaks.
</Note>

To configure this, follow these steps:

<Steps>
  <Step title={<>In the default "Unlabeled" section, click the <code>Edit label</code> button.</>}>
    <img src="https://mintcdn.com/cystack/NwFcT4Q52zfPNCn3/images/endpoint/en-labeling-edit-label.png?fit=max&auto=format&n=NwFcT4Q52zfPNCn3&q=85&s=826c5cb970444c52164f7f2a706063e9" alt="labeling-edit-label" width="2048" height="745" data-path="images/endpoint/en-labeling-edit-label.png" />
  </Step>

  <Step title="Modify the policy applied to unlabeled files.">
    <img src="https://mintcdn.com/cystack/NwFcT4Q52zfPNCn3/images/endpoint/en-labeling-edit-rule.png?fit=max&auto=format&n=NwFcT4Q52zfPNCn3&q=85&s=3b75d3d1c7c38917da4f767f483390d8" alt="labeling-edit-rule" style={{display: 'block', margin: '0 auto'}} width="1306" height="460" data-path="images/endpoint/en-labeling-edit-rule.png" />
  </Step>
</Steps>

***

## Automatic Policy Enforcement on Endpoints

On user devices, security policies are automatically applied to documents based on their assigned labels. The available label policies are detailed below:

* **Block all sharing:** Documents with this policy cannot be sent via any channel.
* **Block direct transfer, allow link generation only:** Direct file sharing is blocked across all channels. To share the file, the user must generate a link and send it to the recipient. This method allows administrators to maintain control by auditing or approving sharing requests.
* **Allow via authorized channels:** Documents with this policy can only be shared through websites or applications explicitly authorized by the administrator.
* **Allow via all channels:** Documents with this policy can be shared freely across any channel without restriction.
