After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793755 - Implement an Ubuntu Single Sign-on Provider
Implement an Ubuntu Single Sign-on Provider
Status: RESOLVED OBSOLETE
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-02-23 13:26 UTC by Andrea Azzarone
Modified: 2021-02-03 20:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backend: Add Ubuntu Single Sing-On provider (49.21 KB, patch)
2018-02-26 09:22 UTC, Andrea Azzarone
none Details | Review
backend: Add Ubuntu Single Sing-On provider (49.42 KB, patch)
2018-02-26 09:24 UTC, Andrea Azzarone
none Details | Review
Convert snapd error to string in order to facilitate translations. (50.00 KB, patch)
2018-02-27 17:27 UTC, Andrea Azzarone
none Details | Review
Update error strings. (50.00 KB, patch)
2018-02-27 17:52 UTC, Andrea Azzarone
none Details | Review
Properly clear GErrors. (49.99 KB, patch)
2018-02-27 21:00 UTC, Andrea Azzarone
none Details | Review
backend: Add Ubuntu Single Sing-On provider (49.97 KB, patch)
2018-02-27 22:46 UTC, Andrea Azzarone
none Details | Review
backend: Add Ubuntu Single Sing-On provider (49.97 KB, patch)
2018-02-28 00:07 UTC, Andrea Azzarone
none Details | Review
backend: Add Ubuntu Single Sing-On provider (50.58 KB, patch)
2018-02-28 17:41 UTC, Andrea Azzarone
none Details | Review
backend: Add Ubuntu Single Sing-On provider (50.64 KB, patch)
2018-03-01 02:19 UTC, Andrea Azzarone
none Details | Review
backend: Add Ubuntu Single Sing-On provider (50.81 KB, patch)
2018-04-24 11:25 UTC, Andrea Azzarone
none Details | Review

Description Andrea Azzarone 2018-02-23 13:26:51 UTC
Right now gnome-software implements a Ubuntu SSO UI in order to install snaps. In the near future we plan to use Ubuntu SSO in other applications. It would be nice to have a Ubuntu SSO g-o-a provider.
Comment 1 Andrea Azzarone 2018-02-26 09:22:58 UTC
Created attachment 368921 [details] [review]
backend: Add Ubuntu Single Sing-On provider

Implement an Ubuntu Single Sign-On provider. This talks with the on-system
snapd in order to authenticate the user. At the moment the credentials can
be used to install and remove snaps from gnome-software.
Comment 2 Andrea Azzarone 2018-02-26 09:24:55 UTC
Created attachment 368922 [details] [review]
backend: Add Ubuntu Single Sing-On provider

Implement an Ubuntu Single Sign-On provider. This talks with the on-system
snapd in order to authenticate the user. At the moment the credentials can
be used to install and remove snaps from gnome-software.
Comment 3 Andrea Azzarone 2018-02-27 17:27:30 UTC
Created attachment 369048 [details] [review]
Convert snapd error to string in order to facilitate translations.
Comment 4 Andrea Azzarone 2018-02-27 17:52:06 UTC
Created attachment 369054 [details] [review]
Update error strings.
Comment 5 Andrea Azzarone 2018-02-27 21:00:08 UTC
Created attachment 369062 [details] [review]
Properly clear GErrors.
Comment 6 Andrea Azzarone 2018-02-27 22:46:37 UTC
Created attachment 369070 [details] [review]
backend: Add Ubuntu Single Sing-On provider

Implement an Ubuntu Single Sign-On provider. This talks with the on-system
snapd in order to authenticate the user. At the moment the credentials can
be used to install and remove snaps from gnome-software.
Comment 7 Andrea Azzarone 2018-02-28 00:07:41 UTC
Created attachment 369073 [details] [review]
backend: Add Ubuntu Single Sing-On provider

Implement an Ubuntu Single Sign-On provider. This talks with the on-system
snapd in order to authenticate the user. At the moment the credentials can
be used to install and remove snaps from gnome-software.
Comment 8 Andrea Azzarone 2018-02-28 17:41:08 UTC
Created attachment 369109 [details] [review]
backend: Add Ubuntu Single Sing-On provider

Implement an Ubuntu Single Sign-On provider. This talks with the on-system
snapd in order to authenticate the user. At the moment the credentials can
be used to install and remove snaps from gnome-software.
Comment 9 Andrea Azzarone 2018-03-01 02:19:55 UTC
Created attachment 369128 [details] [review]
backend: Add Ubuntu Single Sing-On provider

Implement an Ubuntu Single Sign-On provider. This talks with the on-system
snapd in order to authenticate the user. At the moment the credentials can
be used to install and remove snaps from gnome-software.
Comment 10 Andrea Azzarone 2018-03-01 02:20:50 UTC
Sorry about all the clutter. I had to update the design several times.
Comment 11 Marco Trevisan (Treviño) 2018-03-01 15:37:45 UTC
Review of attachment 369128 [details] [review]:

From an u1 point of view, code looks good and works fine.
Comment 12 Marco Trevisan (Treviño) 2018-03-01 15:37:48 UTC
Review of attachment 369128 [details] [review]:

From an u1 point of view, code looks good and works fine.
Comment 13 Andrea Azzarone 2018-03-05 08:37:46 UTC
Any news on this? Thanks
Comment 14 Debarshi Ray 2018-03-05 18:52:47 UTC
Review of attachment 369128 [details] [review]:

Thanks for the patch, Andrea!

The code looks sane to me. A closer look might uncover a few nitpicky details, leaks and such, but nothing that would be insurmountable.

I haven't actually tried to run it though. I have installed the snapd libraries, so I am half-way there. I guess you don't need this provider in the GNOME 3.28 release, right? In that case, would it be fine if we merged right after 3.28.0 is out?

::: src/goabackend/goaubuntussoprovider.c
@@ +39,3 @@
+                         goa_provider_ensure_extension_points_registered ();
+                         g_io_extension_point_implement (GOA_PROVIDER_EXTENSION_POINT_NAME,
+                         g_define_type_id,

Nitpick: this, and the follow two lines, should be aligned with the GOA_PROVIDER_EXTENSION_POINT_NAME symbol.

@@ +852,3 @@
+on_handle_get_password (GoaPasswordBased      *interface,
+                        GDBusMethodInvocation *invocation,
+                        const gchar           *id,

Just so I understand it correctly, are applications expected to call goa_password_based_call_get_password with id="macaroon" and id="discharges"? Or is it supposed to just work as long as snapd has been setup properly and applications won't ever need to use the o.g.OnlineAccounts.PasswordBased interface? If it's the latter, then maybe there's no need to export the interface?
Comment 15 Andrea Azzarone 2018-03-06 07:48:41 UTC
(In reply to Debarshi Ray from comment #14)
> Review of attachment 369128 [details] [review] [review]:
> 
> Thanks for the patch, Andrea!
> 
> The code looks sane to me. A closer look might uncover a few nitpicky
> details, leaks and such, but nothing that would be insurmountable.
> 
> I haven't actually tried to run it though. I have installed the snapd
> libraries, so I am half-way there. I guess you don't need this provider in
> the GNOME 3.28 release, right? In that case, would it be fine if we merged
> right after 3.28.0 is out?

Yeah, that should be fine!

> 
> ::: src/goabackend/goaubuntussoprovider.c
> @@ +39,3 @@
> +                         goa_provider_ensure_extension_points_registered ();
> +                         g_io_extension_point_implement
> (GOA_PROVIDER_EXTENSION_POINT_NAME,
> +                         g_define_type_id,
> 
> Nitpick: this, and the follow two lines, should be aligned with the
> GOA_PROVIDER_EXTENSION_POINT_NAME symbol.
> 
> @@ +852,3 @@
> +on_handle_get_password (GoaPasswordBased      *interface,
> +                        GDBusMethodInvocation *invocation,
> +                        const gchar           *id,
> 
> Just so I understand it correctly, are applications expected to call
> goa_password_based_call_get_password with id="macaroon" and id="discharges"?

That's the idea.

> Or is it supposed to just work as long as snapd has been setup properly and
> applications won't ever need to use the o.g.OnlineAccounts.PasswordBased
> interface? If it's the latter, then maybe there's no need to export the
> interface?
Comment 16 Andrea Azzarone 2018-04-24 11:25:28 UTC
Created attachment 371319 [details] [review]
backend: Add Ubuntu Single Sing-On provider

Implement an Ubuntu Single Sign-On provider. This talks with the on-system
snapd in order to authenticate the user. At the moment the credentials can
be used to install and remove snaps from gnome-software.
Comment 17 Andrea Azzarone 2018-04-24 11:26:50 UTC
I updated the patch to better handle the case the user dismiss the polkit dialog.
Comment 18 Debarshi Ray 2018-04-26 13:02:27 UTC
I am currently away at the Libre Graphics Meeting. I plan to merge this once I am back next week.
Comment 19 André Klapper 2021-02-03 20:34:40 UTC
Also filed as https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/161
Comment 20 Debarshi Ray 2021-02-03 20:44:03 UTC
Thanks for triaging this, Andre!