Cloud Data Fusion fournit un plug-in Sensitive Data Protection qui permet trois transformations pouvant filtrer, masquer ou déchiffrer vos données sensibles :
La transformation "Filtre d'informations personnelles" vous permet de filtrer les enregistrements sensibles d'un flux de données entrantes.
La transformation "Masquer" vous permet de transformer des données sensibles, par exemple en les masquant ou en les chiffrant.
La transformation "Déchiffrer" vous permet de déchiffrer des données sensibles précédemment chiffrées à l'aide de la transformation "Masquer".
Coûts
Dans ce document, vous utilisez les composants facturables de Google Cloudsuivants :
Dans le tableau des autorisations, sélectionnez l'un des comptes de service suivants dans la colonne Compte principal :
Pour autoriser l'accès aux ressources lors de l'exécution, sélectionnez le compte de service utilisé par votre cluster Dataproc. Par défaut, le compte de service Compute Engine est utilisé, mais il n'est pas recommandé pour des raisons de sécurité.
Pour autoriser l'accès aux ressources lorsque vous utilisez Wrangler ou l'aperçu dans Cloud Data Fusion (et non au moment de l'exécution), sélectionnez plutôt le compte de service correspondant au format suivant : service-project-number@gcp-sa-datafusion.iam.gserviceaccount.com.
Cliquez sur l'icône en forme de crayon située à droite du compte de service.
Cliquez sur Ajouter un autre rôle.
Cliquez sur le menu déroulant qui s'affiche.
Utilisez la barre de recherche pour afficher et sélectionner Administrateur DLP.
Cliquez sur Enregistrer. Vérifiez que Administrateur DLP apparaît dans la colonne Rôle.
Déployer le plug-in Sensitive Data Protection
Accédez à votre instance :
Dans la console Google Cloud , accédez à la page Cloud Data Fusion.
Pour ouvrir l'instance dans Cloud Data Fusion Studio, cliquez sur Instances, puis sur Afficher l'instance.
Dans l'interface utilisateur Web de Cloud Data Fusion, cliquez sur Hub en haut à droite.
Cliquez sur le plug-in Protection contre la perte de données.
Cliquez sur Déployer.
Cliquez sur Terminer.
Cliquez sur Créer un pipeline.
Utiliser la transformation de Filtre d'informations personnelles
Cette transformation sépare les enregistrements sensibles des enregistrements non sensibles. Un enregistrement est considéré comme sensible s'il correspond aux critères que vous définissez dans un modèle de protection des données sensibles. Vous pouvez par exemple définir des informations de carte de paiement ou des numéros de sécurité sociale en tant que données sensibles lorsque vous créez votre modèle.
Ouvrez votre pipeline dans Cloud Data Fusion, puis cliquez sur Studio>Transformer.
Cliquez sur la transformation Filtre d'informations personnelles.
Maintenez le pointeur de la souris sur le nœud Filtre d'informations personnelles et cliquez sur Propriétés.
Sous Filtre activé, indiquez si vous souhaitez filtrer les enregistrements ou les champs.
Conformément aux limites de Sensitive Data Protection, si un enregistrement dépasse 0,5 Mo, votre pipeline Cloud Data Fusion échouera.
Pour éviter un tel échec, filtrez par champ plutôt que par enregistrement.
Sous ID du modèle, saisissez l'ID du modèle Sensitive Data Protection que vous avez créé.
Sous Traitement des erreurs, définissez la procédure à suivre lorsque votre pipeline rencontre des données sensibles. Choisissez l'une des options de traitement des erreurs suivantes :
Arrêter le pipeline : arrête le pipeline dès qu'une erreur se produit.
Ignorer l'enregistrement : ignore l'enregistrement à l'origine de l'erreur. Le pipeline continue de s'exécuter et aucune erreur n'est signalée.
Envoyer vers l'erreur : envoie les erreurs au port d'erreur. Le pipeline continue de s'exécuter.
Cliquez sur le bouton X.
Utiliser la transformation "Masquer"
Cette transformation identifie les enregistrements sensibles dans le flux d'entrée et applique les transformations que vous définissez à ces enregistrements. Un enregistrement est considéré comme sensible s'il correspond à des filtres de protection des données sensibles prédéfinis que vous avez choisis ou à un modèle personnalisé que vous avez défini.
Sur la page Studio de l'interface utilisateur Web de Cloud Data Fusion, cliquez pour développer le menu Transformation.
Cliquez sur la transformation Masquer.
Maintenez le pointeur de la souris sur le nœud Masquer et cliquez sur Propriétés.
Choisissez si vous souhaitez appliquer des transformations à des filtres prédéfinis ou si vous souhaitez créer les vôtres.
Vous ne pouvez pas combiner ces deux options. Vous pouvez utiliser des filtres prédéfinis OU créer un modèle personnalisé.
Filtres prédéfinis
Pour appliquer des transformations à des filtres prédéfinis, laissez le Modèle personnalisé défini sur Non et, sous Correspondance, définissez une règle :
À la suite de Appliquer, cliquez sur le menu déroulant et choisissez une transformation.
Pour en savoir plus sur les transformations disponibles, consultez la section Description de l'onglet Documentation du plug-in.
À la suite de sur, cliquez sur le menu déroulant et choisissez une catégorie, à savoir un ensemble de filtres Sensitive Data Protection prédéfinis regroupés par type. Pour obtenir la liste complète des catégories fournies et des filtres qu'elles contiennent, consultez la section Mappage des filtres DLP dans l'onglet Documentation du plug-in.
Pour définir plusieurs règles de correspondance, cliquez sur le bouton +.
Modèle personnalisé
Pour appliquer des transformations en fonction d'un modèle personnalisé, définissez le Modèle personnalisé sur Oui.
De retour dans l'interface utilisateur Web de Cloud Data Fusion, dans le menu des propriétés "Masquer", sous ID du modèle, saisissez l'ID du modèle personnalisé que vous avez créé.
Cliquez sur le bouton X.
Utiliser la transformation Déchiffrer
Cette transformation identifie les enregistrements chiffrés à l'aide de Sensitive Data Protection dans le flux d'entrée et applique le déchiffrement. Seuls les enregistrements chiffrés à l'aide d'un algorithme réversible tel que le chiffrement préservant le format ou le chiffrement déterministe peuvent être déchiffrés.
Sur la page Studio de l'interface utilisateur Web de Cloud Data Fusion, cliquez pour développer le menu Transformation.
Cliquez sur la transformation Déchiffrer.
Maintenez le pointeur de la souris sur le nœud Déchiffrer et cliquez sur Propriétés.
Saisissez les mêmes valeurs que celles utilisées pour configurer le plug-in Masquer qui a chiffré ces données. Les propriétés de ce plug-in sont identiques à celles du plug-in Masquer.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis guide explains how to use the Sensitive Data Protection plugin within Cloud Data Fusion to filter, redact, or decrypt sensitive data.\u003c/p\u003e\n"],["\u003cp\u003eThe Sensitive Data Protection plugin offers three transforms: PII Filter for removing sensitive records, Redact for masking or encrypting data, and Decrypt for reversing Redact transformations.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing the Sensitive Data Protection plugin requires enabling both the Cloud Data Fusion and DLP APIs, as well as granting the appropriate IAM permissions for data handling.\u003c/p\u003e\n"],["\u003cp\u003eSensitive Data Protection templates, either predefined or custom, are used to define what is considered sensitive data and how it should be handled within the PII Filter and Redact transforms.\u003c/p\u003e\n"],["\u003cp\u003eCosts associated with using this feature include Cloud Data Fusion usage and Sensitive Data Protection services, which can be estimated using the Google Cloud pricing calculator.\u003c/p\u003e\n"]]],[],null,["# Use Sensitive Data Protection with Cloud Data Fusion\n\nThis guide explains how to use [Sensitive Data Protection](/sensitive-data-protection) with Cloud Data Fusion.\n\nCloud Data Fusion provides a Sensitive Data Protection [plugin](/data-fusion/docs/concepts/overview#plugin)\nthat provides three transforms that can filter, redact, or decrypt your sensitive data:\n\n- The PII Filter transform lets you *filter* sensitive records from an\n input stream of data.\n\n- The Redact transform lets you *transform* sensitive data, such as\n masking the data or encrypting it.\n\n- The Decrypt transform lets you *decrypt* sensitive data that was previously\n encrypted using the Redact transform,\n\n| **Note:** The Sensitive Data Protection plugin available in Cloud Data Fusion is based on the Cloud Data Loss Prevention API and therefore complies with the Sensitive Data Protection [quotas and usage limits](/sensitive-data-protection/limits).\n\nCosts\n-----\n\n\nIn this document, you use the following billable components of Google Cloud:\n\n\n- [Cloud Data Fusion](/data-fusion/pricing)\n- [Sensitive Data Protection](/sensitive-data-protection/pricing)\n\n\nTo generate a cost estimate based on your projected usage,\nuse the [pricing calculator](/products/calculator). \nNew Google Cloud users might be eligible for a [free trial](/free). \n\n\u003cbr /\u003e\n\nBefore you begin\n----------------\n\n1. In the Google Cloud console, go to the project selector page and select or\n create a project.\n\n [Go to the project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n2. Enable the Cloud Data Fusion API for your project.\n\n [Enable the Cloud Data Fusion API](https://console.cloud.google.com/flows/enableapi?apiid=datafusion.googleapis.com)\n\n \u003cbr /\u003e\n\n3. Enable the DLP API (part of Sensitive Data Protection) for your project.\n\n [Enable the DLP API](https://console.cloud.google.com/marketplace/details/google/dlp.googleapis.com)\n\n \u003cbr /\u003e\n\n4. [Create a Cloud Data Fusion instance](/data-fusion/docs/how-to/create-instance).\n\n | **Note:** The Sensitive Data Protection plugin is available for instances using Cloud Data Fusion version 6.1.1 or higher.\n\nGrant Sensitive Data Protection permissions\n-------------------------------------------\n\n1. In the Google Cloud console, go to the IAM page.\n\n [Go to IAM](https://console.cloud.google.com/project/_/iam-admin/iam)\n\n \u003cbr /\u003e\n\n2. In the permissions table, select one of the following service accounts\n in the **Principal** column:\n\n 1. For permission to resources at runtime, select the service account that\n your Dataproc cluster uses. The default is the Compute Engine\n service account, which is not recommended for security reasons\n\n 2. For permission to resources when using Wrangler or Preview in\n Cloud Data Fusion (not at runtime), instead select the service\n account that matches the format:\n `service-`\u003cvar translate=\"no\"\u003eproject-number\u003c/var\u003e`@gcp-sa-datafusion.iam.gserviceaccount.com`.\n\n3. Click the pencil icon to the right of the service account.\n\n4. Click **Add Another Role**.\n\n5. Click the dropdown that appears.\n\n6. Use the search bar to search and then select **DLP Administrator**.\n\n \u003cbr /\u003e\n\n7. Click **Save** . Check that **DLP Administrator** appears in the **Role** column.\n\nDeploy the Sensitive Data Protection plugin\n-------------------------------------------\n\n1. Go to your instance:\n\n\n 1. In the Google Cloud console, go to the Cloud Data Fusion page.\n\n 2. To open the instance in the Cloud Data Fusion Studio,\n click **Instances** , and then click **View instance**.\n\n [Go to Instances](https://console.cloud.google.com/data-fusion/locations/-/instances)\n\n \u003cbr /\u003e\n\n2. In the Cloud Data Fusion web UI, click **Hub** in the upper right.\n\n3. Click the **Data Loss Prevention** plugin.\n\n4. Click **Deploy**.\n\n5. Click **Finish**.\n\n6. Click **Create a pipeline**.\n\n \u003cbr /\u003e\n\nUse the PII Filter transform\n----------------------------\n\nThis transform separates sensitive records from non-sensitive records. A record\nis considered sensitive if it matches criteria that you define in a\nSensitive Data Protection template. For example, when you create your template, you can\ndefine sensitive data to be credit card information or Social Security numbers.\n\n1. [Create a Sensitive Data Protection inspection template](/sensitive-data-protection/docs/creating-templates-inspect).\n\n2. Open your pipeline in Cloud Data Fusion and click **Studio** \\\u003e **Transform**.\n\n3. Click the **PII Filter** transform.\n\n4. Hold the pointer over the **PII Filter** node and click **Properties**.\n\n5. Under **Filter on**, choose whether you want to filter records or fields.\n\n In compliance with [Sensitive Data Protection limits](/sensitive-data-protection/limits#content_limits),\n if a record exceeds 0.5 MB, your Cloud Data Fusion pipeline will fail.\n To avoid such a failure, filter by field instead of record.\n6. Under **Template ID**, enter the template ID of the Sensitive Data Protection\n template you created.\n\n7. Under **Error Handling**, define how to proceed when your pipeline encounters\n sensitive data. Choose one of the following error handling options:\n\n - **Stop pipeline**: Stops the pipeline as soon as an error is encountered.\n - **Skip record**: Skips the record that caused the error. The pipeline continues to run, and no error is reported.\n - **Send to error**: Sends errors to the error port. The pipeline continues to run.\n8. Click the **X** button.\n\nUse the Redact transform\n------------------------\n\nThis transform identifies sensitive records in the input stream and applies\ntransformations that you define to those records. A record is considered\nsensitive if it matches predefined Sensitive Data Protection filters you chose\nor a custom template you defined.\n\n1. In the **Studio** page of the Cloud Data Fusion web UI, click to expand\n the **Transform** menu.\n\n2. Click the **Redact** transform.\n\n3. Hold the pointer over the **Redact** node and click **Properties**.\n\n4. Choose if you want to apply transformations to predefined filters or if\n you'd like to create your own.\n\n You cannot combine these two options. You can either use predefined\n filters OR create a custom template. \n\n ### Predefined filters\n\n To apply transformations to predefined filters, leave the **Custom\n Template** set to **No** , and under **Matching**, define a rule:\n 1. Following **Apply** , click the dropdown and choose a transformation.\n Learn more about the available transformations in the\n **Description** section of the plugin's **Documentation** tab.\n\n 2. Following **on** , click the dropdown and choose a category, which is\n a set of predefined Sensitive Data Protection filters grouped together\n by type. For the full list of provided categories and what filters\n they contain, see the **DLP Filter Mapping** section in the\n plugin's **Documentation** tab.\n\n To set multiple matching rules, click the **+** button.\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n ### Custom template\n\n To apply transformations according to a custom template, set the **Custom\n Template** to **Yes**.\n 1. [Create a custom Sensitive Data Protection template](/sensitive-data-protection/docs/creating-templates-inspect).\n\n 2. Back in the Cloud Data Fusion web UI, in the Redact properties\n menu, under **Template ID**, enter the template ID of the custom\n template you created.\n\n5. Click the **X** button.\n\nUse the Decrypt transform\n-------------------------\n\nThis transform identifies records that were encrypted using Sensitive Data Protection\nin the input stream and applies decryption. Only records that were encrypted\nusing a reversible algorithm such as *Format Preserving Encryption* or\n*Deterministic Encryption* can be decrypted.\n\n1. In the **Studio** page of the Cloud Data Fusion web UI, click to expand\n the **Transform** menu.\n\n2. Click the **Decrypt** transform.\n\n3. Hold the pointer over the **Decrypt** node and click **Properties**.\n\n4. Enter the same values that were used to configure the **Redact** plugin that\n encrypted this data. The properties for this plugin are identical to the\n **Redact** plugin.\n\n5. Click the **X** button.\n\nWhat's next\n-----------\n\n- Follow a [tutorial to redact sensitive user data](/data-fusion/docs/tutorials/redacting-confidential-data).\n- Read more about [Sensitive Data Protection](/sensitive-data-protection/docs)."]]