Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

last_seen_ts in /client/r0/devices is out of date #16084

Open
weeman1337 opened this issue Aug 8, 2023 · 8 comments
Open

last_seen_ts in /client/r0/devices is out of date #16084

weeman1337 opened this issue Aug 8, 2023 · 8 comments
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@weeman1337
Copy link
Contributor

Description

When querying the devices list it seems like last_seen_ts is out of date.

Steps to reproduce

  • Have some devices
  • Query them via /_matrix/client/r0/devices

I know I have devices, that I recently used.
All returned last_seen_ts are out of date.

Homeserver

element.ems.host

Synapse Version

1.89.0

Installation Method

I don't know

Database

Workers

I don't know

Platform

Configuration

No response

Relevant log output

-

Anything else that would be useful to know?

No response

@erikjohnston
Copy link
Member

@sandhose do you think this is because we're running MAS on element.io?

@sandhose
Copy link
Member

@sandhose do you think this is because we're running MAS on element.io?

This is definitely the case, we're not recording device activity on Synapse with delegated auth. It's supposed to be a OIDC Provider feature (part of the OP UI to manage sessions), but it's not in MAS yet

@reivilibre
Copy link
Contributor

How often does this happen? Is it wrong every single time you query the device list or are you only noticing it occasionally?

@weeman1337
Copy link
Contributor Author

How often does this happen? Is it wrong every single time you query the device list or are you only noticing it occasionally?

Every time. The symptom is, that the last activity in the session list is out of date.

@clokep
Copy link
Contributor

clokep commented Aug 21, 2023

This is definitely the case, we're not recording device activity on Synapse with delegated auth. It's supposed to be a OIDC Provider feature (part of the OP UI to manage sessions), but it's not in MAS yet

@sandhose Does this mean it is working as expected and this is a MAS feature request, not a Synapse bug? (I.e. should we close this?)

@DMRobertson DMRobertson added A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Occasional Affects or can be seen by some users regularly or most users rarely labels Aug 29, 2023
@DMRobertson
Copy link
Contributor

I think #16672 means that this should work now. But it's not clear to me if Synapse should be reporting this data rather than MAS. Maybe for delegated auth Synapse should only be writing to monthly_active_users, and not user_ips? @sandhose WDYT?

@sandhose
Copy link
Member

I'm OK with restoring this for now, as before it would just result to confusing, incoherent report, as the interface would show times from before the migration.

Maybe it would be worth stripping those informations out from /devices if delegation is enabled?

@DMRobertson
Copy link
Contributor

Thanks Quentin.

Maybe it would be worth stripping those informations out from /devices if delegation is enabled?

Perhaps in the future. (More generally is there a plan to route this endpoint to the auth service?)

My vote would be to wait for #16672 to land (Synapse 1.98) and check this gives sensible last_seen_ts values, and leave everything else to future work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

6 participants