Excluding data from sensitive data classification

Grâce à la classification des données sensibles, Snowflake classifie les données sensibles à intervalles réguliers, sans intervention de l’utilisateur. Vous pouvez utiliser des paramètres et des balises système pour exclure certaines données de ce processus de classification.

For example, suppose a database my_db has three tables, t1, t2, and t3. By default, when you classify my_db, all three tables are automatically classified. You can configure Snowflake to skip t2 during classification so only tables t1 and t3 are classified.

Workflow

Excluding data from sensitive data classification is a two-step process:

  1. Apply the SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION tag to every object that you want excluded from sensitive data classification.

  2. Activer le paramètre d’exclusion pour l’exclusion des données sensibles basée sur des balises.

Configurer une balise sur des objets de données

An object tag is an object that can be set on another object. Snowflake provides a system-defined tag, SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION, that you can set on objects that you want excluded from sensitive data classification. When the value of this tag is TRUE, then Snowflake skips the object during classification.

You can set the SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION tag on a schema, table, or column to control which data is excluded from sensitive data classification.

Exclure un schéma

You can set the SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION tag on a schema in the database to exclude the schema from the classification process. For example:

ALTER SCHEMA my_schema SET TAG SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION = 'TRUE';
Copy
Exclure une table

You can set the SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION tag on a table in the database or schema to exclude the table from the classification process. For example:

ALTER TABLE my_table SET TAG SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION = 'TRUE';
Copy
Exécuter une colonne

You can set the SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION tag on a column so that Snowflake skips it when classifying the table. If you exclude a column, the classification result contains an empty value for the column, even if it contains sensitive data.

Par exemple, supposons que vous souhaitiez classifier automatiquement toutes les colonnes d’une table, à l’exception de la colonne employee_id. Vous pouvez exécuter la commande ALTER TABLE … ALTER COLUMN pour configurer la balise définie par le système sur la colonne :

ALTER TABLE my_table ALTER COLUMN employee_id
  SET TAG SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION = 'TRUE';
Copy

Lorsque Snowflake classifie automatiquement les données dans la table, le champ employee_id dans le résultat JSON est vide.

Pour connaître les exigences en matière de contrôle d’accès pour la configuration de la balise SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION, consultez Exigences en matière de contrôle d’accès.

Activer le paramètre d’exclusion

Setting the SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION tag on objects has no effect until you enable the setting for tag-based sensitive data exclusion.

Vous pouvez activer ce paramètre en utilisant l’interface utilisateur du Centre de confiance ou en utilisant les commandes SQL.

Use the Trust Center to enable tag-based sensitive data exclusion

  1. Connectez-vous à l”Snowsight en tant qu’utilisateur ayant les privilèges requis.

  2. Dans le menu de navigation, sélectionnez Governance & security » Trust Center.

  3. Sélectionnez l’onglet Data Security.

  4. Sélectionnez l’onglet Settings.

  5. Effectuez au choix :

    • Si vous activez le paramètre pour un profil de classification existant, recherchez le profil et sélectionnez Trois points verticaux indiquant plus d'options » Edit.

    • Si vous configurez un profil de classification avancé pour la première fois, sélectionnez Create New.

  6. Parcourez les paramètres de classification jusqu’à ce que vous arriviez à la page Define classification criteria.

  7. Dans la section Exclusion criteria, sélectionnez Exclude SKIP_SENSITIVE_DATA_CLASSIFICATION tagged objects.

Use SQL to enable tag-based sensitive data exclusion

A classification profile contains the settings that control how Snowflake automatically classifies data in a database. These settings are specified using key-value pairs in an OBJECT.

You must define the enable_tag_based_sensitive_data_exclusion key of the classification profile if you want data excluded from sensitive data classification.

The following is an example of a classification profile that, when set on a database, excludes properly tagged objects from sensitive data classification:

CREATE OR REPLACE SNOWFLAKE.DATA_PRIVACY.CLASSIFICATION_PROFILE
  my_classification_profile(
    {
      'minimum_object_age_for_classification_days': 0,
      'maximum_classification_validity_days': 30,
      'auto_tag': true,
      'enable_tag_based_sensitive_data_exclusion': true
    });
Copy

You can also execute the SET_ENABLE_TAG_BASED_SENSITIVE_DATA_EXCLUSION method to enable the setting for an existing classification profile.

Exigences en matière de contrôle d’accès

By default, a user with the ability to enable or disable classification settings can set the SNOWFLAKE.CORE.SKIP_SENSITIVE_DATA_CLASSIFICATION system tag only on their own schemas and tables.

If you want a user to be able to set the system tag on all objects, not just the ones they own, run the following command:

GRANT APPLY TAG ON ACCOUNT TO ROLE <classify_user>;
Copy