Q: How specifically can a source on background be identified?

Fingers pointing at a child who is covering her face

A:

Specifically enough to show the source has credibility without being so specific that the source is inadvertently identified. The Associated Press offers guidance on this. According to the AP Stylebook: 

“Explain in the story why the source requested anonymity. And, when it’s relevant, describe the source’s motive for disclosing the information.”

The story also must provide attribution that establishes the source’s credibility; simply quoting a source is not allowed. Be as descriptive as possible about the source of information. The idea here is that details should be provided to show the source has some knowledge of the situation.

For example, “According to a government official who had seen the report…”  This description is typically worked out with the source before publication to give the source the opportunity to indicate if he or she is comfortable with the attribution. 

The issue came up recently when The New York Times identified the whistle-blower in the impeachment inquiry as “a C.I.A. officer who was previously detailed to work at the White House and had expertise on Ukraine.” Many readers felt this identified the whistle-blower too precisely, as only a handful of C.I.A. officers are assigned to White House details. The Times executive editor, Dean Baquet, issued a statement saying that the information was revealed to establish the whistle-blower’s credibility and that the paper believed the White House already knew this information about the whistle-blower.

The president and some of his supporters have attacked the credibility of the whistle-blower, who has presented information that has touched off a landmark impeachment proceeding. The president himself has called the whistle-blower’s account a “political hack job.” 
We decided to publish limited information about the whistle-blower — including the fact that he works for a nonpolitical agency and that his complaint is based on an intimate knowledge and understanding of the White House — because we wanted to provide information to readers that allows them to make their own judgments about whether or not he is credible.

Dean Baquet, Executive Editor, The New York Times

The statement did little to quiet critics, and #CancelNYT began trending on Twitter as thousands of readers expressed their disapproval.