5 ms·
"Interestingly, Canonical actually released an open-source prototype Snap store backend a few years ago, but there was very little interest from the community i
by gjsman-1000 6y ago
"Interestingly, Canonical actually released an open-source prototype Snap store backend a few years ago, but there was very little interest from the community in in actually maintaining and running a second Snap store, so the project bit-rotted and became incompatible with the current Snap protocol."
That open-source server was a single-python-file hacky prototype written in an employee's spare time. It's not surprising it got little interest.
Not only that, but this is the biggest omission of the truth: Making your own server is no longer possible because of assertions. All Snaps are now digitally signed by Canonical, so you actually need to have the end-user install a forked snap tool on their system to access the custom repository. You cannot disable this signing - your only way around it is to manually download the snap and install it with `--dangerous` through the CLI. And you won't get auto updates that way.
- simion314 6y ago> All Snaps are now digitally signed by Canonical, so you actually need to have the end-user install a forked snap tool Isn't the client side open source so you can put your own signature? Digital signing things seems a good idea for security.
- gjsman-1000 6y agoI wish, but the signature is actually compiled into the snapd (the software on your system)'s binary. Deliberately impossible to reconfigure. Like I said, you can change the signature... by distributing a forked binary to users that would be incompatible with the main store.
- lfmunoz4 6y agoYou can always modify the Linux Kernel system call "open" to detect when an attempt to open the certificate is being attempted and then read out your own certificate.
- simion314 6y agoIsn't this good? I mean if you are a distribution you compile the software yourself so you can add the distribution keys (there are some that don't compile stuff ). Probably you are thinking there should be atext file in your home where you could add new signature to be sued, but that could be a security issue so probably needs to be something more safe,did any serious patch was sent to improve this and was it rejected or why we expect Canonical to prioritize this over other issues?
- msla 6y ago> Probably you are thinking there should be atext file in your home where you could add new signature to be sued, but that could be a security issue so probably needs to be something more safe,did any serious patch was sent to improve this and was it rejected or why we expect Canonical to prioritize this over other issues? If someone can replace that text file, they can replace the binary the key is compiled into.
- gjsman-1000 6y agoYeah, but this isn't really any worse than APT or RPM at the moment. More like, if they can change the text file, you've got bigger problems.
- simion314 6y agoApt has utilities for managing keys, You could keep it simple with plain text file that anyone can read and write but some dude can paste the wrong thing and corrupt the file, or you need to update the format and old scripts would corrupt the file etc. It can be done but as a developer I put in my code constant numbers and paths because there is not enough of a reason to justify the effort to save this values somewhere else. From the article it seems that there is not enough interest from distributions to have their own app store so there is no justifications to prioritize this feature over other ones.
- Conan_Kudo 6y agoNo, this is incredibly bad. Think about the pain we're all going through to rotate UEFI certificates. There is almost no system where this is worth it.
- __s 6y agoIdeally you'd be able to add the alternative store's public key to the existing snap client. Like you can do with existing package managers to include alternative repos
- gjsman-1000 6y agoThey deliberately designed the software to not allow that without you forking. I mean, it is trivially easy for Canonical to just put the public key in a file and have Snap read from that key. Instead, they've hard-compiled it in. Three years ago, I actually had a discussion with them about External Repositories. It's called "External Repositories?" on the forum and has, like, over 200 messages on it. They didn't budge one bit despite our arguments on why this was a very bad idea on their part.
- simion314 6y agoWas there a competent patch submitted about keys and was this discussed in public? I imagine you can't just drop the keys in a random text file, it must be protected like the passwords file.
- renewiltord 6y agoThey're public keys so they can be in plaintext and protected by 0644. They don't really have to be different from apt keys.
- simion314 6y agoYou still need to protect from getting updated by errors or malicious code. For apt you have utilities to edit the keys you don't edit a test file by hand.
- renewiltord 6y agoSure. I only hope to answer "like the passwords file".
- grandinj 6y agoIt's a right PITA open-sourcing a server component that ties into various back-end business processes, and a completely thankless task. Not at all surprised they didn't bother. It's not like they're swimming in money anymore, they have to be more careful what they spend time and money on.
- galgalesh 6y ago> Not only that, but this is the biggest omission of the truth: Making your own server is no longer possible because of assertions. All Snaps are now digitally signed by Canonical, so you actually need to have the end-user install a forked snap tool on their system to access the custom repository. You cannot disable this signing - your only way around it is to manually download the snap and install it with `--dangerous` through the CLI. And you won't get auto updates that way. The blogpost is very clear that each _device_ is made to point to a single store. If you want to point it to a different store, you have to recompile snapd to include your own certificate. This is why I talk about, for example, Manjaro having their own store. Since they compile snapd, they get to choose what certificate is used and so what store is being used.