Ravinou / borgwarehouse

A fast and modern WebUI for a BorgBackup's central repository server.
https://borgwarehouse.com
GNU Affero General Public License v3.0
362 stars 21 forks source link

Repo API with Token key #179

Closed rarrais closed 1 month ago

rarrais commented 6 months ago

The possibility to access the API for repository management with an API_KEY (similar to the existing CRONJOB_KEY) would open up automation possibilities for managing repositories (e.g., automatically adding new repositories; refreshing the SSH Public Key of an already configured repository).

In the proposed scenario, the existing credentials-based authentication would still be supported, but augmented with an alternative (token key-based) method.

The main reason for the request is that I would like to start working on an Ansible module similar to those found at this collection, and managing the CSRF-based authentication of Auth.js through Python was turning out to be an impossible task (at least for me).

rarrais commented 6 months ago

Ansible Collection making use of the changes proposed in #180:

deved99 commented 3 months ago

Hi!

I'm using BorgWarehouse and I'm liking it so far. I'd like to have some kind of daily report about the status of the Borg repositories.

I've seen that I can get the status of the repositories with the endpoint {borgwarehouse_url}/api/repo. I'm not sure how I can authenticate and I guess that this change would make it easier for me instead of authenticating via NextAuth.js. If this gets merged, I could just use the newly created API_KEY variable.

Also, I could read the repo.json file from the config directory, but I would prefer using the API.

Any suggestions?

Ravinou commented 2 months ago

It's coming soon :

image

Ravinou commented 1 month ago

Published in latest release.