pan.dev icon indicating copy to clipboard operation
pan.dev copied to clipboard

Issue with "Push the candidate configuration"

Open atav928 opened this issue 2 years ago • 0 comments

Documentation link

https://pan.dev/access/api/prisma-access-config/post-sse-config-v-1-config-versions-candidate-push/

Describe the problem

The 'description' provided in the request body seems to have restrictions, yet those restrictions are not provided. We follow some specific guidelines when pushing configurations. I've been able to work around it, but it would be helpful if we understood what the limitations are in the description as you only state it accepts a "string"

But I've noticed it doesn't not support \n or other formatting of text and does not like some special characters and I also do not know the character limit or if I'm reaching it as your errors are not helpful;

prismasase.exceptions.SASEBadRequest: {"_errors":[{"code":"API_I00013","message":"Your configuration is not valid. Please review the error message for more details.","details":{"errorType":"Invalid Command","message":[" push-config -> description 'Test Commit from SASE API; support case 02446728' is invalid>"," push-config -> description is invalid>"],"errors":[]}}],"_request_id":"22f00cd5-3a6f-4a96-9642-2894dbf9819a"}

I get multiple errors like that when I use other characters or if it's too long too many to list. Again I've worked around it through my automation, but It would be helpful to know the limitations or make it similar to the commit comments acceptable in Panorama.

I'm also looping through this and discussed how we are not provided enough details on how the push is occurring... Either a call that creates a job ID should be returned or similarly I use that process internally by sending a job backend based on a UUID created for the action and return the full commit response... See my commit code here: https://github.com/atav928/prisma-access-sase/tree/main

Suggested fix

Better documentation or build out better support for description when requesting a push

atav928 avatar Jan 30 '23 13:01 atav928