It’s an interesting question I also have happend to look into lately. Mind you I have been looking at the Catholic perspective, so I don’t know if you will agree or not.
Basically the Catholic Church teaches all power and authority come from God, so rebellion or sedition against the state is rebellion against God, regardless of how terrible a ruler or government may be. So in a sense we are barred from breaking the laws of legitimate state authority, however we are duty bound to disobey illegitimate laws.
However St Thomas Aquinas explores sedition in the summa theologica and other writings.
He thinks there can be justification for it under certain circumstances.
Namely that you appeal to a higher authority and seek permission to overthrow a tyrant, if there is a reasonable chance of success, and overthrowing a tyrant will not lead to more trouble and hardship than what was being endured under the tyrant.
Here is a snippet from the Summa:
“Obj. 3. Further, It is praiseworthy to deliver a multitude from a tyrannical rule. Yet this cannot easily be done without some dissension in the multitude, if one part of the multitude seeks to retain the tyrant, while the rest strive to dethrone him. Therefore there can be sedition without mortal sin.”
“Reply Obj. 3. A tyrannical government is not just, because it is directed, not to the common good, but to the private good of the ruler, as the Philosopher states (Polit. iii. Ethic. viii.). Consequently there is no sedition in disturbing a government of this kind, unless indeed the tyrant’s rule be disturbed so inordinately, that his subjects suffer greater harm from the consequent disturbance than from the tyrant’s government. Indeed it is the tyrant rather that is guilty of sedition, since he encourages discord and sedition among his subjects, that he may lord over them more securely; for this is tyranny, being conducive to the private good of the ruler, and to the injury of the multitude.”