An action may be brought by one person against another for the purpose of determining an adverse claim, which the latter makes against the former for money or property upon an alleged obligation; and also against two or more persons, for the purpose of compelling one to satisfy a debt due to the other, for which plaintiff is bound as a surety.
Ca. Civ. Proc. Code § 1050