all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Tomas Hlavaty <tom@logand.com>
Cc: rms@gnu.org, fitzsim@fitzsim.org, jostein@kjonigsen.net,
	emacs-devel@gnu.org
Subject: Re: gmail+imap+smtp (oauth2)
Date: Tue, 10 May 2022 22:39:16 +1000	[thread overview]
Message-ID: <87tu9xcya8.fsf@gmail.com> (raw)
In-Reply-To: <87k0atmx1w.fsf@logand.com>


Tomas Hlavaty <tom@logand.com> writes:

> On Tue 10 May 2022 at 17:51, Tim Cross <theophilusx@gmail.com> wrote:
>> Tomas Hlavaty <tom@logand.com> writes:
>>> When a school/university demands gmail account
>>> and google locks me out of my gmail account,
>>> what happens?
>>
>> When a school/university makes a decision to use Google as their email
>> provider, it isn't 'normal' google - it is your school/university's
>> email, essentially hosted by google. As such, your institution controls
>> access, not google. Google just provides the service to your
>> school/university. Often, the setup involves integration with your
>> school/university IAM system i.e. your 'identity' (your username) is
>> managed by the school/university. This integration makes it easier for
>> existing school/university workflows to continue i.e. onboarding of new
>> students/staff, removal of accounts when students/staff leave etc. It
>> also makes integration with other services, such as on-line LMS (Moodle,
>> Blackboard etc) easier as there is just one 'meta directory' of all
>> accounts. This is where oauth2 shows its strengths. Your institituion
>> essentially becomes a identity provider which Google trusts. When you
>> request authorisation credentials, they are provided by your
>> institutions IAM system. Your client then submits those authorisation
>> credentials to get an access token from Google which you then submit to
>> the Google service you want to access (i.e. email).
>
> thank you for the explanation
>
> who is in charge of giving out oauth2 client_id?
> does it mean that the university gives out client_id?
>
> is it still google who gives out application id
> (the google specific and required additional parameter for the oauth2 client?)
>

It really depends on exactly how the integration has been configured.
However, the typical model is that your institution would provide the
client authorisation credentials i.e. your institution will say if you
are or are not a valid user and what resources your permitted to access.
This will typically happen with Google acting as a sort of proxy. The
process will go something like 

1. You connect to a login service. This could be a service provided by
Google or one provided by your institution. If it is one provided by
Google, you will login with something like
username@your.institution.edu. Google will then pass the information you
provide in the login (minimum of username and password, but possibly
(likely) a 2FA token as well) to your institutions IAM system. Your
institution will verify the user, password and any additional
information and if all passes, returns an authorisation token to google,
who in turn return it to you. Your client then presents the autorisation
token to Google who then gives you an access token (possibly including a
refresh token). Your client then presents the access token to get access
to whatever service you wanted (i.e. email) and your client does what it
needs to do. In a sense, this is very similar to those web sites which
say "Login wiht Facebook. Github, Google, whatever. The site your trying
to access really just proxies the initial verification process, passing
the details you enter on to the respective ID provider who does the
actual validation. 

So, your institutions IAM system is responsible for the initial
assessment to determine if the client request is permitted. Your
institution could require any number of IDs, really up to them. In this
scenario, it is unlikely they will do application vetting and provide
application IDs, so they would not be required. They could however,
require a different ID - for example, student number. This is the key
point about oauth2 - it isn't prescriptive about exactly what is
involved in the client approval cycle. The oauth2 specification just
mapps out the authorisation workflow, not the speicifics of what
information is passed in the requests/responses - for oaht2, these are
just payloads. 

In the case of Google, they want to be able to control 'classes' of
applications. For them, they want protection against a vulnerable
application being used to compromise large numbers of thier users. For
example, a new email client in the play store which has been approved
and given an application ID. Later, a major security hole is found in
that applicaiton. If it is severe enough, google might suspend the
application ID associated with that application to prevent further
exploits until the application is patched. 

Note that what I've outlined is at a very high level. It is based on a
number of projects I have worked on integrating systems with various
services and identity management systems. As usual, the devil is in the
details. Where oauth2 helps is that it standardises the workflow and
communication processes. It avoids going into details about the lower
level specifics (crypto algorithms, credential attributes, etc). It
focuses on defining the parties involved and the way data flows between
those parties and to some extent, the http headers and/or web form
encoding. All the non-free javascript involved with Google has nothing
to do with oauth2 - that is all just UI stuff google uses on it web
login page i.e. is just the Google specific web page interface. I
suspect (but have not verified) that Google probably provides an API
interface where the data could be sent directly, bypassing the Google UI
page, simply by generating the correctly formatted form data and posting
it to the correct URL (which would require an applicaiton ID). My guess
is this is how other applications (like thunderbird) work. I have heard
of a number of people who have registered themselves as developers with
Google so that they can get a developer ID, which you can use as an
application ID, in order to craft their own process. Only problem with
this is that it requires registering with Google and requires greater
technical understanding than most average users have/want. 



  reply	other threads:[~2022-05-10 12:39 UTC|newest]

Thread overview: 150+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  5:59 gmail+imap+smtp (oauth2) Uwe Brauer
2022-05-03  6:27 ` Jostein Kjønigsen
2022-05-03 20:44   ` Uwe Brauer
2022-05-04  7:22     ` Robert Pluim
2022-05-04  8:43     ` Tim Cross
2022-05-05 12:57       ` Uwe Brauer
2022-05-05 13:48         ` Robert Pluim
2022-05-08 14:36           ` Uwe Brauer
2022-05-08 16:00             ` Robert Pluim
2022-05-08 16:40               ` Uwe Brauer
2022-05-09  8:38                 ` Robert Pluim
2022-05-10  6:29                   ` Uwe Brauer
2022-05-10  8:13                     ` Robert Pluim
2022-06-02 15:15                       ` [app password does not work (at the moment)] (was: gmail+imap+smtp (oauth2)) Uwe Brauer
2022-06-02 15:37                         ` [SOLVED (magic?)] (was: [app password does not work (at the moment)]) Uwe Brauer
2022-06-03 14:04                           ` [SOLVED (magic?)] Robert Pluim
2022-06-06  6:49                             ` Uwe Brauer
2022-06-06  7:47                               ` Robert Pluim
2022-06-06 18:55                           ` [SOLVED (magic?)] (was: [app password does not work (at the moment)]) Tomas Hlavaty
2022-06-06 19:07                             ` tomas
2022-06-06 19:37                               ` Tomas Hlavaty
2022-06-07  4:35                                 ` tomas
2022-06-07  5:52                                   ` Tomas Hlavaty
2022-06-07  7:09                                     ` [Clarification] (was: [SOLVED (magic?)]) Uwe Brauer
2022-06-07 10:02                                       ` Yuri Khan
2022-06-07 16:24                                         ` [Clarification] Uwe Brauer
2022-06-07  7:15                                     ` [SOLVED (magic?)] (was: [app password does not work (at the moment)]) tomas
2022-06-09 22:30                                   ` Richard Stallman
2022-06-07  5:44                               ` [SOLVED (magic?)] Byung-Hee HWANG
2022-06-07  6:04                                 ` Tomas Hlavaty
2022-06-07  7:14                                   ` tomas
2022-06-09 22:29                                     ` Richard Stallman
2022-06-10  7:43                                       ` Eli Zaretskii
2022-06-12  0:44                                         ` Richard Stallman
2022-06-12  5:02                                           ` tomas
2022-06-15 10:05                                             ` Richard Stallman
2022-06-09 22:30                                 ` Richard Stallman
2022-06-07 23:18                               ` [SOLVED (magic?)] (was: [app password does not work (at the moment)]) Richard Stallman
2022-05-05 13:56         ` gmail+imap+smtp (oauth2) Tim Cross
2022-05-05 13:58         ` Filipp Gunbin
2022-05-05 20:13           ` Jorge A. Alfaro-Murillo
2022-05-05 21:44             ` Thomas Fitzsimmons
2022-05-06  0:43             ` Tim Cross
2022-05-06  8:01               ` Tomas Hlavaty
2022-05-06  9:04                 ` Tim Cross
2022-05-06 11:38                   ` Stefan Monnier
2022-05-06 12:02                     ` tomas
2022-05-06 12:06                       ` Lars Ingebrigtsen
2022-05-06 12:46                       ` Stefan Monnier
2022-05-06 13:05                         ` Tim Cross
2022-05-11  9:01                         ` Richard Stallman
2022-05-11  9:01                         ` gmail+imap+smtp (davmail) Richard Stallman
2022-05-11  9:43                           ` Eric S Fraga
2022-05-13 15:08                             ` Richard Stallman
2022-05-06 12:49                       ` gmail+imap+smtp (oauth2) Tim Cross
2022-05-06 13:23                         ` Eric S Fraga
2022-05-06 13:40                         ` tomas
2022-05-06 12:34                     ` Tim Cross
2022-05-06 16:49                       ` Tomas Hlavaty
2022-05-06 12:34                     ` Tim Cross
2022-05-06 16:41                     ` Tomas Hlavaty
2022-05-06 16:38                   ` Tomas Hlavaty
2022-05-06 18:55                     ` Tim Cross
2022-05-06 19:57                       ` Stefan Monnier
2022-05-08 23:36                       ` Richard Stallman
2022-05-09  0:26                         ` Tim Cross
2022-05-10  6:53                         ` Tomas Hlavaty
2022-05-11  9:04                           ` Richard Stallman
2022-05-11 23:38                             ` Tomas Hlavaty
2022-05-12  9:16                               ` Tomas Hlavaty
2022-05-12 16:51                               ` Thomas Fitzsimmons
2022-05-15 23:37                                 ` Richard Stallman
2022-05-12  7:10                       ` Tomas Hlavaty
2022-05-12  9:03                         ` Tomas Hlavaty
2022-05-06 23:18               ` Richard Stallman
2022-05-06 10:30             ` Eric S Fraga
2022-05-08 23:37               ` Richard Stallman
2022-05-09  5:13                 ` tomas
2022-05-09 12:25                 ` Eric S Fraga
2022-05-09 23:20                   ` Richard Stallman
2022-05-11  9:47                     ` Eric S Fraga
2022-05-13 15:08                       ` Richard Stallman
2022-05-12 10:36                   ` Richard Stallman
2022-05-13  6:58                     ` Eric S Fraga
2022-05-16 23:25                       ` Richard Stallman
2022-05-12 14:12               ` Jorge A. Alfaro-Murillo
2022-05-13  8:57                 ` Eric S Fraga
2022-05-13 18:49                   ` Roland Winkler
2022-05-14  9:57                     ` Eric S Fraga
2022-05-05 18:37       ` Richard Stallman
2022-05-05 19:13         ` Stefan Monnier
2022-05-05 19:52           ` Stefan Monnier
2022-05-05 20:10             ` Uwe Brauer
2022-05-06  0:32               ` Tim Cross
2022-05-06 23:18           ` Richard Stallman
2022-05-06 23:42             ` Brian Cully via Emacs development discussions.
2022-05-06  1:46         ` Ihor Radchenko
2022-05-06 23:18           ` Richard Stallman
2022-05-03 23:40   ` Richard Stallman
2022-05-04  2:05     ` Tim Cross
2022-05-04  5:13       ` tomas
2022-05-04 13:34       ` Thomas Fitzsimmons
2022-05-04 14:38         ` Stefan Monnier
2022-05-04 14:58           ` Robert Pluim
2022-05-04 14:48         ` Tim Cross
2022-05-04 15:41           ` Thomas Fitzsimmons
2022-05-05 18:37             ` Richard Stallman
2022-05-06  8:34             ` Tomas Hlavaty
2022-05-06 23:18               ` Richard Stallman
2022-05-07  3:22                 ` Tim Cross
2022-05-08 23:35                   ` Richard Stallman
2022-05-09  0:01                     ` Tim Cross
2022-05-10  7:11                       ` Tomas Hlavaty
2022-05-10  7:51                         ` Tim Cross
2022-05-10 11:44                           ` Tomas Hlavaty
2022-05-10 12:39                             ` Tim Cross [this message]
2022-05-11  9:52                           ` Eric S Fraga
2022-05-11  9:01                       ` Richard Stallman
2022-05-11  9:01                       ` Richard Stallman
2022-05-11 12:03                         ` Tim Cross
2022-05-13 15:10                           ` Richard Stallman
2022-05-11  9:01                       ` Richard Stallman
2022-05-11 12:33                         ` Tim Cross
2022-05-11 14:08                           ` Tim Cross
2022-05-14 14:12                             ` Richard Stallman
2022-05-13 15:10                           ` Richard Stallman
2022-05-14 10:02                             ` Eric S Fraga
2022-05-16 23:25                               ` Richard Stallman
2022-05-14 21:43                   ` chad
2022-05-15  5:04                     ` tomas
2022-05-05 18:36         ` Richard Stallman
2022-05-06  0:37           ` Tim Cross
2022-05-04 15:35       ` Óscar Fuentes
2022-05-04 15:48         ` Robert Pluim
2022-05-04 16:01           ` Óscar Fuentes
2022-05-04 16:48             ` Tim Cross
2022-05-05 18:36             ` Richard Stallman
2022-05-05 21:34               ` Brian Cully via Emacs development discussions.
2022-05-05 22:13                 ` Stefan Monnier
2022-05-06 23:18                   ` Richard Stallman
2022-05-06  0:54                 ` Tim Cross
2022-05-06  2:21                   ` Brian Cully via Emacs development discussions.
2022-05-06 23:18                   ` Richard Stallman
2022-05-06 23:19                 ` Richard Stallman
2022-05-06 23:47                   ` Brian Cully via Emacs development discussions.
2022-05-04 16:45           ` Tim Cross
2022-05-04 16:33         ` Tim Cross
2022-05-06 23:17           ` Richard Stallman
2022-05-04 17:01 ` Cesar Crusius
2022-05-05  1:57   ` Tim Cross

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=87tu9xcya8.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=fitzsim@fitzsim.org \
    --cc=jostein@kjonigsen.net \
    --cc=rms@gnu.org \
    --cc=tom@logand.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.