The passage does have to do with "who has the authority," or "what's the foundation," but that authority and foundation isn't placed upon any person -- Peter or Jesus. Rather, it's placed upon the faith that reveals Jesus as the Christ.
the main thrust of Matthew's gospel is to establish his displaced Judaic-Christian community as the "true Israel." IOW, the "lineage" of God's people wasn't passed through bloodlines, but through who kept the Covenant. Matthew's thesis is that the Judaic Establishment has not faithfully kept that Covenant, and so God has turned it over to those of whom Jesus spoke in the sermon on the mount: the poor, the hungry, the persecuted, the peacemakers. IOW, the community of Anointed-believers.
When Matthew writes this exchange, it begins with Jesus asking, "Who do people say I am?" The disciples posit that the people think Jesus is either Moses, or Elijah, or one of the prophets. (These figures were all seen as the authoritative torch-bearers for Israel). Then Jesus asks, "But who do you say I am?" (the disciples, according to Matthew, are the first forebears of the True Israel). Peter (the leader) speaks up and makes the "Great Confession." And it is that Great Confession of Jesus as the Anointed One that is the Rock upon which Jesus forms his community of the True Israel. True Israel recognizes -- not the prophets of the Old Covenant, but Jesus, who establishes a New Covenant between God and God's people.