Skip to content

Support keyless/ADC auth (Workload Identity Federation, GCE/Cloud Run) as a fallback #37

Description

@okamoto-dts-stg-com

I wanted keyless auth for this MCP server, but it didn't work with Workload Identity Federation from AWS (no browser available, and the WIF config's "type": "external_account" gets rejected by service_account.Credentials.from_service_account_file()).

I patched get_gsc_service() to add a google.auth.default(scopes=SCOPES) fallback — this also makes it work keylessly on GCE/Cloud Run/GKE via the metadata server, not just WIF. Verified locally: fails before the patch, works after (real sites().list() data returned).

Happy to open a PR if useful — small, backward-compatible addition, existing OAuth/service-account paths untouched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions