No surety shall be permitted to confess judgment, or allow judgment to go by default, if the principal will be made a defendant to the suit, and tender to the surety, for the principal's indemnity, sufficient collateral security, to be approved by the court before whom the suit is pending.