Provide a fetch endpoint which accepts credentials
Hi,
It would be useful in the API to have an endpoint to trigger a fetch of some/all accounts. For instance /accounts/fetch
and /account/ID/fetch
(not sure if it fits with your API namespaces, just giving as examples).
One could then
POST /accounts/fetch
{
"credentials": {
"MyFirstAccount": {
"login": "MyAwesomeLogin",
"password": "MyInsanelySecurePassword"
}
}
}
to fetch all the accounts.
By enabling this, it means Kresus could work without any (sensitive) credentials stored in the database, provided that some external crontask is set to trigger this endpoint with the correct credentials.
It would be super easy to store credentials in something like Pass and write a small crontask to trigger the fetching using this API endpoint and the credentials from Pass. This way, the problem of storing sensitive credentials is deferred to a third-party app, and Kresus could be safer to use.
Thanks,
Related https://framagit.org/bnjbvr/kresus/issues/156, https://framagit.org/bnjbvr/kresus/merge_requests/416.