All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kgl 0/2] Add token_command support for Gmail targets
@ 2026-11-11  6:59 Dmitry Torokhov
  2026-11-11  6:59 ` [PATCH kgl 1/2] Decouple GmailTarget from OAuth file credential management Dmitry Torokhov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2026-11-11  6:59 UTC (permalink / raw)
  To: Kernel.org Tools; +Cc: Konstantin Ryabitsev

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-12 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11  6:59 [PATCH kgl 0/2] Add token_command support for Gmail targets Dmitry Torokhov
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.