signal invalidAuthTokenError
when you leave bitmask syncing for some time (+1h of inactivity?), the token used in soledad expires, and one gets the following error on the sync attempts:
[2015-09-08 16:37:11] DEBUG - L#176 : leap.mail.incoming.service:fetch - fetching mail for: 4bca6c5c82998cc1a3424c6cac66b75c test_docker_002@cdev.bitmask.net [2015-09-08 16:37:11] INFO - L#109 : twisted.logger._stdlib:__call__ - FETCH: syncing soledad... [2015-09-08 16:37:12] ERROR - L#717 : leap.soledad.client.api:_sync_errback - Soledad exception when syncing! *--- Failure #5257 --- Failure: leap.soledad.common.errors.InvalidAuthTokenError: *--- End of Failure #5257 --- Unhandled Error Traceback (most recent call last): Failure: leap.soledad.common.errors.InvalidAuthTokenError: [2015-09-08 16:37:12] CRITICAL - L#109 : twisted.logger._stdlib:__call__ - Unhandled Error Traceback (most recent call last): Failure: leap.soledad.common.errors.InvalidAuthTokenError: [2015-09-08 16:38:11] DEBUG - L#176 : leap.mail.incoming.service:fetch - fetching mail for: 4bca6c5c82998cc1a3424c6cac66b75c test_docker_002@cdev.bitmask.net [2015-09-08 16:38:11] INFO - L#109 : twisted.logger._stdlib:__call__ - FETCH: syncing soledad... [2015-09-08 16:38:12] ERROR - L#717 : leap.soledad.client.api:_sync_errback - Soledad exception when syncing! *--- Failure #5263 --- Failure: leap.soledad.common.errors.InvalidAuthTokenError: *--- End of Failure #5263 --- Unhandled Error Traceback (most recent call last): Failure: leap.soledad.common.errors.InvalidAuthTokenError: [2015-09-08 16:38:12] CRITICAL - L#109 : twisted.logger._stdlib:__call__ - Unhandled Error Traceback (most recent call last): Failure: leap.soledad.common.errors.InvalidAuthTokenError:
In the future (probably soledad 0.8 release), we'd like to have some integration between soledad and bonafide so that the session object can get a new token and make it available to the soledad object in a simple way. This probably won't happen before the bitmask 0.10 release cycle, so I think we could make a way to support refreshing of tokens in the bitmask 0.9.x and soledad 0.7.x branches.
What we could do for this interim phase is this:
- signal invalidtokenauth
- get the client (ugh) capture this signal
- get a new token (probably by logging out and initiating a new srp-auth)
- pass the new token to the soledad proxy object.
if this strategy is acceptable, we should implement points 1 and 4 in soledad client.
(from redmine: created on 2015-09-08, closed on 2015-11-03)
- Relations:
- relates #6776 (closed)