John of Salisbury outlines what he thinks the worldly and religious duties of a King ought be in his Policraticus Book IV. This book was dedicated by him to Becket whilst he was Henry II's Chancellor. John was in exile at the time when he wrote it, 1159.
John of Salisbury uses the terms "Prince" meaning "Head of the Secular State" (King/Emperor/Prince), and "Republic" meaning the State (or Kingdom) itself.
Johannes (Sarisberiensis); Carey J. Nederman Ed and Tr (26 October 1990). John of Salisbury: Policraticus. Book IV: Cambridge University Press. pp. 27–. ISBN 978-0-521-36701-1.
The Old Testament view of Kingship
The fourth book in Policraticus makes reference to the law of good kingship to be found in Deuteronomy.
14 When thou art come unto the land which the Lord thy God giveth thee, and shalt possess it, and shalt dwell therein, and shalt say, I will set a king over me, like as all the nations that are about me;
15 Thou shalt in any wise set him king over thee, whom the Lord thy God shall choose: one from among thy brethren shalt thou set king over thee: thou mayest not set a stranger over thee, which is not thy brother.
16 But he shall not multiply horses to himself, nor cause the people to return to Egypt, to the end that he should multiply horses: forasmuch as the Lord hath said unto you, Ye shall henceforth return no more that way.
17 Neither shall he multiply wives to himself, that his heart turn not away: neither shall he greatly multiply to himself silver and gold.
18 And it shall be, when he sitteth upon the throne of his kingdom, that he shall write him a copy of this law in a book out of that which is before the priests the Levites:
19 And it shall be with him, and he shall read therein all the days of his life: that he may learn to fear the Lord his God, to keep all the words of this law and these statutes, to do them:
20 That his heart be not lifted up above his brethren, and that he turn not aside from the commandment, to the right hand, or to the left: to the end that he may prolong his days in his kingdom, he, and his children, in the midst of Israel.
The Mediaeval conception of society is as ecclesia
It comes under two authorities, the spiritual and the secular, which have to work together in harmony.
The entirety of a king's authority is derived from God.
All law is a gift from God
The influential orator [Cicero], would seem to support this and to subject all men to its obedience because all law is a sort of discovery and gift from God, the teaching of the wise, the corrective to excesses of wilfulness, the harmony of the city, and the banishment of all crime.
Thus Chrysippus asserted that Law has power over all divine and human affairs, for which reason it presides over all good and all evil and is ruler and guide of things as well as of men.
The Prince is a minister [servant] of priests and their inferior.
That the Prince is a minister [adjudtor, advocatus or assistant] of priests, and is their inferior; and what it is for rulers to perform their ministry faithfully.
The Prince is therefore a sort of minister [servant] of the priests and one who exercises those features of the sacred duties that seem an indignity in the hands of priests. For all duties of sacred law are in fact the affairs of the religious and the pious, yet that duty is inferior which executes the punishment of crime and which seems to be represented by images of executioners.
That the authority of Divine Law consists in the Prince being subject to the Justice of Law.
The Prince is said to be an absolutely binding law unto himself, not because he is licensed to be iniquitous, but only because he should be someone who does not fear the penalties of law but someone who loves justice, cherishes equity, procures the utility of the republic, and in all matters prefers the advantage of others to his private will.
The prince is the public power and a certain image on Earth of the divine majesty. Beyond doubt the greatest part of the divine virtue is revealed to belong to the Prince,
Samuel deposed Saul by reason of disobedience, and substituted for him the humble son of Jesse atop the the kingdom.
Constantine [the Great] Emperor of the Romans ... when written accusations involving the crimes of priests ... to [him], he accepted them and placed them unopened in the fold of his toga. ... As he was a human subject to the verdict of priests, he himself then said it was not for him to examine divine cases which none except God could adjudicate. Those rolls which he had accepted he consigned to the flames uninspected.
1 Corinthians 2:15 King James Version (KJV)
The secular power is judged by the spiritual, the latter by no one
"But he that is spiritual judgeth all things, yet he himself is judged of no man."
Bernard of Clairvaux De Consideratione III, I, I https://goo.gl/eHymUc
John of Salisbury, ep. 44. Patr. Lat. 199, col. 274. 5 https://goo.gl/tbJBpF
Gosselin (M.) (1853). The power of the Pope during the Middle Ages, Volume II. J. Murphy. pp. 210–.
Medieval Sourcebook: John of Salisbury: Policraticus, Book Four (selections)