{
  "schema": "aaes/capability-pack/1",
  "provider": "googledrive",
  "version": "1.0.0",
  "description": "Find and read Google Drive files, download blobs, export native documents to PDF, replace content, grant access and permanently delete items.",
  "notes": "FILE_ID in paths is a placeholder. Substitute a concrete file id before enabling; never enable literal placeholders. The host stays www.googleapis.com, the authority in Google's Drive v3 method references. Registered query strings are intentional: alt=media returns blob bytes, mimeType=application%2Fpdf fixes native-document export to PDF, and uploadType=media fixes existing-file upload to raw media. supportsAllDrives=true is bound on methods that document it. The permission-create endpoint pins sendNotificationEmail=false and transferOwnership=false; caller URL changes cannot enable notification email or ownership transfer. The permission body remains configurable, including broad sharing; review its recipients and roles.\n\nfiles.list finds files and folders; to search or list one folder, the deployment must bind a reviewed q query into that registered endpoint (Google documents parent membership and search syntax). The shipped list has no q filter and includes trashed files. Bind corpus, shared-drive id, fields and pagination queries through deployment change control when needed. A caller cannot supply dynamic query strings to this executor. Do not interpret a list or revision history as complete: page tokens and incompleteSearch must be checked by deployment code. No such pagination adapter ships in this pack.\n\nScope selection belongs to the external token process. The method tables allow drive.metadata.readonly for file listing/metadata, permission listing and revision listing. drive.file offers per-file access to files selected or shared with the app and is supported for those methods, blob download, PDF export, upload update, permission creation and permanent delete. drive.readonly supports reads across files, including shared-drive listing; drives.list documents only drive.readonly or drive. drive is the broader read/write scope. Metadata-only scopes do not authorize downloading content. All abbreviated scope names here have prefix https://www.googleapis.com/auth/. Remove shared-drive listing if using only drive.file. Do not widen scope just to keep an unused capability.\n\nUser-consent OAuth acts as the authorizing user. A service account with Workspace domain-wide delegation instead impersonates a named user through the JWT sub claim after a super administrator grants its numeric client id explicit scopes. It does not bypass that user's permissions. A service account can also access files shared with that service account directly; that is a separate principal, not user delegation. Bind the intended principal and file access in the custody review.\n\nOnly simple upload of an existing file is registered, as update/R2; send the raw content with its valid Content-Type. Google's simple-upload guide specifies small files of 5 MB or less. The update method documents an overall maximum file size of 5,120 GB and accepts any valid media MIME type; that overall limit is not the simple-upload recommendation. No resumable or multipart flow is registered. Native document export is limited to 10 MB by Google and fixed here to PDF for supported document types. The vendor page-size maxima are 100 shared drives, 1000 files, 100 permissions and 1000 revisions; these are item counts, not byte limits. The shipped list calls request 100 items.\n\nPermission creation declares create and share at R3. Notification email and ownership transfer are disabled by the registered query values, not merely by these notes. Permanent files.delete declares delete/R3: it bypasses trash, and deleting a folder also deletes descendants owned by the user; shared-drive deletion requires organizer on the parent folder. Moving to trash through files.update is excluded. Sharing cannot undo disclosure. On supported AAES-mediated execution paths, irreversible actions require approval by an authorized person; this does not prevent calls through bypass or observation-only paths.\n\nThe method pages describe successful JSON/byte responses directly on www.googleapis.com, with no required redirect hop for these registrations; any unexpected 3xx is not followed or confirmed. Browser webContentLink/exportLinks and long-running files.download (including Google Vids) are excluded. Also excluded: files.create/copy, general metadata updates (including trash and parent changes), multipart/resumable upload, ownership transfer, sharing notification email, permission update/delete, revision download/update/delete, shared-drive administration, changes/watch/channels, comments/replies, labels, approvals/access proposals, apps/about and appDataFolder-specific operations. No browser link or returned URL is followed automatically.\n\nSchema 1 has no per-capability size/type limits or result-mode fields. By default the executor digests and discards the response body under MaxResponseBytes. Returning bytes to an agent requires a deployment registration with result mode inline_bounded: ResultMaxBytes caps decoded bytes (default 256 KiB) and ResultContentTypes allowlists media types. For pii data this registration also requires the accountable owner and reason in result_ack_owner and result_ack_reason; no acknowledgement is supplied by this draft. Oversized or disallowed inline results are refused, not truncated. Neither vendor limits nor these notes enforce an upload payload cap. The deployment must bound uploads and select data handling appropriate to its contents; pii is a starting classification, and sensitive estates must raise it. Caller query parameters do not change the dialed URL: reviewed query values and pagination tokens must be bound into the registered endpoint through deployment change control. Collection responses can be incomplete; this pack supplies no automatic pagination or completeness check.\n\nOpen custody review, pending owner: user consent versus service-account delegation; principal, scope and file access; token lifetime and renewal; consent/delegation revocation and propagation; executor access, custody-source errors, logs, memory and crash handling; bypass paths; and live tenant verification. Documentation review and synthetic fixtures do not close that review.",
  "credential": {
    "secret_ref_id": "secret-ref-googledrive-access-token",
    "custody": "customer_vault",
    "inject": "header",
    "inject_name": "Authorization",
    "note": "Store only the complete Authorization header value, 'Bearer <token>', where <token> is a Google OAuth 2.0 access token minted and renewed by an external token process. Never store a refresh token, ID token, authorization code, client secret, service-account JSON key, private key, signed JWT assertion or token-response JSON under this reference. This schema 1 pack performs no OAuth exchange or refresh.\n\nFor user consent, the external process exchanges the authorization code and retains any offline refresh token separately; it renews before the token response's expires_in elapses. For a service account impersonating a Workspace user, the external process exchanges a signed JWT with that user's sub at https://oauth2.googleapis.com/token after a super administrator authorizes the service account's client id and explicit scopes. Google's documented response example gives expires_in=3600; use the actual response, not a hard-coded guarantee. The external process retains signing material and replaces the complete stored header on renewal.\n\nUser consent can be revoked in account settings or through https://oauth2.googleapis.com/revoke; Google notes propagation can take time. For domain-wide delegation, remove the client or its scopes in the Admin console to withdraw delegation and stop future delegated issuance. Do not promise that deleting a key or delegation instantly invalidates all existing access tokens. Validate the deployment's residual validity and revocation procedure in the open custody review.\n\nResolve the stored header only at execution. The custody source must never include material in errors. Verify executor-only access, redaction, traces, memory and crash-dump handling in the deployment; this pack cannot establish those properties. An expired reference or refused credential prevents execution; Google validates the access token itself."
  },
  "capabilities": [
    {
      "capability_id": "googledrive.drives.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/drives?pageSize=100",
      "method": "GET",
      "connector": "http",
      "actions": [
        "read"
      ],
      "resource_id": "googledrive-files",
      "description": "List the user's shared drives; drive.readonly is the narrowest scope in this method's table.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files?pageSize=100&supportsAllDrives=true",
      "method": "GET",
      "connector": "http",
      "actions": [
        "read"
      ],
      "resource_id": "googledrive-files",
      "description": "List files and folders, including trashed files; reviewed search/folder queries must be registered by the deployment.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.metadata.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files/FILE_ID?supportsAllDrives=true",
      "method": "GET",
      "connector": "http",
      "actions": [
        "read"
      ],
      "resource_id": "googledrive-files",
      "description": "Read metadata of one file.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.content.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media&supportsAllDrives=true",
      "method": "GET",
      "connector": "http",
      "actions": [
        "read"
      ],
      "resource_id": "googledrive-files",
      "description": "Download blob content directly in the response; native Workspace documents require export.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.export.pdf",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files/FILE_ID/export?mimeType=application%2Fpdf",
      "method": "GET",
      "connector": "http",
      "actions": [
        "read"
      ],
      "resource_id": "googledrive-files",
      "description": "Export a supported native Workspace document to PDF; Google limits exported content to 10 MB.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.permissions.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions?pageSize=100&supportsAllDrives=true",
      "method": "GET",
      "connector": "http",
      "actions": [
        "read"
      ],
      "resource_id": "googledrive-files",
      "description": "List permissions on one file.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.revisions.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files/FILE_ID/revisions?pageSize=100",
      "method": "GET",
      "connector": "http",
      "actions": [
        "read"
      ],
      "resource_id": "googledrive-files",
      "description": "List file revisions; the response may be incomplete and paginated.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.content.update",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R2",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/upload/drive/v3/files/FILE_ID?uploadType=media&supportsAllDrives=true",
      "method": "PATCH",
      "connector": "http",
      "actions": [
        "update"
      ],
      "resource_id": "googledrive-files",
      "description": "Replace existing file content through simple media upload; use for files of 5 MB or less.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.permissions.create",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R3",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files/FILE_ID/permissions?sendNotificationEmail=false&transferOwnership=false&supportsAllDrives=true",
      "method": "POST",
      "connector": "http",
      "actions": [
        "create",
        "share"
      ],
      "resource_id": "googledrive-files",
      "description": "Grant access without notification email or ownership transfer; sharing is irreversible.",
      "requires_review": true
    },
    {
      "capability_id": "googledrive.files.delete",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R3",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "www.googleapis.com"
      ],
      "endpoint": "https://www.googleapis.com/drive/v3/files/FILE_ID?supportsAllDrives=true",
      "method": "DELETE",
      "connector": "http",
      "actions": [
        "delete"
      ],
      "resource_id": "googledrive-files",
      "description": "Permanently delete without trash; folder deletion includes descendants owned by the user.",
      "requires_review": true
    }
  ],
  "resources": [
    {
      "resource_id": "googledrive-files",
      "kind": "api",
      "locator": "https://www.googleapis.com/drive/v3/files",
      "data_class": "pii",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN"
    }
  ],
  "review": {
    "state": "draft",
    "date": "2026-10-29",
    "sources": [
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/drives/list (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/files/list (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/files/get (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/files/export (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/permissions/list (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/revisions/list (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/files/update (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/permissions/create (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/files/delete (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/guides/manage-downloads (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/guides/manage-uploads (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/guides/ref-export-formats (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/guides/api-specific-auth (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/guides/search-files (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/files (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/permissions (retrieved 2026-10-29)",
      "https://developers.google.com/workspace/drive/api/reference/rest/v3/revisions (retrieved 2026-10-29)",
      "https://developers.google.com/identity/protocols/oauth2/web-server (retrieved 2026-10-29)",
      "https://developers.google.com/identity/protocols/oauth2/service-account (retrieved 2026-10-29)",
      "https://knowledge.workspace.google.com/admin/apps/control-api-access-with-domain-wide-delegation (retrieved 2026-10-29)"
    ],
    "reviewer_id": "aaes-eng"
  }
}
