Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CWPP] Mark /current/role endpoint as supported #557

Open
kalidor opened this issue Dec 7, 2023 · 0 comments
Open

[CWPP] Mark /current/role endpoint as supported #557

kalidor opened this issue Dec 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@kalidor
Copy link

kalidor commented Dec 7, 2023

Is your feature request related to a problem?

Looking the documentation on pan.dev, I notice there is no endpoint to get precises permissions of the current user (using the API).
However the openapi file available in the web interface contains a lot of endpoint.
But as described in pan.dev cwpp documentation about endpoints: « In the OpenAPI spec, supported endpoints are tagged as supported ».
I notice /current/role is not tag as it, but only with :

tags:
   - Current

Describe the solution you'd like

I like to be sure this endpoint is marked as supported, since the functionality is really useful and pretty straight forward.

Describe alternatives you've considered

Currently I'm requesting directly endpoints (/hosts, /images, whatever), and handle HTTP error and/or JSON error message.

Additional context

Using the API, i'm trying to check if the current permissions are enough to perform future operations. Currently i'm trying to access directory the required endpoint, if the current profile doesn't have the right to do so, i handle using the HTTP error and/or json error message.

However using the alternative, to generate a nice message with explains what specific permission is missing is like playing try & error. We need to try all endpoints in order to check actual permissions...

However using one request (targeting /current/role), we can check the required permissions and avoid useless requests. Moreover we can nicely return what permissions is missing..

@kalidor kalidor added the enhancement New feature or request label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant