From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: [PATCH kgl 0/2] Add token_command support for Gmail targets
Date: Tue, 10 Nov 2026 22:59:17 -0800 [thread overview]
Message-ID: <20261110-token-command-v1-0-a089145494d3@gmail.com> (raw)
This series adds support for obtaining Gmail OAuth2 bearer tokens from
an external command via a new token_command setting on Gmail targets
(similar to passwordeval in msmtp or PassCmd in mbsync). This lets
korgalore share an encrypted credential store or OAuth2 token helper
(such as oama, git-credential helpers, or custom keyring/GPG scripts)
with other mail tools without managing separate Google OAuth client
secrets, running another browser login flow, or keeping an unencrypted
token JSON file on disk.
Patch 1 extracts file-based OAuth credential management out of
GmailTarget into a dedicated google_creds module so GmailTarget accepts
any google.auth Credentials provider. Patch 2 adds the command-backed
credential provider, wires up token_command, verifies Gmail access
during kgl auth, and documents the new option.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
Dmitry Torokhov (2):
Decouple GmailTarget from OAuth file credential management
Add token_command support for Gmail targets
docs/configuration.rst | 10 +-
korgalore-example.toml | 2 +
man/korgalore.toml.5 | 12 +-
src/korgalore/cli.py | 35 +++--
src/korgalore/gmail_target.py | 225 ++++++++++++++--------------
src/korgalore/google_creds.py | 336 ++++++++++++++++++++++++++++++++++++++++++
tests/test_cli_misc.py | 103 ++++++++++++-
tests/test_gmail_target.py | 254 +++++++++++++++++--------------
tests/test_google_creds.py | 262 ++++++++++++++++++++++++++++++++
9 files changed, 997 insertions(+), 242 deletions(-)
---
base-commit: ea22e7c8701e566328f197c748718cd689f9ea28
change-id: 20261104-token-command-2e22bf5ba436
Thanks.
--
Dmitry
next reply other threads:[~2026-11-11 6:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 6:59 Dmitry Torokhov [this message]
2026-11-11 6:59 ` [PATCH kgl 1/2] Decouple GmailTarget from OAuth file credential management Dmitry Torokhov
2026-11-11 6:59 ` [PATCH kgl 2/2] Add token_command support for Gmail targets Dmitry Torokhov
2026-11-12 19:58 ` [PATCH kgl 0/2] " Konstantin Ryabitsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110-token-command-v1-0-a089145494d3@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=konstantin@linuxfoundation.org \
--cc=tools@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox