Jarchi and others think this psalm was written by Moses , as was the preceding; but the Targum ascribes it to David; as do the Septuagint, Vulgate Latin, Syriac, Arabic, and Ethiopic versions; and very probably, as is generally thought, was penned by him on occasion of the pestilence which came upon the people, through his numbering of them, 2Sa 24:1.
The person all along spoken of, and to, according to the Targum, is Solomon his son; and, according to the title in the Syriac version, King Hezekiah, so Theodoret, who is called the son of David; neither of which are probable.
Some think the Messiah is meant; and that the psalm contains promises of protection and safety to him, as man, from diseases, beasts of prey, evil spirits, and wicked men, under the care of angels; and this not because that Satan has applied one of these promises to him, Mt 4:6, but because they seem better to agree with him than with any other: and one part of the title of the psalm, in the Syriac version, runs thus,"and spiritually it is called the victory of the Messiah, and of everyone that is perfected by him.'
'It seems best to understand it of every godly man, who is always safe under the divine protection. The Talmudisis call it Myegp ryv, "a song of the occursions", or "meetings with evil spirits."Ver. 1.
He that dwelleth in the secret place of the most High,.... Or the Supreme; a title of God, who is superior to all beings, the Creator and Preserver of them, God over all, higher than the highest of angels or men; see Ge 14:22, "his secret place" is his heart, his bosom, where his only begotten Son lies; and into which he takes his people, where they are set as a seal, and who enjoy intimate communion with him; which is no other than his gracious presence, called "the secret of his presence", Ps 31:20, which none but saints are admitted to, when his everlasting love, which was a secret in his heart, is made known unto them, and in which they also dwell, 1Jo 4:16, as they likewise do in the eternal decree of election; which perhaps is meant by "the clefts of the rock, and secret places of the stairs", where the church is said to dwell, So 2:14, unless rather Christ the Rock, and who may be signified by the cleft of that Moses was put into, when the goodness of the Lord passed before him, is intended; and who is the hiding place from the wind: mention is made of "the secret" of God's "tabernacle", Ps 27:5, in which he hides his people; alluding to the tabernacle, or temple, and the most holy place in it, called his secret place, Eze 7:22, and may refer to the ministry of the word and ordinances, where saints dwell, and enjoy much communion with God; and who are particularly under his special providence, protection, and power; which may here be designed:shall abide under the shadow of the Almighty: who is able to do all things for his people, and is "Shaddai", all sufficient, as this word is thought to signify; has a sufficiency of happiness in and for himself, and of provisions for all his creatures, and of power and grace for his own children: his "shadow" may be the same with his secret place, his power and protection, often in this book of Psalms called "the shadow of his wings", Ps 17:8, in allusion to birds that overshadow and protect their young with their wings; though perhaps the allusion here may be to the shadow of a tree, and design the word and ordinances of the Lord's house, which are a delightful, refreshing, reviving, and fruitful shadow, So 2:3, where gracious souls dwell, and abide with great delight and pleasure.
Christ, the Son of God, is sometimes compared to the shadow of a rock, or tree, which screens and shelters from heat; as he preserves his people from the heat of a fiery law, the flaming sword of justice, the wrath of God, the fiery darts of Satan, and the fury of persecutors: under this shadow do they abide or lodge all night, safe and secure, as the word signifies: the Targum calls this shadow the shadow of the clouds of glory; the Arabic version, "the shadow of the God of heaven."
So in Tikkune Zohar, correct. 20. fol. 50. 1. T. Hieros. Sabbat, fol. 8. 2.