mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-21 09:21:15 -05:00
[GH-ISSUE #787] 403 error on API key with full permissions #1632
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kmanwar89 on GitHub (May 26, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/787
I'm trying to use the API for some programmatic/bulk adding of resources that all share a similar ruleset, without having to duplicate 2/3 dozen times. While reading through the Swagger docs, I'm trying to just do the simplest possible test - a GET to /orgs to get the Org ID, but each time I do it (through the Web UI or
curlcommands) I'm greeted with a403: Key does not have root accesserror.I created the API key with 100% wide open permissions, and am confident it has permissions to GET the orgs. I tried a different key with all permissions selected under the org; same issue.
I assumed it was Crowdsec banning my WAN IP (it was, for some reason), so I tried it again after removing all Crowdsec references from my compose file and traefik configs - no dice.
Any ideas on this one? I searched for others with the same issue, but their symptoms and resolutions were quite different.
Screenshot of error in the Swagger UI:
And screenshot of API permissions:
@miloschwartz commented on GitHub (May 27, 2025):
We need to work on better public documentation for the API, but some permissions are only scoped to root api keys. Looks like from the screenshot this is an "org" API key not a root key. An org key is generated from the sidebar in an organization while the root key is generated from the server admin panel. Let me know if there are still issues and might be a bug.
@manelmolinaig commented on GitHub (May 27, 2025):
Related to API documentation... https://docs.fossorial.io/Pangolin/API/integration-api
Seems that is necessary to add routers to reach the API on api.domain.com, but my traefik config file (v4) already have API routers on domain.com/api Which is the right endpoint/subdomain?
Thanks!
@oschwartz10612 commented on GitHub (May 27, 2025):
The integration API is separate from the internal API (at /api/v1) used by the Pangolin web UI. This was to make it easier to keep stable and authenticate differently.
It is best to expose this with the example traefik config I think.
@kmanwar89 commented on GitHub (May 28, 2025):
Thank you! I totally glanced over that in the documentation and didn't realize the different scope was per-org (which is much more secure, and I'm glad to see that's already a feature!). I can confirm creating the API key via the Server Admin fixed my issue and I was able to list the orgs and can now begin developing my automated flows. Thank you again @miloschwartz
I'll let you decide if this should be closed or not, but its solved from my perspective
@oschwartz10612 commented on GitHub (May 29, 2025):
Happy it is working! I will close but feel free to reopen.