Former CIA Director John Brennan’s temper tantrum over the revocation of his security clearance has inadvertently pointed a spotlight at one of the Swamp’s favorite get-rich-quick tricks: the national intelligence contractor hustle.

On Aug. 20, President Trump escalated his attack on Brennan. “Everybody wants to keep their Security Clearance, it’s worth great prestige and big dollars, even board seats, and that is why certain people are coming forward to protect Brennan,” Trump said.

The president’s point is valid: Maintaining access to top-secret or classified information is how former intelligence officials like Brennan, James Clapper, James Comey and others command millions of dollars from the private sector. A security clearance reportedly yields a salary of up to 15 percent higher compared to the salaries of individuals without clearances for the same position.

For the more than 4 million private-sector individuals holding clearances, the secretive private intelligence industry is a massive ecosystem, ripe for concealed cronyism.

Unlike other Office of Governmental Ethics restrictions, security clearances themselves are not subject to a “cooling-off period” after someone leaves government service. This period refers to the time that a government employee must wait before lobbying or even meeting with the agency or officials they once worked for, among other prohibited activities.

Some believe this type of delay should also apply not just to lobbying activities, but also to those who go to work for media organizations, providing them with “expert analysis” based on knowledge gleaned from having an active security clearance.

Like Brennan at MSNBC, Clapper cashed in on his security clearance and now provides insights as a high-paid analyst for another major media outlet. Clapper had previously raked in over $200,000 in just six months advising defense contractors such as Booz Allen Hamilton. Clapper, the former director of national intelligence, was accused of lying to Congress and the American people multiple times — even while under oath.

Clapper may have also lied to Congress about his contacts with CNN’s Jake Tapper regarding the infamous Steele dossier in early 2017. Clapper initially denied discussing the dossier with Tapper, but later admitted it.

The same network, CNN, hired Clapper in August 2017 as an intelligence analyst, making him “part of the [CNN] family.”

In Comey’s case, shortly after he was “given access” to the Bush-era NSA surveillance program as deputy attorney general, he notoriously pushed for changes — essentially tweaking the program’s “legal rationale.” These changes gave rise to the FISA rubber stamp while Comey went on to take a lucrative job with the largest spy contractor in history: Lockheed Martin.

We know Comey’s net worth in 2003 was $206,000, which skyrocketed when he raked in well over $10 million in the private sector before he returned to lead the FBI in 2013. Comey bagged $6.1 million in a single year at Lockheed Martin.

Why would Lockheed Martin pay Comey so much money? Well, his access to top-secret program intel is one possibility. Another is what that security clearance provided access to — top-secret contracts from his old buddy, Robert Mueller.

In 2008, the FBI under Mueller awarded Lockheed Martin a contract worth $1 billion. This massive project, called Next Generation Identification, was to build a biometric surveillance program that would essentially turn everyone’s face into a fingerprint using facial recognition technology. NGI has since been called a massive and invasive “boondoggle.”

Examples like this go right to the heart of the issue of maintaining security clearances for ex-top officials. In theory, former officials retain their security clearances to, if called upon, provide some advice, context or background to their successors. Too often, officials go to work for large contractors like Lockheed Martin and Booz Allen Hamilton, where their still-active security clearances will be mutually profitable.

Interestingly, one of Obama’s last official acts as president sought to “modernize” the processes relating to security clearances.

Three days before he left office, Obama issued an Executive Order that consolidated investigative functions in the security-clearance review process. That same day, the Defense Department updated its guidelines for renewals of security clearances, increasing the expiration date for certain clearance holders from five to 10 years, supposedly to address a “backlog” of background investigations.

That last-minute move by the Obama administration quite possibly doubled the amount of time that men like Brennan, Clapper and Comey can cash in on their clearances.

One thing is certain: Clear rules are needed. Cooling-off periods must cover the entire intelligence community and the process and rules must be transparent. Without these changes, top officials will continue to rake in millions through the revolving door while their private-sector paymasters continue to reap billions in taxpayer-funded sweetheart deals.

Seamus Bruner is the associate director of research at the Government Accountability Institute and author of “Compromised: How Money and Politics Drive FBI Corruption.” Peter Schweizer is president of the Government Accountability Institute.