> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/pam/administration/assets/folders-and-tags.md).

# Folders and tags

Build the asset folder tree, file assets into it, and use folders as the target of rules — plus what tags do that folders do not.

## What this is and when to use it

Folders and tags are the two ways of grouping assets, and they are not interchangeable.

A **folder** — called a **Node** wherever a form asks for one — is a position in a hierarchy you build. Its value is that rules can point at it: an authorization, a rotation task, or a discovery policy can name a folder instead of a list of assets, and every asset in that folder is covered, including the ones added tomorrow.

A **tag** is a flat `key: value` label. An object can carry several, and tags cut across the hierarchy — `env: prod` can sit on assets in six different folders. Tags filter lists; with few exceptions they do not grant anything.

|                       | Folders (Nodes)                                            | Tags                                         |
| --------------------- | ---------------------------------------------------------- | -------------------------------------------- |
| Shape                 | A tree, from the `DEFAULT` root                            | Flat `key: value` labels                     |
| Built by              | You, per environment, client, or purpose                   | You, ad hoc, as you register objects         |
| Used as a rule target | Yes — authorizations, automation tasks, discovery policies | No                                           |
| Used to filter lists  | Yes                                                        | Yes                                          |
| Applies to            | Assets                                                     | Assets, accounts, templates, users, gateways |

{% hint style="info" %}
[Asset inventory](https://wiki.datadike.com/pam/administration/assets/inventory.md) describes the folder panel as a filtering device — the two trees, the `Folder: DEMO` marker, **Clear all**. This page is about building the structure and using it as more than a filter.
{% endhint %}

Two trees exist side by side in the panel, and only one of them is yours:

* **Asset Folders** — the structure you build, from the `DEFAULT` root.
* **Type Folders** — automatic grouping by platform type. It is a view, not a place. You cannot file anything into it and nothing you do there changes an asset.

## Before you start

* A criterion for the hierarchy, chosen before you start creating folders — environment, client, business unit, or criticality. Whatever it is, it should be the thing your authorizations will want to name.
* The **SYSADMIN** profile.

Choose the criterion by asking what a future authorization will need to grant. A tree organized the way your access rules think is worth more than one organized the way your rack is wired.

## Steps

1. Open **Environment › Assets**. The **Asset Folders** tab of the right-hand panel holds the tree, starting from `DEFAULT`.
2. Build the structure you need under `DEFAULT`. The counter at the top of the panel reports how many folders exist.
3. File each asset: open the asset's details and use the **Node** block to place it in a folder. On the create form, the **Node** field does the same thing at registration time.
4. Add **Tags** from the same details panel for the cross-cutting labels — owner, environment, criticality.
5. For assets that arrive by themselves, set the folder in a discovery **sync policy** instead of by hand: an action with resource type **Node** files every newly discovered asset that matches the policy's conditions. See [Discover assets on the network](https://wiki.datadike.com/pam/administration/assets/discovery.md).

## What folders are used for

Filtering the list is the least of it.

| Where                                                                                                  | How the folder is used                                                                                                           |
| ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| [Authorizations](https://wiki.datadike.com/pam/administration/access/authorizations.md)                | The **Nodes** field grants a whole folder — for example `/OFFICE`. Assets filed there later are covered without editing the rule |
| [Rotate credentials](https://wiki.datadike.com/pam/administration/accounts/rotation.md) and push tasks | **Assets or Nodes** targets a folder, so the task follows the folder's contents                                                  |
| [Discovery](https://wiki.datadike.com/pam/administration/assets/discovery.md) sync policies            | An action of resource type **Node** decides where a newly found asset lands                                                      |
| [Managed accounts](https://wiki.datadike.com/pam/administration/accounts/managed-accounts.md)          | The **Asset tree** in the side panel filters accounts by asset group                                                             |
| A user's **Authorized assets** tab                                                                     | The tree filters the assets that user can actually reach                                                                         |
| The user's own access list                                                                             | Users filter their devices by folder, alongside **Favorites**                                                                    |

This is the reason to keep the tree tidy. A folder named in three authorizations and two rotation tasks is a piece of your access policy, not a convenience for browsing.

## What tags are used for

* **Filtering.** Asset, account, and template lists each carry a **Tags** control that filters by the labels attached.
* **Feature input, occasionally.** Tags are not always inert: the publishing machine for a virtual access application is chosen at random by default, and a tag in the asset's configuration pins a specific machine instead. Treat a tag as data the product may read, not only as a note to yourself.

**Sysadmin › Others › Tags** lists the tags that exist in the tenant. It is worth opening after a bulk import.

{% hint style="warning" %}
On import, **a tag that does not exist is created automatically**. A typo does not fail — it silently creates a second, nearly identical tag, and the filter you build later quietly misses half the assets. Check the tag list after any bulk import of assets or users.
{% endhint %}

Tags are written as `key: value` pairs, and in an import file they are a JSON array of strings: `["env: prod", "owner: dbteam"]`.

## How to verify it worked

Filing an asset is easy to confirm and proves nothing. Verify that the **folder scope** works, because that is what you are actually relying on:

1. Create an authorization whose target is a folder rather than a list of assets, and grant it to a test user.
2. Confirm the test user sees the assets currently in that folder.
3. Now file a **new** asset into the same folder, and change nothing else.
4. The test user must see the new asset without any edit to the authorization. If they do not, the rule is targeting assets individually and the folder is decorative.

For tags, filter a list by the tag you just applied and confirm the asset appears — then confirm no near-duplicate of that tag exists in **Sysadmin › Others › Tags**.

## Common errors

| Symptom                                                    | Cause                                                             | Fix                                                                          |
| ---------------------------------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| The asset count on a folder looks wrong                    | Counts are refreshed by a periodic task, not on every change      | Trust the filtered list, not the badge. The count catches up on the next run |
| A new asset in a granted folder is not visible to the user | The authorization names assets individually instead of the folder | Change the rule to target the **Node**                                       |
| A tag filter returns fewer assets than expected            | A near-duplicate tag was created by a typo during import          | Check **Sysadmin › Others › Tags** and consolidate                           |
| Assets appear in a folder you never created                | That is **Type Folders**, the automatic grouping by platform      | Switch to the **Asset Folders** tab                                          |
| Reorganizing the tree breaks access                        | An authorization or a task named a folder you moved or renamed    | Check which rules name a folder before restructuring it                      |
| A rotation task suddenly covers more hosts                 | It targets a folder, and assets were filed into it                | Expected. Folder-scoped tasks follow the folder                              |

## Field reference

| Item                 | Where                                          | What it is                                     |
| -------------------- | ---------------------------------------------- | ---------------------------------------------- |
| Asset Folders        | The panel on **Environment › Assets**          | The tree you build, from the `DEFAULT` root    |
| Type Folders         | The same panel                                 | Automatic grouping by platform type. Read-only |
| Node                 | Asset create form, and the asset details panel | Files the asset in the folder tree             |
| Nodes                | Authorization form                             | Grants a whole folder                          |
| Assets or Nodes      | Rotation and push tasks                        | Targets individual assets, folders, or both    |
| Resource type = Node | Discovery sync policy action                   | Files newly discovered assets into a folder    |
| Tags                 | Asset, account, template, and user forms       | `key: value` labels. Several per object        |
| Tags                 | List toolbars                                  | Filters the list by tag                        |

## Related pages

* [Asset inventory](https://wiki.datadike.com/pam/administration/assets/inventory.md) — the folder panel and how filtering behaves
* [Discover assets on the network](https://wiki.datadike.com/pam/administration/assets/discovery.md) — filing new assets automatically
* [Authorizations](https://wiki.datadike.com/pam/administration/access/authorizations.md) — granting a folder instead of a list
* [Rotate credentials](https://wiki.datadike.com/pam/administration/accounts/rotation.md) — folder-scoped automation targets
* [Platforms](https://wiki.datadike.com/pam/administration/assets/platforms.md) — what **Type Folders** groups by
