What are the keys of the kingdom of heaven?
The preaching of the holy gospel and Christian discipline or excommunication out of the Christian church; by these two the kingdom of heaven is opened to believers and shut against unbelievers.
Scripture references
How is the kingdom of heaven opened and shut by the preaching of the holy gospel?
Thus: when according to the command of Christ it is declared and publicly testified to every believer that whenever they receive the promise of the gospel by a true faith all their sins are really forgiven them of God for the sake of Christ's merits, and on the contrary, when it is declared and testified to all unbelievers and those who do not sincerely repent that they stand exposed to the wrath of God and eternal condemnation as long as they are unconverted, according to which testimony of the gospel God will judge them both in this and in the life to come.
Scripture references
How is the kingdom of heaven shut and opened by Christian discipline?
According to Christ’s command, those who call themselves Christians but maintain teachings or practices inconsistent with that confession must first be repeatedly warned in a brotherly way. If they will not abandon their errors and wicked way of life, they are reported to the church or to those appointed by the church for this work.
If they reject that warning, they are excluded from the sacraments by those appointed, and so from the Christian church, and by God Himself from the kingdom of Christ. When they promise and show real amendment, they are received again as members of Christ and His church.