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
When a password reset is initiated, a singleUse actor is created and assigned the pwreset role. A 24-hour session is created for the actor, and the session's token is sent over email as part of a password reset URL.
When a form is published, a singleUse actor is created and assigned the formview role in order to provide Enketo temporary access to the form. A 15-minute session is created for the actor.
Formerly, Google Drive backups created singleUse actors. Google Drive backups have been removed.
In some cases, singleUse actors are deleted:
If an actor with a pwreset assignment is used to change a password, the actor is then "consumed" (Actors.consume()).
All singleUse actors created for Google Drive backups should be deleted now that that functionality has been removed.
However, I think that in other cases, singleUse actors are not deleted:
24 hours elapse before a password reset token is used. In that case, a new password reset must be requested. Yet the old singleUse actor is never deleted.
Actors with a formview assignment are never deleted.
Looking at the QA server, I see:
A smaller number of non-deleted actors with a pwreset assignment
A much larger number of non-deleted actors with a formview assignment. A larger number makes sense given that every form will be associated with at least one formview actor. (It could be more than one if a request to Enketo fails.)
I see a number of singleUse actors that are not deleted, yet do not have an assignment. In all cases, their displayName contains "Enketo sync token". I assume these correspond to deleted forms.
Some deleted singleUse actors correspond to Google Drive backups. That's expected.
Given that these singleUse actors are tightly coupled with a single session, I think we should consider deleting them when we reap sessions (lib/task/reap-sessions.js). Specifically, if a session is expired, and the session was for a singleUse actor, then delete both the session and the actor.
We could also consider writing a migration to delete existing singleUse actors that are unneeded. To me, that seems lower-priority but still worthwhile.
The text was updated successfully, but these errors were encountered:
singleUse
actors are for internal use:singleUse
actor is created and assigned thepwreset
role. A 24-hour session is created for the actor, and the session's token is sent over email as part of a password reset URL.singleUse
actor is created and assigned theformview
role in order to provide Enketo temporary access to the form. A 15-minute session is created for the actor.singleUse
actors. Google Drive backups have been removed.In some cases,
singleUse
actors are deleted:pwreset
assignment is used to change a password, the actor is then "consumed" (Actors.consume()
).singleUse
actors created for Google Drive backups should be deleted now that that functionality has been removed.However, I think that in other cases,
singleUse
actors are not deleted:singleUse
actor is never deleted.formview
assignment are never deleted.Looking at the QA server, I see:
pwreset
assignmentformview
assignment. A larger number makes sense given that every form will be associated with at least oneformview
actor. (It could be more than one if a request to Enketo fails.)singleUse
actors that are not deleted, yet do not have an assignment. In all cases, theirdisplayName
contains "Enketo sync token". I assume these correspond to deleted forms.singleUse
actors correspond to Google Drive backups. That's expected.Given that these
singleUse
actors are tightly coupled with a single session, I think we should consider deleting them when we reap sessions (lib/task/reap-sessions.js). Specifically, if a session is expired, and the session was for asingleUse
actor, then delete both the session and the actor.We could also consider writing a migration to delete existing
singleUse
actors that are unneeded. To me, that seems lower-priority but still worthwhile.The text was updated successfully, but these errors were encountered: