René's URL Explorer Experiment


Title: feat: Google Service Account secret type (JWT → Bearer token injection) · Issue #414 · onecli/onecli · GitHub

Open Graph Title: feat: Google Service Account secret type (JWT → Bearer token injection) · Issue #414 · onecli/onecli

X Title: feat: Google Service Account secret type (JWT → Bearer token injection) · Issue #414 · onecli/onecli

Description: Summary Add a google_service_account secret type that lets agents call Google APIs (Drive, Sheets, etc.) authenticated as a GCP service account — without the SA private key ever entering the agent's environment. The gateway holds the SA ...

Open Graph Description: Summary Add a google_service_account secret type that lets agents call Google APIs (Drive, Sheets, etc.) authenticated as a GCP service account — without the SA private key ever entering the agent'...

X Description: Summary Add a google_service_account secret type that lets agents call Google APIs (Drive, Sheets, etc.) authenticated as a GCP service account — without the SA private key ever entering the agent&...

Opengraph URL: https://github.com/onecli/onecli/issues/414

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: Google Service Account secret type (JWT → Bearer token injection)","articleBody":"## Summary\n\nAdd a `google_service_account` secret type that lets agents call Google APIs (Drive, Sheets, etc.) authenticated as a GCP service account — without the SA private key ever entering the agent's environment.\n\nThe gateway holds the SA JSON key in the vault, signs a short-lived JWT (RS256), exchanges it at `oauth2.googleapis.com/token`, caches the access token, and injects it as a Bearer header into matching requests. This is the same pattern the GitHub App integration already uses (private key → signed JWT → short-lived token → header injection).\n\n## Motivation / use case\n\nMulti-agent setups where different agents need access to *different* Google Drive data. Example: an HR agent and a Dev agent, each assigned (via selective secret mode) a different service account that is a member of only its department's shared drive. Isolation is enforced by Google-side permissions + per-agent secret grants — a compromised agent cannot reach the other department's data, and cannot exfiltrate the key because only the resolved short-lived token ever crosses the gateway.\n\nThe existing OAuth \"apps\" connectors cover human-account flows, and Vertex AI covers `cloud-platform` scope on aiplatform hosts, but there is currently no way to use a plain service account against general Google APIs.\n\n## Design decisions (feedback welcome)\n\n- **Secret, not App.** SA keys are bring-your-own credentials with a user-configurable host pattern, which matches the Secret abstraction\n  (host/path matching + injection). Apps are provider integrations with lifecycle management. Happy to discuss if you'd prefer this as an app  provider instead.\n- **Token resolution in the connect phase**, mirroring the existing OpenAI OAuth refresh (`connect.rs`), keeping `build_injections()` synchronous.\n- **JWT claims omit `sub`.** `sub` is only meaningful for domain-wide delegation; without DWD it can cause `invalid_grant`. (The Vertex AI path\n  keeps `sub` — unchanged.) Shared JWT-exchange logic could be factored out of `refresh_via_service_account()` with `scope`/`sub` parameterized.\n- **Default hostPattern `www.googleapis.com`** (not `*.googleapis.com`), to avoid matching the token endpoint and colliding with Vertex AI hosts. An\n  explicit guard also skips injection for `oauth2.googleapis.com` even if a user broadens the pattern.\n- **In-memory token cache** (~50 min TTL, 10 min safety margin), keyed by `secret_id + hash(secret value)` so key rotation invalidates immediately.\n  No DB write-back. Note: on the Cloud edition this cache is Redis, meaning short-lived access tokens would transit the shared cache — flagging for review.\n- **Scope hardcoded to `drive.readonly` for MVP**, surfaced in the UI.\n  Configurable scopes (via secret metadata) planned as a follow-up.\n- **Metadata stores only `client_email` / `project_id`** — never the private\n  key. Tests assert the key does not leak into metadata or error messages.\n\n## Status\n\nImplemented in my fork (yosukekmt/onecli), including validation/service layer, dialog UI with JSON key upload + parsed preview, gateway resolution with the cache behavior above, and unit tests (validation, service layer, and token-resolution cache hit/miss/expiry/rotation via an injected fetcher).\n\nI'd like to submit this as a PR for this.","author":{"url":"https://github.com/yosukekmt","@type":"Person","name":"yosukekmt"},"datePublished":"2026-07-07T02:57:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/414/onecli/issues/414"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:73d222ca-e3bf-d9ce-d1f8-0d283f318d03
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9E9E:2AF233:302343F:4082C81:6A5DB6EB
html-safe-nonceb352f7bdd193b63db7949895d9298087bf67942c2d22c22299556ab8e6387dc7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTlFOjJBRjIzMzozMDIzNDNGOjQwODJDODE6NkE1REI2RUIiLCJ2aXNpdG9yX2lkIjoiODYyMTMzMjk0NzkwNjk2NzI3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd036241bac8c404d85fda99bb510edeb2bb11700e7dbda9d82b4b4083f10b83c
hovercard-subject-tagissue:4824807848
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/onecli/onecli/414/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c9ec0f7141179fd19ea4570e1b065ef1d7e74a333f45965dfad753b791200461/onecli/onecli/issues/414
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c9ec0f7141179fd19ea4570e1b065ef1d7e74a333f45965dfad753b791200461/onecli/onecli/issues/414
og:image:altSummary Add a google_service_account secret type that lets agents call Google APIs (Drive, Sheets, etc.) authenticated as a GCP service account — without the SA private key ever entering the agent'...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameyosukekmt
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/onecli/onecli git https://github.com/onecli/onecli.git
octolytics-dimension-user_id263660444
octolytics-dimension-user_loginonecli
octolytics-dimension-repository_id1175900220
octolytics-dimension-repository_nwoonecli/onecli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1175900220
octolytics-dimension-repository_network_root_nwoonecli/onecli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/onecli/onecli/issues/414#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fonecli%2Fonecli%2Fissues%2F414
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fonecli%2Fonecli%2Fissues%2F414
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=onecli%2Fonecli
Reloadhttps://github.com/onecli/onecli/issues/414
Reloadhttps://github.com/onecli/onecli/issues/414
Reloadhttps://github.com/onecli/onecli/issues/414
Please reload this pagehttps://github.com/onecli/onecli/issues/414
onecli https://github.com/onecli
oneclihttps://github.com/onecli/onecli
Notifications https://github.com/login?return_to=%2Fonecli%2Fonecli
Fork 144 https://github.com/login?return_to=%2Fonecli%2Fonecli
Star 2.5k https://github.com/login?return_to=%2Fonecli%2Fonecli
Code https://github.com/onecli/onecli
Issues 65 https://github.com/onecli/onecli/issues
Pull requests 25 https://github.com/onecli/onecli/pulls
Actions https://github.com/onecli/onecli/actions
Projects https://github.com/onecli/onecli/projects
Security and quality 0 https://github.com/onecli/onecli/security
Insights https://github.com/onecli/onecli/pulse
Code https://github.com/onecli/onecli
Issues https://github.com/onecli/onecli/issues
Pull requests https://github.com/onecli/onecli/pulls
Actions https://github.com/onecli/onecli/actions
Projects https://github.com/onecli/onecli/projects
Security and quality https://github.com/onecli/onecli/security
Insights https://github.com/onecli/onecli/pulse
#416https://github.com/onecli/onecli/pull/416
feat: Google Service Account secret type (JWT → Bearer token injection)https://github.com/onecli/onecli/issues/414#top
#416https://github.com/onecli/onecli/pull/416
https://github.com/yosukekmt
yosukekmthttps://github.com/yosukekmt
on Jul 7, 2026https://github.com/onecli/onecli/issues/414#issue-4824807848
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.