Re: IPP OAuth 2.0 question / potential gap: How should the Client manage multiple access tokens or realm identities?

Michael Sweet via ipp <[email protected]>
Newsgroups gmane.ietf.ipp
Message-ID <[email protected]>
Piotr,

> On Oct 17, 2022, at 5:49 PM, Piotr Pawliczek <[email protected]> wrote:
> 
> Hi Michael and Smith,
> 
> Regarding the implementation of the client, I would keep two caches:
> 1. access tokens for printers indexed by "printer-uri" (or for IPP Systems indexed by "server-uri")

I guess I figured we'd want to "pin" the OAuth server URI and scope with the printer/system ("resource") URI...

> 2. access tokens for Authorization Servers indexed by "oauth-authorization-server-uri" and "oauth-scope"
> 
> When the client communicates with a printer the cache 1 is used (when the printer requires OAuth). If the printer is missing there or the current access token is rejected the client queries  "oauth-authorization-server-uri" and "oauth-scope" from the printer and tries to match an entry in the cache 2. If the entry is found the client does TokenExchange (in the background) to get the new access token for the printer (and saves the new access token in the cache 1). If there is no matching entry in the cache 2, the client must go through the authorization procedure to get an access token for the authorization server and given scope ("oauth-authorization-server-uri" and "oauth-scope"). The authorization procedure here means standard Authorization Code flow with PKCE (opening the internet browser, letting the user to authenticate etc).
> Both these caches are kept in the context of the current OS user session (they are wiped out when the user closes the session).

I think we need to support persistence beyond the current session, at least for "system" accounts and other background processes that might need access even after the user has logged out (accounting, monitoring, general printing, etc.)  But for normal user sessions I agree the cached tokens can go away.

________________________
Michael Sweet

_______________________________________________
ipp mailing list
[email protected]
https://www.pwg.org/mailman/listinfo/ipp
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkIbDzcZsP1Y8+PQFvmfHXsgfMkQFAmNP+9UACgkQvmfHXsgf
MkQEWBAAqbYlsh94VGcLNyksRfuhPMms0IlTbQxxtdZU1yactc3GEhkG4mDeCYcn
1W3CJQzcUKJUQx9WjIhCy7GXNuMtJXWa+yAvjEFXnTEfRaChcQSZ3GzzZjVPYyKk
/mEjEjEBbZy+g8s6LnPo6UD7YWUojlXzBk+UhGWFd9QjFzTzjQFhFu+zlakyhdj/
6g0+S8YcVDj1NfWZ35DTvPKpbdla2VgivFkdHmg26bs6+VxM2dlR0lArQF1uOocW
R0xktNd31q/7KnWIUGCWSt10xFlidBIDY4l90By19MRWIQkTHW7c9hKNzl93jvHA
rMY9b9YloznKkN5orDnEmS4GWL8mc2BxYsSi2Q7GKwLreMK8buT4/kcXxOm7IgKC
/TzGIlHyE+rP/vY5NzLdO3IqsjCY0uWbsuOMi6s7zfHogkHV7ORSmXVR+oQQs6S8
rZeH/USXdlP7sZ3hy+vZTL6SInsnNhaXpHMG6NYpKv/0TECJaO3GmgE1f3hHj2O/
e0MUHdAC5k6D+o9uuq6ik82IcIbG+sJU7uz+9/wG/FEoM6GTyR5wyo7End1xjc43
15+ZTNfLTrbrUIJ04VMICSKd+PWPbeo3NJgforiXO8HpcDIZduW3So2nRKJyvB7m
DgIn4KlO47KGS/TkiMYKtuIjG7FxlA1MFn0IXgMaPMZ/YM58VeQ=
=LPpi
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.