The Hadith says...
Further instructions of Imams-asws for a believer’s conduct in the instance of an attack by an enemy are to follow.
Someone who is attached to a ruling authority usually cites the example of Ali bin Yaqteen, a companion of 7th Imam-asws who was a Minister of Haroon Al-Rashid, and was directly receiving instructions from Imam Musa Al-Kazim-asws and Imam-asws asked him not to leave his post as a minister and keep on safeguarding the interests of Shias who were unfairly treated by the Abbasid government.
Ali bin Yaqeen has narrated many Ahadith from the 7th and 8th Imams-asws and had not only a good understanding of the religion but was in direct contact with the Imams-asws. Therefore, anyone with a similar status to Ali bin Yaqteen may be able to justify his role in an unjust governing body. See Appendix I for Ahadith on Ali bin Yaqteen.
As for the support for the unjust establishment, this is sufficient to call those who oppose the injustices of the state as the anti-state or rebellious (Baghee) – Yazeed-la’s governors managed to assemble a large army against Imam Hussain-asws, upon obtaining/fabricating a fatwa from Qadi Al-Shurayh, who declared anyone standing against the state is a Baghee and must be captured or killed.