You are not being honest. John the apostle is clearly quoting from the old testament...
The old testament says the man with the key of David is the prime minister to the Davidic king:
"And I will lay the key of the house of David upon his shoulder: and he shall open, and none shall shut: and he shall shut, and none shall open" (Is 22:22).
John the apostle quotes this very verse, so clearly he is talking about the prime minister of the Davidic king:
"And to the angel of the church of Philadelphia, write: These things saith the Holy One and the true one, he that hath the key of David; he that openeth, and no man shutteth; shutteth, and no man openeth" (Rev 3:7).
Jesus is the Davidic king and He gives this very same authority symbolised as keys to Peter:
"And I will give to thee the keys of the kingdom of heaven. And whatsoever thou shalt bind upon earth, it shall be bound also in heaven: and whatsoever thou shalt loose upon earth, it shall be loosed also in heaven" (Mat 16:19).
It is not rocket science.