Wählen Sie in der Berechtigungstabelle in der Spalte Hauptkonto eines der folgenden Dienstkonten aus:
Wenn Sie Berechtigungen für Ressourcen zur Laufzeit benötigen, wählen Sie das Dienstkonto aus, das von Ihrem Dataproc-Cluster verwendet wird. Standardmäßig wird das Compute Engine-Dienstkonto verwendet, was aus Sicherheitsgründen nicht empfohlen wird.
Wenn Sie Berechtigungen für Ressourcen benötigen, wenn Sie Wrangler oder die Vorschaufunktion in Cloud Data Fusion verwenden (nicht zur Laufzeit), wählen Sie stattdessen das Dienstkonto aus, das dem Format service-project-number@gcp-sa-datafusion.iam.gserviceaccount.com entspricht.
Klicken Sie auf das Stiftsymbol rechts neben dem Dienstkonto.
Klicken Sie auf Weitere Rolle hinzufügen.
Klicken Sie auf das Drop-down-Menü, das daraufhin angezeigt wird.
Wählen Sie mithilfe der Suchleiste DLP-Administrator aus.
Klicken Sie auf Speichern. Prüfen Sie, ob der DLP-Administrator in der Spalte Rolle angezeigt wird.
Plug-in für Schutz sensibler Daten bereitstellen
Rufen Sie Ihre Instanz auf:
Rufen Sie in der Google Cloud Console die Seite „Cloud Data Fusion“ auf.
Wenn Sie die Instanz in Cloud Data Fusion Studio öffnen möchten, klicken Sie auf Instanzen und dann auf Instanz anzeigen.
Klicken Sie in der Cloud Data Fusion-Web-UI rechts oben auf Hub.
Klicken Sie auf das Plug-in Schutz vor Datenverlust.
Klicken Sie auf Deploy.
Klicken Sie auf Beenden.
Klicken Sie auf Pipeline erstellen.
PII-Filter-Transformation verwenden
Diese Transformation trennt vertrauliche Datensätze von nicht vertraulichen Einträgen. Ein Datensatz gilt als vertraulich, wenn er mit Kriterien übereinstimmt, die Sie in einer Vorlage für den Schutz sensibler Daten definieren. Beispielsweise können Sie beim Erstellen einer Vorlage sensible Daten als Kreditkartendaten oder Sozialversicherungsnummern definieren.
Öffnen Sie Ihre Pipeline in Cloud Data Fusion und klicken Sie auf Studio>Transformieren.
Klicken Sie auf die PII-Filter-Transformation.
Halten Sie den Mauszeiger auf den Knoten PII-Filter und klicken Sie auf Attribute.
Wählen Sie unter Filtern nach aus, ob Sie nach Datensätze oder Felder filtern möchten.
Unter Einhaltung der Sensitive Data Protection-Limits schlägt die Pipeline von Cloud Data Fusion fehl, wenn ein Eintrag 0, 5 MB überschreitet.
Um einen solchen Fehler zu vermeiden, filtern Sie nicht nach Eintrag, sondern nach Feld.
Geben Sie unter Vorlagen-ID die Vorlagen-ID der von Ihnen erstellten Sensitive Data Protection-Vorlage ein.
Legen Sie unter Fehlerbehandlung fest, wie der Vorgang fortgesetzt werden soll, wenn in der Pipeline vertrauliche Daten gefunden werden. Wählen Sie eine der folgenden Optionen zur Fehlerbehandlung:
Pipeline anhalten: stoppt die Pipeline, sobald ein Fehler auftritt.
Überspringen: Überspringen Sie den Eintrag, der den Fehler verursacht hat. Die Pipeline wird weiterhin ausgeführt und es wird kein Fehler gemeldet.
An Fehler senden: Fehler an den Fehlerport senden. Die Pipeline wird weiterhin ausgeführt.
Klicken Sie auf die Schaltfläche X.
Redact-Transformation verwenden
Diese Transformation identifiziert vertrauliche Einträge im Eingabestream und wendet Transformationen an, die Sie für diese Einträge definieren. Ein Datensatz gilt als vertraulich, wenn er mit vordefinierten Filtern für den Schutz sensibler Daten oder einer von Ihnen definierten benutzerdefinierten Vorlage übereinstimmt.
Klicken Sie auf der Seite Studio der Cloud Data Fusion-Web-UI auf das Menü Transformieren, um es zu maximieren.
Klicken Sie auf die Transformation Redact (entfernen).
Halten Sie den Mauszeiger über den Knoten Redact und klicken Sie auf Attribute.
Wählen Sie aus, ob Sie Transformationen auf vordefinierte Filter anwenden möchten oder ob Sie eigene Filter erstellen möchten.
Diese beiden Optionen können nicht kombiniert werden. Sie können entweder vordefinierte Filter verwenden oder eine benutzerdefinierte Vorlage erstellen.
Vordefinierte Filter
Wenn Sie Transformationen auf vordefinierte Filter anwenden möchten, lassen Sie die benutzerdefinierte Vorlage auf Nein gesetzt und definieren Sie unter Übereinstimmung eine Regel:
Nachdem Sie auf Anwenden geklickt haben, wählen Sie im Drop-down-Menü eine Transformation aus.
Weitere Informationen zu den verfügbaren Transformationen erhalten Sie im Tab Dokumentation des Plug-ins unter Beschreibung.
Klicken Sie nach on auf das Drop-down-Menü und wählen Sie eine Kategorie aus. Dabei handelt es sich um eine Reihe vordefinierter Filter für den Schutz sensibler Daten, die nach Typ gruppiert sind. Eine vollständige Liste der bereitgestellten Kategorien und der darin enthaltenen Filter finden Sie im Tab Dokumentation des Plug-ins unter DLP-Filterzuordnung.
Klicken Sie auf +, um mehrere Abgleichsregeln festzulegen.
Benutzerdefinierte Vorlage
Wenn Sie Transformationen gemäß einer benutzerdefinierten Vorlage anwenden möchten, setzen Sie die Benutzerdefinierte Vorlage auf Ja.
Zurück in der Cloud Data Fusion-Web-UI geben Sie im Redact-Attributmenü unter Vorlagen-ID die Vorlagen-ID der von Ihnen erstellten benutzerdefinierten Vorlage ein.
Klicken Sie auf die Schaltfläche X.
Decrypt-Transformation verwenden
Diese Transformation identifiziert Datensätze, die mit Sensitive Data Protection im Eingabestream verschlüsselt wurden, und wendet die Entschlüsselung an. Nur Datensätze, die mit einem umkehrbaren Algorithmus wie Formaterhaltende Verschlüsselung oder Deterministische Verschlüsselung verschlüsselt wurden, können entschlüsselt werden.
Klicken Sie auf der Seite Studio der Cloud Data Fusion-Web-UI auf das Menü Transformieren, um es zu maximieren.
Klicken Sie auf die Transformation Decrypt.
Halten Sie den Mauszeiger über den Knoten Decrypt und klicken Sie auf Attribute.
Geben Sie dieselben Werte ein, die auch zum Konfigurieren des Redact-Plug-ins verwendet wurden, mit dem diese Daten verschlüsselt wurden. Die Attribute dieses Plug-ins sind mit dem Redact-Plug-in identisch.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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)."]]