Book Image

Mastering Palo Alto Networks - Second Edition

By : Tom Piens aka Piens aka 'reaper'
Book Image

Mastering Palo Alto Networks - Second Edition

By: Tom Piens aka Piens aka 'reaper'

Overview of this book

Palo Alto Networks’ integrated platform makes it easy to manage network and cloud security along with endpoint protection and a wide range of security services. This book is an end-to-end guide to configure firewalls and deploy them in your network infrastructure. You will see how to quickly set up, configure and understand the technology, and troubleshoot any issues that may occur. This book will serve as your go-to reference for everything from setting up to troubleshooting complex issues. You will learn your way around the web interface and command-line structure, understand how the technology works so you can confidently predict the expected behavior, and successfully troubleshoot any anomalies you may encounter. Finally, you will see how to deploy firewalls in a cloud environment, and special or unique considerations when setting them to protect resources. By the end of this book, for your configuration setup you will instinctively know how to approach challenges, find the resources you need, and solve most issues efficiently.
Table of Contents (18 chapters)
16
Other Books You May Enjoy
17
Index

Using an API for User-ID

We saw earlier that you can forward syslogs to the User-ID agent to extract user information, but for those cases where you can’t get the desired information from syslogs, you can also use an API to automate user-to-IP mapping, or manually add and delete user mappings.

You will first need to get an authentication key. Make sure the administrator account you are going to use for these operations has API access.

To get a key, you can use this URL in a browser:

https://<YourFirewall>/api/?type=keygen&user=<Username>&password=<Password>

Alternatively, you can use cURL at the command line:

curl -k -X GET 'https://<YourFirewall>/api/?type=keygen&user=<username>&password=<password>

That would give you the following output:

<response status="success">
<result>
<key>
LUFRPT1TWFhUNWUk5N1Fjd3ZnMzh3MXlTOVJyb0kxSG5IWk5QTkdPNw==
</key>
</result...