The pair also added that the "unwanted attention" would be "simply too much for him to bear".
However, Judge Kaplan has claimed CD must identify himself because interest in the case is "magnified because CD has made his allegations against a public figure".
The judge wrote in his ruling: "The evidence suggests that CD knowingly and repeatedly took the risk that any of these individuals at one point or another would reveal his true identity in a manner that would bring that identity to wide public attention, particularly given Spacey's celebrity. He seeks $40 million in damages. He makes serious charges and, as a result, has put his credibility in issue."
In the original lawsuit, CD accused Spacey of sexually assaulting him in the 1980s, when the accuser was 14.
Anthony Rapp first accused Spacey, 61, of sexual assault in October 2017, when he claimed the former House of Cards actor had "grabbed [his] buttocks" and lifted him onto a bed while at a party in Spacey's home in 1986, when Rapp was also just 14.
Spacey issued a statement at the time saying he didn't remember the alleged incident involving Rapp, and apologised "for what would have been deeply inappropriate drunk behaviour".