Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Prüfen Sie, ob der Dienst für vertrauliche Aktionen funktioniert, indem Sie absichtlich den Persistence: project SSH key added-Detektor auslösen und nach Ergebnissen suchen.
Sie können diese Anleitung nur ausführen, wenn Sie eine IAM-Rolle (Identity and Access Management) mit den Berechtigungen compute.projects.setCommonInstanceMetadata und iam.serviceAccounts.actAs im Projekt haben, in dem Sie den Test ausführen, z. B. die Rolle „Compute-Administrator“ (roles/compute.admin).
Sensitive Actions Service testen
Wenn Sie den Dienst für vertrauliche Aktionen testen möchten, fügen Sie einen SSH-Schlüssel auf Projektebene hinzu, der möglicherweise SSH-Schlüsselzugriff auf alle Instanzen im Projekt gewährt.
Dieser Detector generiert kein Ergebnis, wenn bereits ein SSH-Schlüssel auf Projektebene für das Projekt festgelegt ist. Wählen Sie ein Projekt aus, für das noch keine SSH-Schlüssel auf Projektebene vorhanden sind.
Um den Detektor auszulösen, benötigen Sie ein Testnutzerkonto. Sie können ein Testnutzerkonto mit einer @gmail.com-E‑Mail-Adresse erstellen oder ein vorhandenes Nutzerkonto in Ihrer Organisation verwenden. Sie fügen das Testnutzerkonto Ihrer Organisation hinzu und gewähren ihm übermäßige Berechtigungen.
Prüfen Sie, ob derzeit SSH-Schlüssel für das Projekt festgelegt sind. Wenn SSH-Schlüssel festgelegt sind, werden die vorhandenen Schlüssel in einer Tabelle angezeigt und der Test funktioniert nicht.
Wählen Sie ein Projekt aus, für das keine projektweiten SSH-Schlüssel für den Test vorhanden sind.
Klicken Sie auf SSH-Schlüssel hinzufügen.
Fügen Sie einen öffentlichen Schlüssel in das Textfeld ein. Weitere Informationen zum Generieren eines SSH-Schlüssels finden Sie unter SSH-Schlüssel erstellen.
Klicken Sie auf Speichern.
Als Nächstes prüfen Sie, ob der Persistence: project SSH key added-Detektor Ergebnisse geschrieben hat.
Schritt 2: Ergebnis in Security Command Center ansehen
So prüfen Sie die Ergebnisse des Sensitive Actions Service in der Console:
Rufen Sie in der Google Cloud Console die Seite Ergebnisse von Security Command Center auf.
Wählen Sie Ihr Google Cloud Projekt oder Ihre Organisation aus.
Wählen Sie im Abschnitt Schnellfilter im Unterabschnitt Anzeigename der Quelle die Option Sensitive Actions Service aus. Die Ergebnisse der Ergebnisabfrage werden aktualisiert, sodass nur die Ergebnisse aus dieser Quelle angezeigt werden.
Klicken Sie in der Spalte Kategorie auf den Namen des Ergebnisses, um die Details eines bestimmten Ergebnisses aufzurufen.
Der Detailbereich für das Ergebnis wird geöffnet und der Tab Zusammenfassung wird angezeigt.
Sehen Sie sich auf dem Tab Zusammenfassung die Details des Ergebnisses an, einschließlich Informationen dazu, was erkannt wurde, welche Ressource betroffen ist und – falls verfügbar – welche Schritte Sie unternehmen können, um das Problem zu beheben.
Optional: Klicken Sie auf den Tab JSON, um die vollständige JSON-Definition des Ergebnisses aufzurufen.
Schritt 3: Ergebnis in Cloud Logging anzeigen
Sie können Logeinträge zu vertraulichen Aktionen mit Cloud Logging aufrufen.
Rufen Sie in der Google Cloud Console den Log-Explorer auf.
[[["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-05 (UTC)."],[],[],null,["| Standard, Premium, and Enterprise [service tiers](/security-command-center/docs/service-tiers)\n\nVerify that Sensitive Actions Service is working by intentionally triggering the\n`Persistence: project SSH key added` detector and checking for findings.\n\nTo learn more about the Sensitive Actions Service service, see\n[Sensitive Actions Service overview](/security-command-center/docs/concepts-sensitive-actions-overview).\n\nBefore you begin\n\nTo complete this guide, you must have an Identity and Access Management (IAM) role with\nthe `compute.projects.setCommonInstanceMetadata` and `iam.serviceAccounts.actAs`\npermissions in the project where you will perform the test, such as the Compute\nAdmin role (`roles/compute.admin`).\n\nTesting Sensitive Actions Service\n\nTo test Sensitive Actions Service, you add a project-level SSH key, which may grant SSH\nkey access to all instances in the project.\n\nThis detector doesn't generate a finding if there is already a project-level SSH key set on\nthe project. Choose a project that doesn't already have\nany project-level SSH keys.\n\nStep 1: Triggering a Sensitive Actions Service detector\n\nTo trigger the detector, you need a test user account. You can create\na test user account with a gmail.com email address or use an existing user\naccount in your organization. You add the test user account to your\norganization and grant it excessive permissions.\n\nFor more instructions on how to add the project-level SSH key, see\n[Add SSH keys to project metadata](/compute/docs/connect/add-ssh-keys#add_ssh_keys_to_project_metadata).\nFor instructions on how to generate an SSH key, see [Create SSH keys](/compute/docs/connect/create-ssh-keys).\n\n1. Go to the [Compute Engine Metadata](https://console.cloud.google.com/compute/metadata)\n page in the Google Cloud console.\n\n [Go to Metadata](https://console.cloud.google.com/compute/metadata)\n2. Click the **SSH Keys** tab.\n\n3. Verify that there aren't currently any SSH keys set on the project. If SSH keys are set, you will see the existing keys in a table, and the test won't work.\n Choose a project that doesn't have any existing project-level SSH keys for\n the test.\n\n4. Click **Add SSH Key**.\n\n5. Add a public key into the text box. For more details on how to generate an\n SSH key, see [Create SSH\n keys](/compute/docs/connect/create-ssh-keys).\n\n6. Click **Save**.\n\nNext, verify that the `Persistence: project SSH key added` detector has written findings.\n\nStep 2: Viewing the finding in Security Command Center\n\nTo review Sensitive Actions Service findings in the console, follow\nthese steps:\n\n1. In the Google Cloud console, go to the **Findings** page of Security Command Center.\n\n [Go to Findings](https://console.cloud.google.com/security/command-center/findingsv2)\n2. Select your Google Cloud project or organization.\n3. In the **Quick filters** section, in the **Source display name** subsection, select **Sensitive Actions Service**. The findings query results are updated to show only the findings from this source.\n4. To view the details of a specific finding, click the finding name in the **Category** column. The details panel for the finding opens and displays the **Summary** tab.\n5. On the **Summary** tab, review the details of the finding, including information about what was detected, the affected resource, and---if available---steps that you can take to remediate the finding.\n6. Optional: To view the full JSON definition of the finding, click the **JSON** tab.\n\n\u003cbr /\u003e\n\nStep 3: Viewing the finding in Cloud Logging\n\nYou can view sensitive action log entries by using Cloud Logging.\n\n1. Go to **Logs Explorer** in the Google Cloud console.\n\n [Go to Logs Explorer](https://console.cloud.google.com/logs/query)\n2. If required, change to the organization view by using the\n **Organization selector** at the top of the page.\n\n3. Use the **Query** pane to build your query:\n\n 1. In the **All resources** list, select **sensitiveaction.googleapis.com/Location**.\n 2. Click **Apply** . The **Query results** table is updated with the logs you selected.\n4. To view a log, click a table row, and then click **Expand nested fields**.\n\nClean up\n\nWhen you're finished testing, remove the project-level SSH key.\n\n1. Go to the **Compute Engine Metadata** page in the Google Cloud console.\n\n [Go to Metadata](https://console.cloud.google.com/compute/metadata)\n2. Click **Edit**.\n\n3. Click delete**Delete item** next to the SSH key.\n\n4. Click **Save**.\n\nWhat's next\n\n- Learn more about [using Sensitive Actions Service](/security-command-center/docs/how-to-use-sensitive-actions).\n- Read a high-level overview of [Sensitive Actions Service concepts](/security-command-center/docs/concepts-sensitive-actions-overview).\n- Learn how to [investigate and develop response plans](/security-command-center/docs/how-to-investigate-threats) for threats."]]