From: Cesar Crusius <cesar.crusius@gmail.com>
To: Michael Anckaert <michael.anckaert@sinax.be>
Cc: emacs-devel@gnu.org
Subject: Re: Making GNUS continue to work with Gmail
Date: Fri, 07 Aug 2020 17:01:46 -0700 [thread overview]
Message-ID: <pxwh5z9uatud.fsf@gmail.com> (raw)
In-Reply-To: <87mu36e206.fsf@sinax.be> (Michael Anckaert's message of "Fri, 07 Aug 2020 20:37:13 +0200")
[-- Attachment #1: Type: text/plain, Size: 5496 bytes --]
Michael Anckaert <michael.anckaert@sinax.be> writes:
> Cesar Crusius writes:
>
>> Richard Stallman <rms@gnu.org> writes:
>>
>>> [[[ To any NSA and FBI agents reading my email: please consider ]]]
>>> [[[ whether defending the US Constitution against all enemies, ]]]
>>> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>>>
>>> > The person you want to reach out to is probably
>>> > dvratil@kde.org. Here's a relevant blog post from him, about how
>>> > he fixed the Kontact Oauth2 problem:
>>>
>>> > https://www.dvratil.cz/2019/08/kontact-google-integration-issue/
>>>
>>> Lars, is this something you can do?
>>>
>>> > My auth-source-xoauth2 package "avoids" that by having every user
>>> > do the API key dance with Google, and as a result is rather hard
>>> > to setup.
>>>
>>> Aside from the inconvenience, is there anything about this we simply
>>> cannot ask users to do? Does it require accepting terms that are
>>> unjust and not required for using Gmail itself?
>>
>> I went through the process a long time ago, so I can't answer that
>> with certainty. The current legalese is in the pages here:
>>
>> https://developers.google.com/terms
>>
>> Somebody with a keener legal eye could look at it, but there are
>> certainly more/different terms there.
>>
>> As an aside, it is worth noting that my package is not
>> Gmail-specific. It could be used for the Reddit example given before
>> via similar means: register a project/app in Reddit, get the keys,
>> etc.
>>
>> The crux here is that there needs to be an app - their intent is
>> that the software producer (in this case an "Emacs" or "Gnus")
>> registers an "official" app, and the app manages its secrets in a
>> way compliant with their terms (which we already know is pretty hard
>> for OSS projects).
>
> I've picked up this discussion from the list archives and decided to
> chime in with some information I have. Since I lack the previous
> emails in this discussion, please excuse me replying out of sync.
>
> Including the client ID / secret key in Emacs source code (as
> Thunderbird does) is bad practice. In addition, I believe there might
> be some legal / moral issues with registering an FSF application under
> the Google TOS.
>
> The only suitable alternative would be to have the user register his
> own Google Cloud Project and use that client ID to run the OAUTH2
> flow. This approach differs in that instead of having one client and
> many users, we have one client for every user.
This is exactly what the auth-source-xoauth2 package asks the user to do, with documentation on how to do it *for Google projects.*
> In the past I've written a number of software packages for companies
> that had to make use of Google API's using OAUTH2 authentication. In
> some cases we couldn't include the client secret in those packages
> (various departments had their own Google Cloud projects and API usage
> guidelines). So in essence I had the same issue as what Emacs is
> facing now.
>
> The solution was to have the software prompt the user to create a
> specific project on Google Cloud and specify the client secret in the
> application configuration. A similar approach could be chosen for
> Emacs so that instead of having a single client ID for Emacs, every
> user creates his/her own project and configures the client ID in
> his/her Emacs configuration. Then the OAUTH2 flow has to be run for
> that 'Emacs application'.
>
> The flow as I once implemented it could be adapted to Emacs as follows:
>
> * The Emacs documentation specifies the user what type of Google
> Cloud project has to be created and what client ID / secrets have to
> be configured.
> * After configuring this information, the user starts an Emacs
> command (eg M-x retrieve-oauth-credentials)
> * This command starts a local webserver and opens the address in the user's browser
> * The webpage displayed allows the user to start the OAUTH2 flow
> which redirects to the local webpage with the OAUTH2 token
> * Emacs stores the OAUTH2 token in a suitable location
>
> I would have to check back to some code I have stored to verify the
> entire flow and make sure I didn't miss anything. But in essence the
> flow above is what would be required.
>
> If deemed suitable, I'm willing to aid in development of this feature
> if someone can spend some time mentoring / guiding me on the required
> steps and correct implementation details.
One worry I have about this is that it wold be very Google-specific, as there are other places where this is necessary (Reddit came up as an example) that have a quite different project registration workflow.
The impression I get from all the discussion is that, in the end, OAUTH2 is just extremely OSS-unfriendly, and currently there may be no better solution than simply say "go register a project and generate the keys" in various levels of detail.
My personal take on this is that documentation serves the purpose better, but I'm not against utility functions that guide you through the setup. I know, for example, that the Google Cloud Developer console is *extremely* accessibility-unfriendly, to the point of being unusable (T.V. Raman can correct me here if I'm exaggerating) - the workflow you sketched above would not solve that problem, as the user still has to navigate the Google interface to do things.
--
Cesar Crusius
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]
next prev parent reply other threads:[~2020-08-08 0:01 UTC|newest]
Thread overview: 120+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m38shor86n.fsf@fitzsim.org>
[not found] ` <E1jbFn6-000436-BO@fencepost.gnu.org>
[not found] ` <m3eereog5f.fsf@fitzsim.org>
[not found] ` <E1jbcAz-0007XM-DE@fencepost.gnu.org>
[not found] ` <m3k115mkbk.fsf@fitzsim.org>
[not found] ` <E1jby42-0007jM-Ov@fencepost.gnu.org>
[not found] ` <m31rnamz1t.fsf@fitzsim.org>
[not found] ` <E1jySVw-0002Qc-Qv@fencepost.gnu.org>
[not found] ` <87v9ienz6c.fsf@gnus.org>
[not found] ` <E1jyoSh-0000o6-N0@fencepost.gnu.org>
[not found] ` <878sf9c69y.fsf@gnus.org>
[not found] ` <E1jzBBX-0007nJ-0s@fencepost.gnu.org>
[not found] ` <871rkw62t3.fsf@gnus.org>
2020-08-06 3:45 ` Making GNUS continue to work with Gmail Richard Stallman
2020-08-06 5:51 ` 황병희
2020-08-06 17:08 ` Cesar Crusius
2020-08-06 17:32 ` Robert Pluim
2020-08-06 18:09 ` Cesar Crusius
2020-08-11 13:43 ` Colin Baxter
2020-08-11 13:55 ` Colin Baxter
2020-08-11 15:19 ` Uwe Brauer
2020-08-11 15:22 ` Uwe Brauer
2020-08-11 16:02 ` Colin Baxter
2020-08-12 2:29 ` Richard Stallman
2020-08-12 5:29 ` Colin Baxter
2020-08-07 2:56 ` Richard Stallman
2020-08-07 17:02 ` Cesar Crusius
2020-08-07 18:37 ` Michael Anckaert
2020-08-08 0:01 ` Cesar Crusius [this message]
2020-08-08 0:53 ` T.V Raman
2020-08-08 3:53 ` Richard Stallman
2020-08-08 3:53 ` Richard Stallman
2020-08-08 3:54 ` Richard Stallman
2020-08-09 7:59 ` Uwe Brauer
2020-08-09 8:40 ` Lars Ingebrigtsen
2020-08-09 10:02 ` Uwe Brauer
2020-08-10 3:23 ` Richard Stallman
2020-08-10 6:43 ` Uwe Brauer
2020-08-10 9:03 ` Robert Pluim
2020-08-10 11:36 ` Uwe Brauer
2020-08-11 3:30 ` Richard Stallman
2020-08-09 10:06 ` Uwe Brauer
2020-08-09 10:36 ` Lars Ingebrigtsen
2020-08-09 10:57 ` Robert Pluim
2020-08-09 11:03 ` Robert Pluim
2020-08-09 13:06 ` 황병희
2020-08-09 16:04 ` Uwe Brauer
2020-08-09 13:01 ` 황병희
2020-08-09 16:06 ` Uwe Brauer
2020-08-10 1:03 ` 황병희
2020-08-10 15:54 ` T.V Raman
2020-08-11 2:40 ` 황병희
2020-08-11 9:59 ` Robert Pluim
2020-08-11 12:54 ` 황병희
2020-08-11 15:25 ` Uwe Brauer
2020-08-11 16:11 ` Robert Pluim
2020-08-11 18:05 ` João Távora
2020-08-11 18:17 ` Robert Pluim
2020-08-12 2:27 ` Richard Stallman
2020-08-12 4:27 ` 황병희
2020-08-12 3:41 ` arthur miller
2020-08-12 6:42 ` tomas
2020-08-12 12:11 ` Arthur Miller
2020-08-12 15:55 ` Stefan Monnier
2020-08-12 16:00 ` tomas
2020-08-12 6:54 ` Uwe Brauer
2020-08-12 7:53 ` tomas
2020-08-12 12:40 ` Uwe Brauer
2020-08-13 2:09 ` 황병희
2020-08-13 2:51 ` Stefan Monnier
2020-08-13 6:48 ` Uwe Brauer
2020-08-12 11:30 ` Eric S Fraga
2020-08-12 12:40 ` Arthur Miller
2020-08-12 13:02 ` Eric S Fraga
2020-08-12 17:13 ` Eric Abrahamsen
2020-08-13 15:39 ` David De La Harpe Golden
2020-08-13 17:40 ` David Engster
2020-08-13 17:53 ` Stefan Monnier
2020-08-14 10:06 ` Lars Ingebrigtsen
2020-08-15 4:35 ` Richard Stallman
2020-08-14 10:13 ` Lars Ingebrigtsen
2020-08-14 14:49 ` Uwe Brauer
2020-08-14 14:56 ` Lars Ingebrigtsen
2020-08-14 17:24 ` Uwe Brauer
2020-08-14 17:39 ` Cesar Crusius
2020-08-15 4:44 ` Richard Stallman
2020-08-15 9:45 ` Gregory Heytings via Emacs development discussions.
2020-08-17 6:00 ` 范凯
2020-08-17 8:23 ` tomas
2020-08-17 12:30 ` Gregory Heytings via Emacs development discussions.
2020-08-17 15:09 ` tomas
2020-08-17 13:03 ` David De La Harpe Golden
2020-08-15 11:09 ` Robert Pluim
2020-08-16 4:13 ` Richard Stallman
2020-08-16 8:17 ` Gregory Heytings via Emacs development discussions.
2020-08-17 3:23 ` Richard Stallman
2020-08-17 7:51 ` Gregory Heytings via Emacs development discussions.
2020-08-17 16:05 ` David De La Harpe Golden
2020-08-18 4:08 ` Richard Stallman
2020-08-18 9:15 ` Gregory Heytings via Emacs development discussions.
2020-08-21 3:38 ` Richard Stallman
2020-08-21 17:16 ` Gregory Heytings via Emacs development discussions.
2020-08-22 7:24 ` Arthur Miller
2020-08-22 9:44 ` Gregory Heytings via Emacs development discussions.
2020-08-23 4:46 ` Richard Stallman
2020-08-17 15:02 ` Uwe Brauer
2020-08-17 16:44 ` Gregory Heytings via Emacs development discussions.
2020-08-17 19:34 ` Uwe Brauer
2020-08-17 21:47 ` Gregory Heytings via Emacs development discussions.
2020-08-18 4:10 ` Richard Stallman
2020-08-18 4:11 ` Richard Stallman
2020-08-26 14:44 ` Eric S Fraga
2020-08-26 20:22 ` Pierre Téchoueyres
2020-08-27 11:25 ` Eric S Fraga
2020-08-27 2:50 ` Richard Stallman
2020-08-27 11:28 ` Eric S Fraga
2020-08-27 12:03 ` tomas
2020-08-27 12:26 ` Making GNUS continue to work with Gail Eric S Fraga
2020-08-27 12:30 ` Making GNUS continue to work with Gmail Andrew Cohen
2020-08-27 12:52 ` Eric S Fraga
2020-08-28 3:49 ` Richard Stallman
2020-08-28 5:35 ` Andrew Cohen
2020-08-29 4:10 ` Richard Stallman
2020-08-28 3:50 ` Richard Stallman
2020-09-01 16:23 ` Uwe Brauer
2020-09-02 9:57 ` Pankaj Jangid
2020-08-15 19:39 ` Cesar Crusius
2020-08-16 17:23 ` David De La Harpe Golden
2020-08-16 11:54 ` Uwe Brauer
2020-08-16 14:27 ` David De La Harpe Golden
2020-08-11 16:09 ` Mingde (Matthew) Zeng
2020-08-12 2:28 ` Richard Stallman
2020-08-12 6:47 ` tomas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pxwh5z9uatud.fsf@gmail.com \
--to=cesar.crusius@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=michael.anckaert@sinax.be \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).