The third course between resignation and banana republic is (IMHO) the most appropriate: Refuse to follow orders they consider unlawful and force Trump to do something about it. He could order their resignation, but they could refuse. He could demand they be court-martialed, but that would require an investigation into whether or not the orders given were lawful. And ordering the SecDef to have them removed would just shine a huge fuckin’ spotlight on the whole matter.