このドキュメントでは、OS Login API によって生成される監査ログについて説明します。OS Login サービスを使用するために必要な IAM 権限の詳細については、OS Login を設定するをご覧ください。
サービス名
OS Login 監査ログでは、サービス名 oslogin.googleapis.com が使用されます。このサービスでフィルタ:
protoPayload.serviceName="oslogin.googleapis.com"
メソッド(権限タイプ別)
各 IAM 権限には type プロパティがあります。このプロパティの値は列挙型で、ADMIN_READ、ADMIN_WRITE、DATA_READ、DATA_WRITE のいずれかになります。メソッドを呼び出すと、OS Login によって監査ログが生成されます。このログのカテゴリは、メソッドの実行に必要な権限の type プロパティによって異なります。type プロパティ値が DATA_READ、DATA_WRITE、または ADMIN_READ の IAM 権限を必要とするメソッドは、データアクセス監査ログを生成します。type プロパティ値が ADMIN_WRITE の IAM 権限を必要とするメソッドは、管理アクティビティ監査ログを生成します。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-03 UTC。"],[[["\u003cp\u003eOS Login audit logs are automatically enabled and track connection attempts to virtual machine (VM) instances with OS Login and OS Login two-factor authentication (2FA).\u003c/p\u003e\n"],["\u003cp\u003eYou can query Cloud Audit Logs using the Google Cloud console or the \u003ccode\u003egcloud logging read\u003c/code\u003e command to view a list of OS Login connection attempts.\u003c/p\u003e\n"],["\u003cp\u003eReviewing the \u003ccode\u003emethodName\u003c/code\u003e and \u003ccode\u003eprincipalEmail\u003c/code\u003e fields in the audit logs reveals the types of connection attempts and the users involved, with specific \u003ccode\u003emethodName\u003c/code\u003e values like \u003ccode\u003eCheckPolicy\u003c/code\u003e, \u003ccode\u003eStartSession\u003c/code\u003e, and \u003ccode\u003eContinueSession\u003c/code\u003e indicating different connection stages.\u003c/p\u003e\n"],["\u003cp\u003eAudit log properties, such as \u003ccode\u003eserviceName\u003c/code\u003e, \u003ccode\u003eresourceName\u003c/code\u003e, \u003ccode\u003eseverity\u003c/code\u003e, \u003ccode\u003eauthenticationInfo.principalEmail\u003c/code\u003e, and \u003ccode\u003erequest.numericProjectId\u003c/code\u003e, provide detailed information about each login attempt.\u003c/p\u003e\n"],["\u003cp\u003eSpecific properties like \u003ccode\u003erequest.policy\u003c/code\u003e and \u003ccode\u003eresponse.success\u003c/code\u003e for \u003ccode\u003eCheckPolicy\u003c/code\u003e, \u003ccode\u003erequest.supportedChallengeTypes\u003c/code\u003e, \u003ccode\u003eresponse.authenticationStatus\u003c/code\u003e, and \u003ccode\u003eresponse.sessionId\u003c/code\u003e for \u003ccode\u003eStartSession\u003c/code\u003e, and \u003ccode\u003erequest.challengeId\u003c/code\u003e, \u003ccode\u003erequest.action\u003c/code\u003e, and \u003ccode\u003eresponse.challenges.status\u003c/code\u003e for \u003ccode\u003eContinueSession\u003c/code\u003e contain distinct information about each method.\u003c/p\u003e\n"]]],[],null,["# Monitor OS Login audit logs\n\n*** ** * ** ***\n\nThis document describes audit logging for OS Login. Google Cloud services\ngenerate audit logs that record administrative and access activities within your Google Cloud resources.\nFor more information about Cloud Audit Logs, see the following:\n\n- [Types of audit logs](/logging/docs/audit#types)\n- [Audit log entry structure](/logging/docs/audit#audit_log_entry_structure)\n- [Storing and routing audit logs](/logging/docs/audit#storing_and_routing_audit_logs)\n- [Cloud Logging pricing summary](/stackdriver/pricing#logs-pricing-summary)\n- [Enable Data Access audit logs](/logging/docs/audit/configure-data-access)\n\n\u003cbr /\u003e\n\nNotes\n-----\n\nThis document describes the audit logs generated by the OS Login API. For detailed information about the IAM permissions necessary to use the OS Login service, see [Set up OS Login](https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users).\n\nService name\n------------\n\nOS Login audit logs use the service name `oslogin.googleapis.com`.\nFilter for this service: \n\n```gdscript\n protoPayload.serviceName=\"oslogin.googleapis.com\"\n \n```\n\n\u003cbr /\u003e\n\nMethods by permission type\n--------------------------\n\nEach IAM permission has a `type` property, whose value is an enum\nthat can be one of four values: `ADMIN_READ`, `ADMIN_WRITE`,\n`DATA_READ`, or `DATA_WRITE`. When you call a method,\nOS Login generates an audit log whose category is dependent on the\n`type` property of the permission required to perform the method.\n\nMethods that require an IAM permission with the `type` property value\nof `DATA_READ`, `DATA_WRITE`, or `ADMIN_READ` generate\n[Data Access](/logging/docs/audit#data-access) audit logs.\n\nMethods that require an IAM permission with the `type` property value\nof `ADMIN_WRITE` generate\n[Admin Activity](/logging/docs/audit#admin-activity) audit logs.\n\nAPI interface audit logs\n------------------------\n\nFor information about how and which permissions are evaluated for each method,\nsee the [Identity and Access Management documentation](/compute/docs/oslogin/set-up-oslogin#configure_users) for OS Login.\n\n### `google.cloud.oslogin.controlplane.regional.v1alpha.OsLoginRegionalService`\n\nThe following audit logs are associated with methods belonging to\n`google.cloud.oslogin.controlplane.regional.v1alpha.OsLoginRegionalService`.\n\n#### `SignSshPublicKey`\n\n- **Method** : `google.cloud.oslogin.controlplane.regional.v1alpha.OsLoginRegionalService.SignSshPublicKey` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `compute.instances.osAdminLogin - ADMIN_READ`\n - `compute.instances.osLogin - ADMIN_READ`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.controlplane.regional.v1alpha.OsLoginRegionalService.SignSshPublicKey\"\n ` \n\n### `google.cloud.oslogin.controlplane.regional.v1beta.OsLoginRegionalService`\n\nThe following audit logs are associated with methods belonging to\n`google.cloud.oslogin.controlplane.regional.v1beta.OsLoginRegionalService`.\n\n#### `SignSshPublicKey`\n\n- **Method** : `google.cloud.oslogin.controlplane.regional.v1beta.OsLoginRegionalService.SignSshPublicKey` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `compute.instances.osAdminLogin - ADMIN_READ`\n - `compute.instances.osLogin - ADMIN_READ`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.controlplane.regional.v1beta.OsLoginRegionalService.SignSshPublicKey\"\n ` \n\n### `google.cloud.oslogin.dataplane.OsLoginDataPlaneService`\n\nThe following audit logs are associated with methods belonging to\n`google.cloud.oslogin.dataplane.OsLoginDataPlaneService`.\n\n#### `ListLoginProfiles`\n\n- **Method** : `google.cloud.oslogin.dataplane.OsLoginDataPlaneService.ListLoginProfiles` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.dataplane.OsLoginDataPlaneService.ListLoginProfiles\"\n ` \n\n#### `CheckPolicy`\n\n- **Method** : `google.cloud.oslogin.dataplane.OsLoginDataPlaneService.CheckPolicy` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.dataplane.OsLoginDataPlaneService.CheckPolicy\"\n ` \n\n#### `StartSession`\n\n- **Method** : `google.cloud.oslogin.dataplane.OsLoginDataPlaneService.StartSession` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.dataplane.OsLoginDataPlaneService.StartSession\"\n ` \n\n#### `ContinueSession`\n\n- **Method** : `google.cloud.oslogin.dataplane.OsLoginDataPlaneService.ContinueSession` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.dataplane.OsLoginDataPlaneService.ContinueSession\"\n ` \n\n### `google.cloud.oslogin.v1.OsLoginService`\n\nThe following audit logs are associated with methods belonging to\n`google.cloud.oslogin.v1.OsLoginService`.\n\n#### `ImportSshPublicKey`\n\n- **Method** : `google.cloud.oslogin.v1.OsLoginService.ImportSshPublicKey` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `compute.oslogin.updateExternalUser - DATA_WRITE`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.v1.OsLoginService.ImportSshPublicKey\"\n ` \n\n### `google.cloud.oslogin.v1alpha.OsLoginService`\n\nThe following audit logs are associated with methods belonging to\n`google.cloud.oslogin.v1alpha.OsLoginService`.\n\n#### `SignSshPublicKey`\n\n- **Method** : `google.cloud.oslogin.v1alpha.OsLoginService.SignSshPublicKey` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `compute.oslogin.updateExternalUser - DATA_WRITE`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.v1alpha.OsLoginService.SignSshPublicKey\"\n ` \n\n### `google.cloud.oslogin.v1beta.OsLoginService`\n\nThe following audit logs are associated with methods belonging to\n`google.cloud.oslogin.v1beta.OsLoginService`.\n\n#### `ImportSshPublicKey`\n\n- **Method** : `google.cloud.oslogin.v1beta.OsLoginService.ImportSshPublicKey` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `compute.oslogin.updateExternalUser - DATA_WRITE`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.v1beta.OsLoginService.ImportSshPublicKey\"\n ` \n\n#### `ProvisionPosixAccount`\n\n- **Method** : `google.cloud.oslogin.v1beta.OsLoginService.ProvisionPosixAccount` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `compute.oslogin.updateExternalUser - DATA_WRITE`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.v1beta.OsLoginService.ProvisionPosixAccount\"\n ` \n\n#### `SignSshPublicKey`\n\n- **Method** : `google.cloud.oslogin.v1beta.OsLoginService.SignSshPublicKey` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `compute.oslogin.updateExternalUser - DATA_WRITE`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.oslogin.v1beta.OsLoginService.SignSshPublicKey\"\n ` \n\nMethods that don't produce audit logs\n-------------------------------------\n\nSeveral OS Login methods don't produce audit logs because they act on resources that are scoped\nto a user, and not to a project, folder, or organization.\n\nThe following methods don't produce audit logs:\n\n- `google.cloud.oslogin.v1.OsLoginService.CreateSshPublicKey`\n- `google.cloud.oslogin.v1.OsLoginService.DeletePosixAccount`\n- `google.cloud.oslogin.v1.OsLoginService.DeleteSshPublicKey`\n- `google.cloud.oslogin.v1.OsLoginService.GetLoginProfile`\n- `google.cloud.oslogin.v1.OsLoginService.GetSshPublicKey`\n- `google.cloud.oslogin.v1.OsLoginService.UpdateSshPublicKey`\n- `google.cloud.oslogin.v1alpha.OsLoginService.CreateSshPublicKey`\n- `google.cloud.oslogin.v1alpha.OsLoginService.DeletePosixAccount`\n- `google.cloud.oslogin.v1alpha.OsLoginService.DeleteSshPublicKey`\n- `google.cloud.oslogin.v1alpha.OsLoginService.GetLoginProfile`\n- `google.cloud.oslogin.v1alpha.OsLoginService.GetSshPublicKey`\n- `google.cloud.oslogin.v1alpha.OsLoginService.ProvisionPosixAccount`\n- `google.cloud.oslogin.v1alpha.OsLoginService.UpdateSshPublicKey`\n- `google.cloud.oslogin.v1beta.OsLoginService.CreateSshPublicKey`\n- `google.cloud.oslogin.v1beta.OsLoginService.DeletePosixAccount`\n- `google.cloud.oslogin.v1beta.OsLoginService.DeleteSshPublicKey`\n- `google.cloud.oslogin.v1beta.OsLoginService.GetLoginProfile`\n- `google.cloud.oslogin.v1beta.OsLoginService.GetSshPublicKey`\n- `google.cloud.oslogin.v1beta.OsLoginService.UpdateSshPublicKey`\n\nWhat's next?\n------------\n\n- Learn more about [Logging query language](/logging/docs/view/logging-query-language) to customize your OS Login audit log queries.\n- Learn how [SSH connections to Linux VMs](/compute/docs/instances/ssh) work on Compute Engine."]]