(CNN) There are plenty of people arguing that President Donald Trump is breaking the law by encouraging news organizations to out the whistleblower whose complaint about Trump's pressure on Ukraine triggered the impeachment investigation.

Here's the problem with that view: The President is the law when it comes to protecting national security whistleblowers. And now it's the President who is leading the attack.

"There have been stories written about a certain individual, a male, and they say he's the whistle-blower," Trump said this week, referring to reports in conservative media outlets purporting to identify the author. "If he's the whistleblower, he has no credibility. Because he's a Brennan guy, he's a Susan Rice guy, he's an Obama guy. And he hates Trump."

He's been joined by Kentucky Republican Sen. Rand Paul , who repeated his argument to CNN on Tuesday that Trump should have "the right to confront your accuser."

But the whole idea behind whistleblower laws is that whistleblowers should enjoy anonymity and protections from reprisal

When that intelligence whistleblower law was written, it put the burden on the President to enforce it, said Kohn. "This is unique," Kohn said. "The reason they put the burden on the President was to protect critical national security secrets."

Kohn added: "If I'm fired for blowing the whistle on securities fraud, I can go before a judge and jury. I don't go before the President. For national security, my judge and jury is ultimately the President of the United States of America."

And Trump has made clear where he stands.

He wants the whistleblower named, although he hasn't gone so far as to do it himself. Would that be illegal?

"It's a gray area," said Michael Zeldin, a CNN analyst and former DOJ official. He added it's the "same gray area about whether many of our laws controlling executive branch employees apply to any President."

But certainly, according to Zeldin, the whistleblower's attorneys would immediately argue that Trump naming their client would constitute an unlawful reprisal "that would trigger further protections for the whistleblower -- at least on paper."

The whistleblower information page housed at the Director of National Intelligence website makes clear that a whistleblower can report harassment in his or her career up through his or her chain of command. There is the possibility for an independent review process, but it ultimately ends with the President.

Harassment for a whistleblower can be many different things, according to Tom Devine, who is legal director at the Government Accountability Project.

"The forms of harassment on the job are limited only by the imagination," he said.

Devine pointed to the case of Thomas Drake, a senior executive at the National Security Agency, who blew the whistle on a wasteful and invasive intelligence gathering program. The NSA disagreed and the government attempted to prosecute him as a leaker, which unlike Edward Snowden, he was not.

He ultimately pleaded guilty to one misdemeanor count. The program he tried to stop was a complete failure and cost the US more than $1 billion.

But that wasn't the end of the story for Drake, who went from his top post at the NSA to working at an Apple store in suburban DC. "The government spent many years trying to break me, and the more I resisted, the nastier they got," he told the Guardian in 2016

And then, after Snowden, the law was updated -- with bipartisan support. "The law protects the whistleblower," Iowa Sen. Chuck Grassley, a Republican and a defender of whistleblowers, said on Monday afternoon. "I'm an advocate for whistleblowing and passed all these whistleblower protection laws, so I can only say we have to go by what the law says."

But no one foresaw the President as the direct subject of a whistleblower investigation those few short years ago.

CNN legal analyst Jeffrey Toobin says Trump has already broken the law.

"If this were a private company, the board would fire the CEO for behaving this way towards a whistleblower," Toobin said on CNN Monday. "The whole whistleblower idea is they should have protections, anonymity, much less be attacked by the President of the United States."

Toobin called Trump's actions against the whistleblower "pure harassment" and a "sideshow" since much of what the whistleblower alleged in the original complaint has been corroborated by witnesses called by Congress in the past few weeks.

"This is one of the tests of our democracy under Donald Trump," said Toobin. "That, you know, he has violated so many norms. He has violated so many laws like this one, that, you know, we -- you know, we have to decide what our priorities are."

But that won't help the whistleblower, who the law says should have his or her anonymity protected.

Ultimately, Trump would rather focus on the whistleblower because he can attack the whistleblower. It's much more difficult to attack the growing number of witnesses who have corroborated the complaint.