PAN-OS 10.2 API key acquisition without password in URL?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PAN-OS 10.2 API key acquisition without password in URL?

L2 Linker

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 RequestsAPI 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 ..."

1 accepted solution

Accepted Solutions

L5 Sessionator

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.

View solution in original post

2 REPLIES 2

L5 Sessionator

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.

@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

  • 1 accepted solution
  • 1727 Views
  • 2 replies
  • 0 Likes
  • 71 Subscriptions
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!