Personal drives

Your personal Google Drive or OneDrive.

Who can see it Partial
Works with Personal Google Drive · Personal OneDrive
Set up in console

Scan your personal Google Drive or OneDrive through a read-only app you own.

What it scans

Provider Scans Notes
Personal Google Drive Files in My Drive Docs and Slides export as text; Sheets export as CSV
Personal OneDrive Files in your personal Microsoft OneDrive

An optional folder narrows the scan. Work or school accounts use the Google Workspace or Microsoft 365 guides.

What you need

  • Your own agent.
  • A personal provider account.
  • An OAuth app you control. Myrikeep does not register the app or receive its credentials.

Both providers grant account-wide read-only access. A folder limits scanning, not the OAuth grant.

Alternative: a folder you already sync

App passwords do not work for Google Drive or OneDrive files; those services only accept a sign-in (OAuth).

Already sync your drive to a computer or NAS (Google Drive for desktop, the OneDrive app, rclone, Synology Cloud Sync, TrueNAS cloud sync)? Skip the OAuth app:

  1. Mount the synced folder into the agent read-only.
  2. Add a Local/NFS mount connection for it (see Local, NFS and SMB mounts).
Synced folder OAuth sign-in (below)
Finds sensitive files Yes Yes
Shows public links and outside sharing No (a local copy has no sharing information) Yes
Setup Mount a folder Create your own OAuth app once, sign in on the agent

Step 1: Create your OAuth app

  1. Open Google Cloud Console, open the project menu, then New project. Give it a name you recognize.
  2. In APIs & Services → Library, find Google Drive API and enable it.
  3. Open Google Auth Platform (older consoles: OAuth consent screen).
  4. Set the app name, your support email and developer contact email.
  5. Select the External audience.
  6. While the status is Testing, add your own Google account under Test users.
  7. Under Data Access, add https://www.googleapis.com/auth/drive.readonly.
  8. Change the publishing status to In production, then sign in again (Step 3) for a new refresh token.
  9. Under Clients → Create client (or Credentials → Create credentials → OAuth client ID), choose Desktop app. Copy its client ID and client secret into the local file in Secret file. If you download JSON, copy just these two fields from its installed object; do not paste the whole download.
The "Google hasn't verified this app" warning

A personal-use app with fewer than 100 users can be used without verification, so expect this warning: you have not submitted your own app for review. Check that the app shown is yours, then use Advanced → Go to your app if offered. Do not publish this client for general distribution. Myrikeep needs no Google verification.

References: enable APIs, desktop OAuth and PKCE, refresh token expiration, personal-use verification exemption, Drive read-only scope.

Step 2: Save the client file on the agent

Create and mount the client file and catalog entry from Secret file. Keep the existing writable state volume: refresh tokens are stored there.

Step 3: Sign in on the agent

Replace <agent> with the running container's name. The distributed image's binary is datagate-crawler.

sh
docker exec -it <agent> datagate-crawler signin PERSONAL_GOOGLE
  1. Open the printed authorization URL in any browser and approve read-only Drive access.
  2. Copy the full redirected http://127.0.0.1:<port>/... address back into the terminal. Input is hidden.

You should see the CLI confirm the sign-in. On another computer, or outside the container, the final page may say it cannot connect: copy that address anyway.

How the Google sign-in works
  • The CLI validates the pasted address's origin and state; it does not fetch your pasted URL.
  • A bare authorization code also works through the same session's PKCE verifier, but the full URL includes the state check and is preferred.
  • This uses a Desktop loopback redirect, not Google's retired out-of-band redirect.
Other runtimes: source image or local checkout

In a source-runtime image:

sh
docker exec -it <agent> python -m crawler signin PERSONAL_GOOGLE
docker exec -it <agent> python -m crawler signin PERSONAL_MICROSOFT

In a local checkout:

sh
python -m crawler signin PERSONAL_GOOGLE
python -m crawler signin PERSONAL_MICROSOFT

A source checkout can set DG_AGENT_STATE_DIR to a private writable directory. Use the same directory for sign-in and the running agent.

Step 4: Connect and scan

  1. In Connections, select Google Drive (personal account) or OneDrive (personal Microsoft account).
  2. Assign your agent and choose Local credential catalog.
  3. Enter PERSONAL_GOOGLE or PERSONAL_MICROSOFT as the credential name.
  4. Optionally limit the folder:
  5. Google: a folder ID from its folder URL, or root (the default).
  6. OneDrive: a path under root, such as Documents/Taxes, without a leading slash or ...
  7. Queue a scan from Scans.

Connection settings table

Console field Example Required or optional
Connection name Personal taxes Required; unique in workspace
Type gdrive_personal or onedrive_personal Required
Google folder ID (Google) root or ID after /folders/ in its URL Optional; default My Drive root
Root folder path (OneDrive) Documents/Taxes Optional; relative to drive root, no leading slash or ..
Agent Home agent Required; same workspace
Credential mode Local credential catalog Required
Credential name PERSONAL_GOOGLE or PERSONAL_MICROSOFT Required; must match sign-in alias
Exclude patterns (View/edit) *.tmp Optional; one glob per line
Enabled (connection row) Enabled Disable to stop new scans

Secret file

On the agent host, create /srv/myrikeep/secrets and the files below. Replace placeholders locally. Never put secrets in the console or connection config.

Rule Value
Owner The agent UID (the image uses 10001) or root, readable by the agent
Mode 0400 / 0600, or 0440 with a dedicated group

/srv/myrikeep/secrets/personal-google.json:

json
{"client_id": "<YOUR_DESKTOP_CLIENT_ID>", "client_secret": "<YOUR_DESKTOP_CLIENT_SECRET>"}

Merge the entries you use into /srv/myrikeep/secrets/myrikeep-credentials.json:

json
{
  "version": 1,
  "credentials": {
    "PERSONAL_GOOGLE": {
      "type": "gdrive_personal",
      "source": {"kind": "file_json", "path": "/run/secrets/personal-google.json"}
    },
    "PERSONAL_MICROSOFT": {
      "type": "onedrive_personal",
      "source": {"kind": "file_json", "path": "/run/secrets/personal-microsoft.json"}
    }
  }
}

Mount the directory read-only in the agent's docker run command (recreate the container to add a mount):

sh
--mount type=bind,src=/srv/myrikeep/secrets,dst=/run/secrets,readonly

Keep the existing writable state volume at /var/lib/myrikeep. Losing it means signing in again.

Where refresh tokens are stored
  • One oauth-<CREDENTIAL_NAME>.json file per credential name in the state volume, mode 0600, replaced atomically on rotation.
  • Never written into the secret mount, logged or uploaded.
  • Access tokens exist only in memory.

Scope, exclusions and schedules

Provider Scans Excludes
Google My Drive descendants; a folder must have a verifiable parent chain to My Drive Shared with me, shared drives, shortcuts
OneDrive The signed-in user's /me/drive beneath the configured path Cross-drive and package items
  • Exclude globs such as *.tmp, ~$* or *.bak (in Connections → View/edit) match item names, not full folder paths. Case matters.
  • Do not run two agents against the same token state volume.
  • See Getting started for schedule cadence.

"Who can see it" support

Google OneDrive
Public links and outside grants Yes Yes
Restricted result Possible: owner-complete narrow evidence may be restricted Views stay partial: no broad signal means unknown, not restricted
Group membership expansion No No
Age basis Modification time Modification time

Google viewed-by-me timestamps describe only the caller. A synced folder has no cloud sharing evidence. See Who can see it.

Troubleshooting

Symptom or state Fix
unknown Check fresh heartbeat, assignment and current connection revision.
missing / credential_missing Check catalog alias/type and secret mount. Outages can block presence checks without deleting a usable refresh token.
Invalid / credential_config_invalid Use exact client fields, permitted file modes and the mounted path. Extract Google's two fields from installed.
signin_required / Sign-in required Sign in again after a revoked, expired or missing refresh token, a changed OAuth app or a lost state volume.
present Token readiness passed; the folder and file permissions still need a scan.
Google Testing token expires after seven days Switch your own app to In production, then sign in again. Tokens can still expire or be revoked.
Unverified app warning Verify the app shown is your own before continuing.
Redirect page cannot connect Copy its complete loopback URL into the same running CLI session, as in Step 3.
source_error / access denied / item gone Inspect local diagnostics; check folder ID/path, read permission and API enablement. Google needs a My Drive parent chain.
Sharing access_denied / unknown Review read-only metadata permission and rescan; missing evidence never proves restriction.
Paused / Migration paused / Disabled Resume the agent, assign and save a valid connection, or enable it.

To disconnect: revoke your app's consent in the provider account and disable the console connection. Reconnecting then needs a new sign-in.

Limits

Not scanned: shared drives, Shared with me, shortcuts (Google); cross-drive and package items (OneDrive).

Never done: writes, app-password sign-in, group expansion, all-account search.

Limit Value
Folder walks Item, depth, response and time budgets
Classification Bounded samples and exports; see Coverage for skips
Parsers Common text, PDF text and modern Office; other formats get strings-only checks
Text in images and scanned PDFs Needs OCR: an optional premium feature an owner enables; it runs inside your agent with the OCR agent image
Network API and auth hosts are fixed; bearer tokens are not forwarded to redirected download hosts

Processing and optional AI assist follow the security explanation.