Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Palo Alto Networks

You're reading from   Mastering Palo Alto Networks Deploy and manage industry-leading PAN-OS 10.x solutions to secure your users and infrastructure

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781789956375
Length 514 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Tom Piens Aka 'Reaper' Tom Piens Aka 'Reaper'
Author Profile Icon Tom Piens Aka 'Reaper'
Tom Piens Aka 'Reaper'
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: First Steps and Basic Configuration
2. Chapter 1: Understanding the Core Technologies FREE CHAPTER 3. Chapter 2: Setting Up a New Device 4. Section 2: Advanced Configuration and Putting the Features to Work
5. Chapter 3: Building Strong Policies 6. Chapter 4: Taking Control of Sessions 7. Chapter 5: Services and Operational Modes 8. Chapter 6: Identifying Users and Controlling Access 9. Chapter 7: Managing Firewalls through Panorama 10. Section 3: Maintenance and Troubleshooting
11. Chapter 8: Upgrading Firewalls and Panorama 12. Chapter 9: Logging and Reporting 13. Chapter 10: VPN and Advanced Protection 14. Chapter 11: Troubleshooting Common Session Issues 15. Chapter 12: A Deep Dive into Troubleshooting 16. Chapter 13: Supporting Tools 17. Other Books You May Enjoy

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>
&lt...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime