Getting Started
Getting Started
Make DuoKey Cockpit the key service of Google Workspace Client-Side Encryption
Overview
The setup has three parts:
| Part | Where | Steps |
|---|---|---|
| Key and KACLS app | DuoKey Cockpit | 1 and 2 |
| Identity provider | Your IdP, or Google Cloud and the Google Admin console | 3 |
| Key service, assignment and services | Google Admin console | 4 to 6 |
Plan for a pilot first: create a dedicated organizational unit (OU) with a few users, assign the DuoKey key service to it, and extend to more OUs once the pilot works.
Prerequisites
Prerequisites
- Google Workspace Enterprise Plus, Education Standard or Education Plus
- A Google Workspace super administrator account
- A DuoKey tenant whose edition includes the Google Workspace CSE app, and a DuoKey Admin account
- A DuoKey vault where you can create an AES-256 key
- Either your own OIDC identity provider, or a Google Cloud project where you can create an OAuth client (Google Identity fallback)
Step 1: Create the wrapping key
Create an AES-256 key in a DuoKey vault
- In the Cockpit, open Vaults and select the vault that will hold the key (or create one).
- Create a key of type AES-256, for example
google-cse-<your-domain>. - Activate the key.
This key wraps every Data Encryption Key that Google sends to DuoKey. It never leaves the vault.
Step 2: Create the Google Workspace CSE app
Start the wizard
Open Apps, click + Create new app and select Google Workspace CSE.
KACLS endpoint
Enter a name (for example Google CSE <your-domain>) and an optional description. The endpoint id is generated for you and is part of the KACLS URL.
Applications
Select the Google applications allowed to use this key service: Google Drive (also covers Docs, Sheets and Slides), Gmail, Google Calendar and Google Meet. A request from an application you did not select is refused.
Authentication
- If you use Google Identity as IdP (fallback, see Step 3), paste the OAuth client id here. You can also add it later.
- If you use another IdP (Microsoft Entra ID, Okta, Keycloak), leave the field empty and add the IdP on the app's detail page after deployment.
- Leave Mock mode off. Mock mode is only for demonstrations with the built-in Google client simulator.
Encryption key
Select the vault and the AES-256 key from Step 1.
Access rules
- Allowed email domains: one per line, for example your primary domain. Empty means all domains.
- Privileged users: the administrators allowed to run bulk import, privileged export and the Gmail S/MIME key wrap. One email address per line.
Review and deploy
Click Deploy KACLS Endpoint. The app's detail page opens.
On the detail page, the KACLS endpoint card shows the KACLS URL and a Status URL. Copy the KACLS URL: you need it in Step 4.

Google does not let you change the URL of an external key service once it is saved, and every wrapped key records the service that wrapped it. Choose the URL before you start encrypting content. If the Cockpit is published behind a custom domain, set that domain as the Public KACLS URL in the app's Configuration card first: it must match the URL saved in Google exactly.
Open the Status URL in a browser: it must answer over HTTPS with the server type KACLS. This check also confirms that users' browsers can reach the endpoint.
Step 3: Set up the identity provider
The KACLS needs to know who the user is. Google Workspace signs the user in with an OIDC identity provider and passes the resulting token to DuoKey. Choose one of the two options.
Option A: your own IdP, published on cse.<your-domain>
Register an OAuth client in your IdP
Create an OIDC client (public client, no secret) for Google Workspace CSE in Microsoft Entra ID, Okta, Keycloak or another IdP. Use the redirect URIs listed by Google in its IdP connection guide.
Publish the CSE configuration file
Publish a JSON file at https://cse.<your-domain>/.well-known/cse-configuration, served over HTTPS with CORS allowed for Google:
{
"name": "DuoKey KACLS IdP",
"client_id": "<OAuth client id>",
"discovery_uri": "https://<your-idp>/.well-known/openid-configuration"
}The app's detail page shows this example with your values.
Trust the IdP in DuoKey
On the app's detail page, in Configuration, Trusted identity providers, click Add IdP and enter:
- Issuer (iss): the issuer of your IdP's id tokens.
- JWKS URL (https): the signing keys URL from the IdP discovery document.
- Audiences / client ids: the
client_idof the CSE configuration file.
Click Save.
Option B: Google Identity through the IdP fallback
If you do not run your own IdP, Google Workspace can use Google Identity. You configure it directly in the Admin console, without a .well-known file.
Create an OAuth web client in Google Cloud
- In the Google Cloud console, select or create a project owned by your organization.
- Configure the OAuth consent screen with the user type Internal.
- Create an OAuth client id of type Web application.
- Add
https://admin.google.comandhttps://client-side-encryption.google.comas authorized JavaScript origins. - Add the redirect URIs listed by Google for CSE:
https://client-side-encryption.google.com/callback,https://client-side-encryption.google.com/oidc/cse/callbackand onehttps://client-side-encryption.google.com/oidc/<service>/callbackfor each service (drive,docs,sheets,slides,gmail,calendar,meet). Copy the exact, current list from Google's IdP connection guide.
Configure the IdP fallback in the Admin console
In the Google Admin console, open Data, Compliance, Client-side encryption, then Identity provider configuration, and enter:
- Name: shown to users in IdP messages, for example
DuoKey. - Client ID: the OAuth client id from the previous step.
- Discovery URI:
https://accounts.google.com/.well-known/openid-configuration.
Click Test connection, then Save.

Trust Google Identity in DuoKey
On the app's detail page, in Configuration, click Add Google Identity. The issuer (https://accounts.google.com) and the JWKS URL (https://www.googleapis.com/oauth2/v3/certs) are filled in. Put the OAuth client id in Audiences / client ids (it is already there if you entered it in the wizard), then click Save.
DuoKey accepts an authentication token only if its audience is one of the client ids you entered. If you replace the OAuth client in Google, update the audiences in DuoKey at the same time, or every request is refused with HTTP 401.
Step 4: Add DuoKey as external key service
Add the key service
- In the Google Admin console, open Data, Compliance, Client-side encryption.
- Under Encryption with an external key service, click Add.
- Enter a name (for example
DuoKey) and paste the KACLS URL from Step 2. - Click Test connection. Google calls the KACLS status endpoint. Then save.

Step 5: Assign the key service
Assign it to an organizational unit or group
On the same page, click Assign, choose the pilot OU or group and select the DuoKey key service. You can make it the default key service for the whole organization later.
Step 6: Turn on CSE for each service
On the Client-side encryption page, open each service and, for the pilot OU or group, turn on the option that lets users create encrypted content:
| Service | What users can then do |
|---|---|
| Drive and Docs | Create encrypted Docs, Sheets and Slides, and upload encrypted files to Drive |
| Gmail | Send and read encrypted email (also needs S/MIME key pairs, see the Gmail page) |
| Calendar | Add encryption to events |
| Meet | Start encrypted calls |
For each service, you can also make encryption the default for new content. Changes can take some time to reach users.
Step 7: Encrypt content
Google Docs, Sheets and Slides
In Drive, click New, then Google Docs (or Sheets, Slides), then Blank encrypted document. The first time, the user signs in with the IdP. The shield icon next to the title shows that the document is encrypted.

Close the document and open it again: the browser asks DuoKey to unwrap the key and the content is shown.
Drive files
In Drive, click New, then File upload, and choose Encrypt and upload file. Any file type can be encrypted. Encrypted files show a shield next to the file type icon.

Calendar and Meet
In Calendar, create an event and click Add encryption (shield icon). The banner shows that the description, attachments and Meet details are encrypted by your domain.

The Meet call attached to an encrypted event is encrypted as well. A shield next to Join with Google Meet marks it as an encrypted call. Inside the call, the shield in the top bar confirms that the extra encryption is on, and Google cannot access the content.

Gmail
Gmail CSE needs one more step: an S/MIME certificate for each user, whose private key is wrapped by the DuoKey KACLS. See Gmail.
Step 8: Verify in DuoKey
Open the app's detail page and look at the Key access log. Each encryption appears as a wrap and each opening as an unwrap, with the user, the Google resource and the IP address. See Operations.
The Health and self-test card checks the vault key, the token validation and the wrap and unwrap flow. Run it after any configuration change.