The obligation may be overridden by other considerations. Civil disobedience breaks this prima facie obligation. This is the reason why civil disobedience is always in need of a justification. The burden of the proof is always on the disobedients side. My point about justification is that civil disobedience is justified through a threefold process of public dialogue involving principles, means, and ends.
Principles explain why sometimes the law is civilly disobeyed.
Means explain how the law is civilly disobeyed. Ends explain what the law is civilly disobeyed for. Principles stem from our sociobiological nature and configure our world. The principles naturally bring about the means, and the means bring about the ends. The delicate intertwining of these three elements makes it unwise to evaluate one element independently of the others.