Why does Ubuntu require us to register an account on Ubuntu website to be able to install a Snap package?

12,693

Solution 1

This behavior is consistent with Ubuntu Software Centre. Canonical works with third-party software providers to provide payment and hosting for commericial software in the partner repository. In Ubuntu 16.04 LTS, this is being replaced by the Ubuntu App Store which powers the snap repository's backend.

While the command line tools provide access to free-of-charge snaps without issue, the Ubuntu Software store uses Ubuntu One to handle payment processing and order history (so that previous purchases can be downloaded and installed on any number of systems that you own).

So this is an implementation detail that matches the behavior of the software being replaced by Ubuntu Software.

Solution 2

There is a technical reason and a design reason for the current behaviour.

Firstly, snapd requires some form of authentication since it is performing a system-level operation. On the command line you can use sudo, just like when you apt install, so no online account required. When using Software, the only form of authentication currently available is the Snap store. Alternatives are being discussed...

I did an attempt to resolve this by trying to get snapd to generate a Macaroon without store access. But as I understand it getting a Macaroon requires a round trip to the store.

So I think the solution to this is to either allow snapd to generate local Macaroons or use some other type of authentication token for local access. (comment 27)

Secondly, SSO authentication was the primary design pattern because Snappy's primary use-case is managing multiple IoT devices. The negative effect on desktop/laptop users was unplanned.

The net effect is much better security for these devices... look at modern wifi access points, for example. You get a single management account, usually in the cloud, and you manage all devices through that. (comment 25)

It looks like there is a plan to change the behaviour so that desktop/laptop users aren't required to use an online account to authenticate. You can subscribe to the bug to receive news as changes are made.

Handing out a token to root that provides an authorization to manipulate the system is analogous to allowing root itself to be doing removals without further store information, which we allow... The necessary infrastructure for that is pretty much in place since we already have to maintain the local and remote macaroons separately, and the situation where the remote macaroon is missing or incorrect is already handled. (comment 29)

Share:
12,693

Related videos on Youtube

salman
Author by

salman

Updated on September 18, 2022

Comments

  • salman
    salman over 1 year

    Today I wanted to install a Snap Package on Ubuntu Xenial, but it prompted me to register an account on Ubuntu Single Sign-On.

    Why does Ubuntu ask us for such a thing?

    Installing a Snap Package:

    image

    This is the reported bug on Launchpad, https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1581713

  • Ismael
    Ismael about 7 years
    But.. Why do I need an account to install Videolan? Isn't it fully open source? I understand if it was an application that I need to buy , but for an open source application? Prior versions never required an account to install open source software, why start now?
  • Nathan Haines
    Nathan Haines about 7 years
    Prior versions did not exist, because this requirement for snaps has existed since snaps were integrated with Ubuntu Software. You do not need to log in to install VLC. Either install it from the repositories or install the snap via the command line with 'sudo snap install vlc'.
  • tuxayo
    tuxayo over 6 years
    «snapd requires some form of authentication since it is performing a system-level operation. On the command line you can use sudo, just like when you apt install, so no online account required. When using Software, the only form of authentication currently available is the Snap store.» When using Software for a normal package, I'm prompted for my local password.
  • Ashe
    Ashe over 5 years
    It appears that snapd uses Polkit to authenticate system actions, but also requires you to log into an online account as well as having system authentication.
  • rich remer
    rich remer almost 5 years
    Aren't snaps supposed to be sandboxed? Why do they need system level access? So, what? Now the Snap store is acting as a sudoers authority? How is this not insane to anyone?