Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - rheitman

#1
I just figured out, that the API responds with an 401 for the case the authentication is fine (regarding key/secret) but the API-Access hasn't been granted.

Easy to reproduce: just not allow the user/group access to
Type    Name
GUI    System: Firmware

https://docs.opnsense.org/development/how-tos/api.html

=> the API responds with an 401 ({"status":401,"message":"Authentication Failed"})

That's IMHO not the best solution possible according to https://www.rfc-editor.org/rfc/rfc7235.html:
A server that receives valid credentials that are not adequate to gain access ought to respond with the
403 (Forbidden) status code
.