I write this not to put forward an opinion, but to ask for background information that I hope will remain a theoretical concern with no practical application.
How does the United States military define an illegal order?
What is the proper and accepted procedure for an officer who is given an order that he has good cause to consider illegal?
What is said about this subject in officer training? What materials are used? What examples, hypothetical and historical, are put forward? How much time is spent discussing this topic?
--------------------------------
There are some interesting discussions of the problem of illegal orders in my own old field, the intellectual history of ancient China. Obedience to parents, for instance, was supposed to be absolute but it was not unconditional. The condition was that the parent live up to the moral demands of their designation, and if they failed in this, disobedience was not only allowed but was demanded. The most common test case was a dying father who commands that his son kill his concubine to follow him in death. But few things were more immoral to an ancient Chinese scholar than human sacrifice, and so it was held that a “father” who made such a demand was no longer a father at all and so there was no duty to obey him. The same was held true of an evil ruler. “King” was another term with an inescapable moral loading, so when one of the literati was asked about the assassination of a legendary bad king, his reply was that he had heard that a bandit had been put to death, but not that a king had been killed.