Pass through snapd client User-Agent to store requests snapd

Bug #1768419 reported by Robert Ancell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Unassigned

Bug Description

Currently snapd proxies requests from it’s clients (snap command-line, GNOME Software, KDE Discover etc) to store requests. The store requests don’t send any information about the client, which makes it harder to get statistics on the store about the source of requests. It also makes it harder to identify rogue clients when the store is getting unexpected traffic.

Since snapd-glib 1.16 we send up a User-Agent header that can be overridden by the library user. I propose we combine this User-Agent header with the snapd User-Agent so the store can process it.

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This looks like a valid thing to do. Marking as triaged.

Changed in snapd:
status: New → Triaged
Revision history for this message
John Lenton (chipaca) wrote :

Since this was written we've been aware of the desire and we've tried to push towards having context in more places to enable this in the future. It'd still be a lot of work though.

Once we have context everywhere (including in state), adding it to the user agent wold be straightforward. It would look something like

snapd/2.37pre+drop-privs3 (series 16; classic; testing) gnome-software/1234 ubuntu/16.04 (amd64) linux/4.4.0-141-generic

of course, some requests come directly from snapd itself, so those would not have a "client".

Revision history for this message
Michael Vogt (mvo) wrote :

We don't have "context" everywhere yet so doing this "fully" is probably a bit of work still. However I chatted (on irc) with Evan and it seems if we can get the user-agent string to "info", "search", "install" (in that order of priority) that would help already. So it seems worthwhile to explore if we can do that and if its easier/quicker that way (and eventually we will have the full solution).

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Changed in snapd:
status: Triaged → Fix Committed
Michael Vogt (mvo)
Changed in snapd:
importance: Undecided → High
Changed in snapd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.