クライアントサイド暗号化用のカスタム鍵サービスを構築する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Google Workspace が提供する暗号化を使用する代わりに、独自の暗号鍵を使用して組織のデータを暗号化できます。Google Workspace クライアントサイド暗号化(CSE)では、ファイルが Google ドライブのクラウドベースのストレージに保存される前に、クライアントのブラウザでファイルの暗号化が処理されます。このため、Google のサーバーが暗号鍵にアクセスしてデータを復号することはできません。詳しくは、クライアントサイド暗号化についてをご覧ください。
この API を使用すると、カスタムの外部鍵サービスでデータを保護する最上位の暗号鍵を制御できます。この API を使用して外部鍵サービスを作成すると、Google Workspace 管理者はその鍵サービスに接続して、ユーザーに対して CSE を有効にできます。
重要な用語
Google Workspace クライアントサイド暗号化 API で使用される一般的な用語を以下に示します。
- クライアントサイド暗号化(CSE)
- クラウドベースのストレージに保存される前に、クライアントのブラウザで処理される暗号化。これにより、ストレージ プロバイダによるファイルの読み取りを防ぐことができます。詳細
- Key Access Control List Service(KACLS)
- この API を使用して、外部システムに保存されている暗号鍵へのアクセスを制御する外部鍵サービス。
- ID プロバイダ(IdP)
- ユーザーがファイルを暗号化したり、暗号化されたファイルにアクセスしたりする前に、ユーザーを認証するサービス。
暗号化と復号
- データ暗号鍵(DEK)
- ブラウザ クライアントで Google Workspace がデータ自体を暗号化するために使用する鍵。
- 鍵暗号鍵(KEK)
- データ暗号鍵(DEK)の暗号化に使用されるサービスからの鍵。
アクセス制御
- アクセス制御リスト(ACL)
- ファイルを開いたり読んだりできるユーザーまたはグループのリスト。
- 認証 JSON Web Token(JWT)
- ユーザーの ID を証明するために ID パートナー(IdP)によって発行されるベアラートークン(JWT: RFC 7516)。
- 認可 JSON Web Token(JWT)
- 呼び出し元がリソースの暗号化または復号を行う権限を持っていることを確認するために Google が発行するベアラートークン(JWT: RFC 7516)。
- JSON Web Key Set(JWKS)
- JSON ウェブトークン(JWT)の検証に使用される公開鍵のリストを指す読み取り専用のエンドポイント URL。
- 境界
- アクセス制御のために KACLS 内の認証トークンと認可トークンに対して実行される追加のチェック。
クライアントサイド暗号化のプロセス
管理者が組織で CSE を有効にすると、CSE が有効になっているユーザーは、Google Workspace の共同コンテンツ作成ツール(ドキュメントやスプレッドシートなど)を使用して暗号化されたドキュメントを作成したり、Google ドライブにアップロードするファイル(PDF など)を暗号化したりできます。
ユーザーがドキュメントまたはファイルを暗号化した後:
Google Workspace は、コンテンツを暗号化するためにクライアント ブラウザで DEK を生成します。
Google Workspace は、Google Workspace 組織の管理者に提供された URL を使用して、暗号化のために DEK と認証トークンをサードパーティの KACLS に送信します。
KACLS はこの API を使用して DEK を暗号化し、難読化された暗号化済みの DEK を Google Workspace に返送します。
Google Workspace は、難読化され暗号化されたデータをクラウドに保存します。データにアクセスできるのは、KACLS にアクセスできるユーザーのみです。
詳しくは、ファイルを暗号化、復号するをご覧ください。
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[null,null,["最終更新日 2025-08-29 UTC。"],[[["\u003cp\u003eGoogle Workspace Client-side Encryption (CSE) allows you to encrypt your organization's data with your own keys, preventing Google servers from accessing or decrypting it.\u003c/p\u003e\n"],["\u003cp\u003eThis API enables you to manage the encryption keys via an external key service, giving you control over data access.\u003c/p\u003e\n"],["\u003cp\u003eCSE encrypts files in the user's browser before they are stored in Google Drive, ensuring only authorized users with access to your external key service can decrypt them.\u003c/p\u003e\n"],["\u003cp\u003eWhen a file is encrypted, Google Workspace generates a Data Encryption Key (DEK), which is then encrypted by your external key service and stored with the encrypted data.\u003c/p\u003e\n"],["\u003cp\u003eTo get started, you can configure your external key service and learn how to encrypt and decrypt data using the provided guides.\u003c/p\u003e\n"]]],["Google Workspace Client-side Encryption (CSE) allows users to encrypt data in their browser before cloud storage. This is achieved by using your own external Key Access Control List Service (KACLS). Google Workspace generates a Data Encryption Key (DEK) and sends it to your KACLS for encryption with a Key Encryption Key (KEK). Your service then returns the encrypted DEK to Google Workspace. This ensures that only users with KACLS access can decrypt the stored data.\n"],null,["# Build a custom key service for client-side encryption\n\nYou can use your own encryption keys to encrypt your organization's data,\ninstead of using the encryption that Google Workspace provides. With Google Workspace Client-side Encryption (CSE), file encryption is handled in the\nclient's browser before it's stored in Drive's cloud-based storage. That way,\nGoogle servers can't access your encryption keys and, therefore, can't decrypt\nyour data. For more details, see\n[About client-side encryption](https://support.google.com/a/answer/10741897#zippy=%2Cbasic-setup-steps-for-cse).\n\nThis API lets you control the top-level encryption keys that protect your data\nwith a custom external key service. After you create an external key service\nwith this API, Google Workspace administrators can connect to it and enable CSE\nfor their users.\n\nImportant terminology\n---------------------\n\nBelow is a list of common terms used in the Google Workspace Client-side Encryption API:\n\n*Client-side encryption (CSE)*\n: Encryption that's handled in the client's browser before it's stored in\n cloud-based storage. This protects the file from being read by the storage\n provider. [Learn more](https://support.google.com/a/answer/10741897#zippy=%2Chow-is-cse-different-from-end-to-end-ee-encryption)\n\n*Key Access Control List Service (KACLS)*\n: Your external key service that uses this API to control access to encryption\n keys stored in an external system.\n\n*Identity Provider (IdP)*\n: The service that authenticates users before they can encrypt files or access\n encrypted files.\n\n### Encryption \\& decryption\n\n*Data Encryption Key (DEK)*\n: The key used by Google Workspace in the browser client to encrypt the data\n itself.\n\n*Key Encryption Key (KEK)*\n: A key from your service used to encrypt a Data Encryption Key (DEK).\n\n### Access control\n\n*Access Control List (ACL)*\n: A list of users or groups that can open or read a file.\n\n*Authentication JSON Web Token (JWT)*\n: Bearer token ([JWT: RFC 7516](https://tools.ietf.org/html/rfc7516))\n issued by the identity partner (IdP) to attest a user's identity.\n\n*Authorization JSON Web Token (JWT)*\n: Bearer token ([JWT: RFC 7516](https://tools.ietf.org/html/rfc7516))\n issued by Google to verify that the caller is authorized to encrypt or decrypt a resource.\n\n*JSON Web Key Set (JWKS)*\n: A read-only endpoint URL that points to a list of public keys used to verify\n JSON Web Tokens (JWT).\n\n*Perimeter*\n: Additional checks performed on the authentication and authorization tokens\n within the KACLS for access control.\n\nClient-side encryption process\n------------------------------\n\nAfter an administrator enables CSE for their organization, users for whom CSE is\nenabled can choose to create encrypted documents using the Google Workspace\ncollaborative content creation tools, like Docs and Sheets, or encrypt files\nthey upload to Google Drive, such as PDFs.\n\nAfter the user encrypts a document or file:\n\n1. Google Workspace generates a DEK in the client browser to encrypt the\n content.\n\n2. Google Workspace sends the DEK and authentication tokens to your third-party\n KACLS for encryption, using a URL you provide to the\n Google Workspace organization's administrator.\n\n3. Your KACLS uses this API to encrypt the DEK, then sends the obfuscated,\n encrypted DEK back to Google Workspace.\n\n4. Google Workspace stores the obfuscated, encrypted data in the cloud.\n Only users with access to your KACLS are able to access the data.\n\nFor more details, see [Encrypt and decrypt files](/workspace/cse/guides/encrypt-and-decrypt-data).\n\nNext steps\n----------\n\n- Learn how to [configure your service](/workspace/cse/guides/configure-service).\n- Learn how to [encrypt \\& decrypt data](/workspace/cse/guides/encrypt-and-decrypt-data)."]]