- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-01-2022 08:15 AM - edited 09-01-2022 11:43 AM
Is it possible to request an API key via "/api/?type=keygen" without providing the account password in the URL? This seems like a notable security issue since the URL is not encrypted. These pages suggest it is possible: Authenticate Your API Requests, API Authentication and Security. However, my testing of the "Authentication: Bearer" header via "/api/?type=keygen" results in an error about a missing user parameter.
Edit: Typing from memory - bad. That header should be "Authorization: Basic ..."
09-01-2022 10:58 AM
Giving the authentication information via body in a POST is still supported in PAN-OS v10.2. Both the pan-os-python and pango libraries do it this way, and still supply the API key as part of the body in API requests.
09-01-2022 10:58 AM
Giving the authentication information via body in a POST is still supported in PAN-OS v10.2. Both the pan-os-python and pango libraries do it this way, and still supply the API key as part of the body in API requests.
09-01-2022 12:00 PM
@gfreeman Thanks for mentioning the POST/body option. I found the specifics in the third example here: Structure of a PAN-OS XML API Request
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!