-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dealing with forwarded data and workers that move home #51
Comments
I agree. Tiki will do the same - send to all registered club members and be able to receive from all of them provided they authenticate. |
where "provided they authenticate" is specific to which worker the data is about, right? If your server receives an API call from our server using the credentials you gave us, it would accept timesheet entries if they are about Ismoil and me, but not if they are about George and Angus, correct? |
No, that's not correct. It will accept entries according to permissions your user has and currently it can insert entries for any other user. I could change permissions to allow users to insert entries only for themselves but I deliberately wanted to give broader permissions for initial integration and we tighten them up if needed. |
I think this might be overlooking a couple of things - here's my reasoning:
We therefore need to distinguish between a worker's user identity for the federated system authoritative for their data, and the credentials used to forward those data to other club members. At issue is what level of access control each club member expects recipients of forwarded data to enforce over those data. The implicit assumption expressed earlier in the thread is that the receiving system won't necessarily be able to support the same access control, and thus the sending system needs to restrict what data it sends. The further implicit assumption is that the data sent should be restricted to those that the user identity initiating the transfer has access to. However, this also assumes that the sending system is only forwarding data on command, rather than automatically - which would require using system credentials for the receiving system, rather than user credentials. For example, when S1 forwards to S2, it might use credentials that S2 has provided specifically for the purposes of system-to-system data transfer. |
OK, very interesting discussion! Let's label a set of credentials as a "user". So this can either be a natural person, or a neighbouring node in the network. Let's label the natural persons whose hours we track as "workers". Let's label what I described and implemented in PreJournal / time-pondersource-com as "hard-wired call tree": each worker has a home node, and from there, the data about that worker always propagates along the same hard-wired tree. It enters the home node via the worker's own user. When it's forwarded from node X to node Y, node X has a user at node Y, and node Y is hardwired so that node X is the only user that can tell node Y about that specific worker. Let's label the relaxation that Victor implemented ("every user can always edit every worker's entries in any node") as "last-write-wins". One problem I see with this architecture is that if you edit the same entry in two places, you risk creating a storm of updates that chase each other. In practice this would be unlikely unless the network is recovering from a network split. If we go for this relaxed security model then we should add some sort of mechanism to avoid update storms, probably? - CC @gsvarovsky :) I understand what Angus wrote by itself, but I have a hard time linking a conclusion to it - @Angus-McAllister are you proposing the same "last-write-wins" architecture as Victor, or a subtle variation on it? |
OK, happy to clarify what I had in mind (and apologies that it's not sufficiently evident in my post above!) My post in the thread for PreJournal Issue 134 does elaborate on this, but to bring it out from that product-specific context, let me summarise the thinking here:
Hope that clears things up! |
I'd just comment that Tiki works mostly the way Angus describes with last-write wins logic in action. I don't mind we integrate the timestamp record checking but it might be a v2 upgrade maybe? Regarding credentials, note that Tiki associates a set of credentials to a particular user inside Tiki which means that incoming data via these credentials are all tied to the permissions this particular user has. In our case user equals the worker in terms of entity - we use the same system users for credentials and workers but currently we don't impose a restriction for one user to create an entry to another worker (user). If we agree that this is not undesired, I can limit the UI to disallow it but keep importing work like that, so club members can use one set of credentials and create entries for different workers. Also, currently, we don't do any mapping of worker identities - we should create each worker as a user in the Tiki instance but that is a soft requirement, i.e. data is imported even if user identity doesn't exist locally but if you want to give that user an account to review and edit their data in that instance, admin can create a user for them. |
I think we can conclude that PreJournal and Tiki work differently, and make that a part of our research report.
|
How about this setup:
That's what I'm implementing now in pondersource/prejournal#134 .
It means for instance that if the link from timeld.org to time.pondersource.com is down, updates will still reach time.pondersource.com via timesheet.dev3.evoludata.com, but these messages will be discarded unless the access control list is actively updated.
When a worker wants to start using a different time tracker app, it can be that their data will enter the federation at a different gateway than before. If that is before, then the user needs to be added to the access control list at the new gateway, and at the old gateway, the entry needs to be updated to indicate that data for this worker will from now on come via that neighbour system.
Example:
Initial situation:
Alice enters her hours in App1
S1 periodically polls the API of App1
S1 forwards this data to S2 and to S3
S1 accepts data about Alice from App1
S2 accepts data about Alice from S1
S3 accepts data about Alice from S1
Now Alice switches to using App2. Changes to be made:
The text was updated successfully, but these errors were encountered: