The CLI is dead. Long live the CLI.

Digital network of glowing interconnected blockchain data blocks with streams of code

(Or perhaps it just speaks API now.)

Classic migration project. ASA to Firepower.

The customer needed another hundred or so network objects and NAT statements adding.

As soon as I heard “about a hundred”, my first thought wasn’t “Right, let’s get clicking.”

It was “This is an automation problem.”

I’d solved something similar before using Postman, importing a CSV and letting the Collection Runner do the heavy lifting.

Except… the Collection Runner now sits behind a paid subscription.

Fair enough. Postman is a commercial product, and good software deserves paying for.

Unfortunately for them, As my children will tell you I’m spectacularly reluctant to spend money especially if I think I can build a workaround..

So necessity became the mother of invention.

A short Python script converted the CSV into the JSON structure the Firepower API expected. Paste the JSON into the request body, hit send…

“…is that working?”

It was.

Around a hundred objects and NAT statements created in less time than it took to ask the question.

The interesting part isn’t really the Python.

It’s how quickly our daily work is changing. Five years ago I’d have accepted repetitive configuration as part of the job.

Today, if I find myself doing the same task more than a handful of times, my first instinct is to ask whether the API can do it instead.

#Automation #Python #APIs #CyberSecurity #NetworkEngineering

Unknown's avatar

Author: Richard Petter

I am an information security consultant with over 25 years of experience helping organisations protect sensitive data and build secure networks. Over the years, I’ve worked with products and solutions from all major security vendors, giving me a broad understanding of how to defend against today’s evolving threats. My expertise covers securing data at rest and in transit, implementing advanced network security strategies, and advising on best practices for data protection. Right now, I’m particularly focused on how anomaly detection and threat monitoring can be integrated into security operations to provide earlier, smarter defences against attacks. Whether it’s strengthening resilience, improving compliance, or optimising security tools, I help businesses stay one step ahead in a constantly changing digital landscape

Leave a comment