Skip to content
Drive Security
Google Drive

Secure Drive Files Access for AI Agents

Google Drive's OAuth scopes grant access to every file in your account. PortEden sits between your AI agent and the Drive API, enforcing three layers of security: operation permissions, file-level firewall rules, and field visibility controls.

Connect PortEden to Google Drive

Cloud MCP connector URL

https://mcp.porteden.com/drive

Add as a connector in

Read full MCP connector setup docs

How PortEden Protects You

Six layers of security between AI and your data.

Operation Permissions

Choose from 16 individual operation flags or use presets like read_only, docs_read_only, sheets_all. Each agent gets exactly the operations it needs, nothing more.

File-Level Firewall (Drive Rules)

Control access at the file level with rules based on file ID, folder, or MIME type. Block agents from accessing spreadsheets, specific folders, or any file type you specify.

Field Visibility Controls

Mask sensitive metadata fields like file owners, sharing links, and permissions. Agents see what they need to do their job, not your organizational structure.

Docs and Sheets Security

Granular controls extend to Google Docs content (read, insert, append, find-replace) and Sheets data (read values, write cells, append rows) with separate operation flags for each.

Full Audit Trail

Every file access, search query, and edit operation is logged. Know exactly which files each agent accessed, what data was returned, and what was blocked.

Get Started in 3 Steps

1

Connect Google Drive

Install the PortEden CLI and connect your Google account via Custom OAuth with Drive scopes.

2

Set Your Rules

Configure operation permissions, file-level firewall rules, and field visibility for Drive, Docs, and Sheets.

3

Connect Your Agent

Point your AI agent to PortEden instead of the Drive API. Every request is filtered through your rules with full audit logging.

Without vs. With PortEden

Without PortEden

  • Drive OAuth token grants access to every file, Doc, and Sheet in your account
  • No way to restrict agents to specific files, folders, or MIME types
  • Agents can read, modify, trash, and share any file without limits
  • No audit trail of which files the agent accessed or modified
  • Revoking access means disconnecting your entire Google account

With PortEden

  • 16 operation flags control exactly what each agent can do
  • File-level firewall restricts access by file ID, folder, or MIME type
  • Field visibility masks sensitive metadata from agent responses
  • Full audit log of every file access, search, and edit operation
  • Per-token revocation without disconnecting your Google account

Frequently Asked Questions

Can AI agents delete my Google Drive files?
Yes. If granted a Drive OAuth token with write access, an AI agent can trash, rename, move, and overwrite any file in your account. PortEden prevents this by enforcing operation permissions that restrict agents to read-only or specific operations like read_doc_content or read_sheet_data.
How do I restrict an AI agent to specific files or folders?
PortEden's Drive Rules act as a file-level firewall. You can create allow/block rules based on file ID, folder ID, or MIME type. For example, allow access only to files in your Project folder, or block all spreadsheets. Block rules always override allow rules.
Can I give an agent access to Docs but not Sheets?
Yes. PortEden has separate operation flags for Docs (read_doc_content, edit_doc_content) and Sheets (read_sheet_data, write_sheet_data). You can use presets like docs_read_only or sheets_all to configure this quickly.
Does PortEden work with Google Workspace?
Yes. PortEden connects via a Custom OAuth app and works with both personal Google accounts and Google Workspace (business) accounts. It adds a security layer on top of existing Google admin controls.
What happens if an agent tries an operation it does not have permission for?
The request is blocked with a 403 OPERATION_NOT_ALLOWED error. The agent receives a clear error message, and the blocked attempt is logged in the audit trail. Your files are never touched.

Ready to secure your data?

Set up PortEden in under 5 minutes. Free tier available.

Read the Docs