You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Send add client machine hostname or identifier on each request? #4606
Be able to identify which sync client performed a task. I suggest adding the sync client's hostname or other identifying information into the OS part of the string, such that it'd read something akin to Mozilla/5.0 (Windows; davidjerichos desktop) mirall/<version> or Mozilla/5.0 (Android; Davids Nexus 5) ownCloud-android/1.9.0
Actual behaviour
At present, I can only use IP for identifying a sync client, and all too often users are behind large proxies or NAT gateways, and I can't confirm beyond a doubt which of a user's many sync clients issued a change. Many users have a work desktop, work laptop, and a home desktop of some kind, and will often carry a laptop around.
Well, I don't think it is terribly difficult to do. The problem is do you gain more from this info. For example, how do I know which client I am using? Does the desktop client simply say "user1" in the agent string, and then with 3 syncing apps, we get 3 different "user1" logs, so the problem remains which one is the issue...I track on the host name, if it is easily available across OSes, but in fairness that too may not be helpful. I have a computer that is a Dell called "Dellila", another "Office", etc. Is there a better identified that the software could know?
Something is better than nothing. Many universities and such have a naming scheme identifying a staff allocated machine, and I suggest most personal users have a vague notion of what they named their device during initial setup. Even if they don't, we can find it.
I realise there may be collisions or common names, but of course that would only be an issue for a single user who had that.
I did contemplating suggesting MAC address or similar, but many users don't know how to find that information readily.
The reason I ask in part is we had a user blaming our service for deleting several gigabytes of their files. The reality is, they had a laptop that was doing it, but I found it hard to prove that until I pointed out to them that the client doing this was on their home network (and even then I couldn't tell them which of the two)
I remember the user agent is a tricky thing to change...
It's easy to append info.
@dragotin FYI we contemplated using a "client identifier" several times to get certain tricky sync scenarios right.. (I don't remember details) (not necessarily in user-agent)
As a further thought, what about doing something a little like docker does with unnamed containers? Combine an adjective and a noun, to produce a silly sounding but readily identifable name, done as part of the install process. This can then be displayed in the general section of the sync client, and could be recorded as part of the activity log. The name space only needs to be big enough to reasonably avoid collisions within a single user's sync client collection, as user identifiers are obviously sufficient to identify users.
This information would idealy be passed as part of an existing header that would allow an admin to also view it in their web server logs. Obviously webdav and web browser access don't have this, but it's certainly not a reason not to do it.
After discussing with @nickvergessen@danimo@rullzer we think that the "human readable" name should be sent as an extra HTTP header instead. This can also be added to a HTTP log with a custom log format.
I would also add that our authentication updates should help with assigning each individual client a token when authenticated. This token can then be used to uniquely identify each machine. This does not really solve the problem requested, but is adjacent.
The reason I ask in part is we had a user blaming our service for deleting several gigabytes of their files. The reality is, they had a laptop that was doing it, but I found it hard to prove that until I pointed out to them that the client doing this was on their home network (and even then I couldn't tell them which of the two)
changed the title [-]Request to add client machine hostname or identifier to user agent string[/-][+]Send add client machine hostname or identifier on each request?[/+]on Dec 6, 2018
Activity
dragotin commentedon Mar 24, 2016
@MTRichards @rperezb do you have opinions? I remember the user agent is a tricky thing to change...
MTRichards commentedon Mar 24, 2016
Well, I don't think it is terribly difficult to do. The problem is do you gain more from this info. For example, how do I know which client I am using? Does the desktop client simply say "user1" in the agent string, and then with 3 syncing apps, we get 3 different "user1" logs, so the problem remains which one is the issue...I track on the host name, if it is easily available across OSes, but in fairness that too may not be helpful. I have a computer that is a Dell called "Dellila", another "Office", etc. Is there a better identified that the software could know?
davidjericho commentedon Mar 24, 2016
Something is better than nothing. Many universities and such have a naming scheme identifying a staff allocated machine, and I suggest most personal users have a vague notion of what they named their device during initial setup. Even if they don't, we can find it.
I realise there may be collisions or common names, but of course that would only be an issue for a single user who had that.
I did contemplating suggesting MAC address or similar, but many users don't know how to find that information readily.
The reason I ask in part is we had a user blaming our service for deleting several gigabytes of their files. The reality is, they had a laptop that was doing it, but I found it hard to prove that until I pointed out to them that the client doing this was on their home network (and even then I couldn't tell them which of the two)
guruz commentedon Mar 24, 2016
It's easy to append info.
@dragotin FYI we contemplated using a "client identifier" several times to get certain tricky sync scenarios right.. (I don't remember details) (not necessarily in user-agent)
davidjericho commentedon Mar 24, 2016
As a further thought, what about doing something a little like docker does with unnamed containers? Combine an adjective and a noun, to produce a silly sounding but readily identifable name, done as part of the install process. This can then be displayed in the general section of the sync client, and could be recorded as part of the activity log. The name space only needs to be big enough to reasonably avoid collisions within a single user's sync client collection, as user identifiers are obviously sufficient to identify users.
This information would idealy be passed as part of an existing header that would allow an admin to also view it in their web server logs. Obviously webdav and web browser access don't have this, but it's certainly not a reason not to do it.
guruz commentedon Apr 1, 2016
Now I remember why we (also) wanted a unique client identifier: To show in the webinterface (when doing token based auth stuff?) the logged in and authenticated clients.. similar to https://support.google.com/mail/answer/45938?hl=en https://www.facebook.com/notes/facebook/staying-in-control-of-your-facebook-logins/389991097130/
CC @LukasReschke @danimo
guruz commentedon Apr 8, 2016
After discussing with @nickvergessen @danimo @rullzer we think that the "human readable" name should be sent as an extra HTTP header instead. This can also be added to a HTTP log with a custom log format.
MTRichards commentedon May 5, 2016
I would also add that our authentication updates should help with assigning each individual client a token when authenticated. This token can then be used to uniquely identify each machine. This does not really solve the problem requested, but is adjacent.
MTRichards commentedon May 5, 2016
@davidjericho
Good use case, thank you for explaining.
ogoffart commentedon Dec 4, 2018
Closing old issue.
There user agent is not meant to be an identifier of any sort.
[-]Request to add client machine hostname or identifier to user agent string[/-][+]Send add client machine hostname or identifier on each request?[/+]