OPNsense Forum

English Forums => General Discussion => Topic started by: xvjyhgade on June 01, 2023, 07:37:45 am

Title: os-api-backup Authentication Issues
Post by: xvjyhgade on June 01, 2023, 07:37:45 am
I am trying to setup the api backup plugin. I created a user for the backups gave the group the user belongs to access to the backup api, but continually get a 401. But if I change my URL and add the access for the example on the api pages where it checks if you need an update there is no issue with the api key working. Is there something known or extra I am missing for the api backup plugin setup? Thank you

edit:
System versions:
OPNsense 23.1.9-amd64
FreeBSD 13.1-RELEASE-p7
OpenSSL 1.1.1t 7 Feb 2023
os-api-backup (installed)   1.1

Assigned Privs:
GUI    Backup API

I also just tried giving the user permissions with /* for all pages and still get the auth error on backups download. But if I go directly to the /api/backups/backups/download url in a browser with the same user it starts the download, not sure if that is a valid test.
Title: Re: os-api-backup Authentication Issues
Post by: xvjyhgade on June 02, 2023, 06:06:35 am
it was of course my fault. In the actual code I was writing I was using an auth parameter in the requests.get method. When I should have used an 'Authorization' header directly. Thanks for everyone time