The preposition by is the head of a phrase in which is the fealty or pledge upon which the oath is based is stated. "on" and "to" are also commmonly used.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.