[Yandex Cloud documentation](../../../index.md) > [Yandex Security Deck](../../index.md) > [Step-by-step guides](../index.md) > [Data Security Posture Management (DSPM)](index.md) > Creating a data source

# Creating a DSPM data source

{% note info %}

This feature is at the [Preview](../../../overview/concepts/launch-stages.md) stage.

{% endnote %}

A [data source](../../concepts/dspm.md#data-source) contains information about the storages to scan and additional settings. The available storages are Yandex Object Storage [buckets](../../../storage/concepts/bucket.md) and [disks](https://yandex.com/support/yandex-360/business/disk/web/en/index.html) in Yandex 360. You cannot use both [Object Storage](../../../storage/index.md) and [Yandex 360](https://yandex.com/support/yandex-360/business/admin/en/) storage in the same data source.

## Getting started {#before-begin}

Before you start using the DSPM module, set up your [workspace](../../concepts/workspace.md) and specify the default folder to store [Data Security Posture Management](../../concepts/dspm.md) (DSPM) data:

{% list tabs group=instructions %}

- Security Deck UI {#console}

  1. Go to [Yandex Security Deck](https://center.yandex.cloud/security/).
  1. In the left-hand panel, select ![database-magnifier](../../../_assets/console-icons/database-magnifier.svg) **DSPM**.
  1. If the Security Deck settings window opens, this means the DSPM data storage folder has not been configured. Under **Choose your default folder**, select a folder to store the module data by default and click **Save** at the bottom of the page.
  1. If the **DSPM** UI opens, this means the module's data storage folder has already been configured, so you can continue working.

      You can change the **DSPM** data storage folder path. To do this, navigate to the **Settings** tab. Under **Default storage**, select another folder.
  1. Activate DSPM in the current workspace. To do this, click ![wrench](../../../_assets/console-icons/wrench.svg) **Configure DSPM** at the top right.

      In the window that opens, navigate to the **Control modules** tab. Under **Control modules**, select the **Data Security Posture Management (DSPM)
** module and click **Save**.
  
      If you have no workspaces yet, [create](../workspaces/create.md) one and activate the **Data Security Posture Management (DSPM)
** when creating the workspace.

{% endlist %}

## Creating a data source for Object Storage {#object-storage}


{% list tabs group=instructions %}

- Security Deck UI {#console}

  1. Go to [Yandex Security Deck](https://center.yandex.cloud/security/).
  1. In the left-hand panel, select ![Database-Magnifier](../../../_assets/console-icons/database-magnifier.svg) **DSPM** and go to the **Data sources** tab.
  1. In the top-right corner, click **Create source** ![chevron-down](../../../_assets/console-icons/chevron-down.svg) and select ![storage-logo](../../../_assets/storage/storage-logo.svg) **Object Storage**.
  1. Add the resources you want to scan to the data source:
      * To add individual buckets, click ![circle-plus](../../../_assets/console-icons/circle-plus.svg) **Select bucket** and select one or more buckets from available folders.

          You can filter buckets by access settings (`Restricted` or `Public`) and by bucket name as needed.

      * To add [clouds](../../../resource-manager/concepts/resources-hierarchy.md#cloud) or [folders](../../../resource-manager/concepts/resources-hierarchy.md#folder) to your data source, click ![circle-plus](../../../_assets/console-icons/circle-plus.svg) **Select cloud or catalog** and select all or some of the available clouds and/or folders.

          After you select clouds and folders under **Include in scan**, select the buckets to scan:

          * **All buckets**
             The data source will include all buckets in the selected clouds and folders. In which case the scan will cover not only the buckets existing at the time you create the data source but also those you add to these clouds and folders by the time you run the scan in the future.
          * **Public buckets**
             The data source will include buckets with [public access](../../../storage/operations/buckets/bucket-availability.md) configured. Only these buckets will be scanned for personal data. Disable public access for these buckets to automatically remove them from the scan.

  1. Under **Include in selection**, specify one or more scan scopes:

      * `All files`: To scan all files saved in the buckets.
      * `DOC / TXT`: To scan `.doc`, `.docx`, and `.txt` text files.
      * `XLS / CSV`: To scan `.xls`, `.xlsx`, and `.csv` spreadsheet files.
      * `PPT`: To scan `.ppt` and `.pptx` presentation files.
      * `PDF`: To scan `.pdf` document files.
      * `HTML / XML`: To scan `.html` and `.xml` files.
      * `Images`: To scan `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`, and `.svg` image files.
      * `Custom filter`: To scan all files whose names do or do not match the specified patterns:
      
          * **The file name contains**: To scan files whose names match the specified pattern.
          * **The file name does not contain**: To ignore files whose names match the specified pattern.
      
          Specify the patterns using the [RE2](https://github.com/google/re2/wiki/Syntax) [regular expression](https://en.wikipedia.org/wiki/Regular_expression) syntax. You can specify patterns in both fields, in which case the scan will use the `AND` logic to select files.
      
      You can select multiple filters at the same time; the system will use the `OR` logic to apply them.

  1. If you want to add resources with different scan scope selection settings to the same data source, click **Add a resource group** and repeat steps `4` and `5` in the section that appears.

      You can add any number of resource groups to a single data source for scanning.

  1. Under **Information about source**, indicate the data source name you will use to select this source when [creating a scan](create-scan.md). Follow these naming requirements:
     
     * Length: between 3 and 63 characters.
     * It can only contain lowercase Latin letters, numbers, and hyphens.
     * It must start with a letter and cannot end with a hyphen.
     
     Click ![Arrows-Rotate-Right](../../../_assets/console-icons/arrows-rotate-right.svg) on the right side of the **Name** field to automatically generate a name for the data source you are creating.
  1. Click **Create source**.

  As a result, the new source will appear in the list of data sources. Now you can select this data source when [creating a scan](create-scan.md).

{% endlist %}


## Creating a data source for Yandex 360 {#yandex-360}

{% list tabs group=instructions %}

- Security Deck UI {#console}

  1. Go to [Yandex Security Deck](https://center.yandex.cloud/security/).
  1. In the left-hand panel, select ![Database-Magnifier](../../../_assets/console-icons/database-magnifier.svg) **DSPM** and go to the **Data sources** tab.
  1. In the top-right corner, click **Create source** ![chevron-down](../../../_assets/console-icons/chevron-down.svg) and select ![storage-logo](../../../_assets/security-deck/yandex360-logo.svg) **Yandex 360**.
  1. Click **Configure connection** and configure integration with the Yandex 360 organization:
      1. Specify the [Organization 360](https://yandex.com/support/yandex-360/business/admin/en/org-admin) ID.

          You can look up the ID in your [company profile](https://admin.yandex.com/company-profile) in the organization administrator account.

      1. Enter the [OAuth token](https://oauth.yandex.com/authorize?response_type=token&client_id=c0e37287a72a43658011f68ef6e70def).
      1. Optionally, to provide access to custom resources, e.g., to scan custom disks, [create](https://yandex.com/support/yandex-360/business/admin/en/security-service-applications) a service application and specify the following properties:
          * **ClientID**
          * **Client secret**

          {% note info %}

          This feature is not available for the Yandex 360 Minimum [plan](https://yandex.com/support/yandex-360/business/purchase/en/plans/payment-plans-ru).

          {% endnote %}

      1. Click **Save**.

  1. Add the resources you want to scan to the data source:
      * To add shared disks to your organization, under **Organization resources**, click **Add resources**. Select or deselect disks as appropriate in one or more folders.
      * To add custom disks to the data source, click **Add resources** under **User resources**. Select or deselect custom disks as appropriate.
      * To add all available disks to the data source, click **All disks** under **Organization resources** or **User resources**. The scan will include not only the disks existing in the selected organization when the data source is created, but also disks added later (by the time of the scan).

  1. Under **Include in selection**, specify one or more scan scopes:

      * `All files`: To scan all files saved in the buckets.
      * `DOC / TXT`: To scan `.doc`, `.docx`, and `.txt` text files.
      * `XLS / CSV`: To scan `.xls`, `.xlsx`, and `.csv` spreadsheet files.
      * `PPT`: To scan `.ppt` and `.pptx` presentation files.
      * `PDF`: To scan `.pdf` document files.
      * `HTML / XML`: To scan `.html` and `.xml` files.
      * `Images`: To scan `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`, and `.svg` image files.
      * `Custom filter`: To scan all files whose names do or do not match the specified patterns:
      
          * **The file name contains**: To scan files whose names match the specified pattern.
          * **The file name does not contain**: To ignore files whose names match the specified pattern.
      
          Specify the patterns using the [RE2](https://github.com/google/re2/wiki/Syntax) [regular expression](https://en.wikipedia.org/wiki/Regular_expression) syntax. You can specify patterns in both fields, in which case the scan will use the `AND` logic to select files.
      
      You can select multiple filters at the same time; the system will use the `OR` logic to apply them.

  1. If you want to add resources with different scan scope selection settings to the same data source, click **Add a resource group** and repeat steps `6` and `7` in the section that appears.

      You can add any number of resource groups to a single data source for scanning.

  1. Under **Information about source**, indicate the data source name you will use to select this source when [creating a scan](create-scan.md). Follow these naming requirements:
     
     * Length: between 3 and 63 characters.
     * It can only contain lowercase Latin letters, numbers, and hyphens.
     * It must start with a letter and cannot end with a hyphen.
     
     Click ![Arrows-Rotate-Right](../../../_assets/console-icons/arrows-rotate-right.svg) on the right side of the **Name** field to automatically generate a name for the data source you are creating.
  1. Click **Create source**.

  As a result, the new source will appear in the list of data sources. Now you can select this data source when [creating a scan](create-scan.md).

{% endlist %}

#### Useful links {#see-also}

* [Creating a DSPM scan](create-scan.md)
* [Data Security Posture Management (DSPM)](../../concepts/dspm.md)
* [Common Yandex Security Deck roles](../../security/index.md)