The text of 1 Peter 1:5 (BLB) is:
who are being guarded by the power of God through faith, for the
salvation ready to be revealed in the last time,
Paul expresses this another way, as the "shield of faith" = the divine protection against the attacks of the world which is grasped by faith. Eph 6:16 which is an allusion to Ps 115:9, 10 and also possibly, 2 Sam 22:3, Prov 30:5, Ps 28:7, etc.
In commenting upon 1 Peter 1:5, MacLaren correctly observes:
There is no keeping by God without faith.
Peter was an expert in such matters, for he had had a bitter
experience to teach him how soon and surely self-confidence became
self-despair. ‘Though all should forsake Thee, yet will not I,’ was
said but a few hours before he denied Jesus. His faith failed, and
then the divine guard that was keeping his soul passed thence, and,
left alone, he fell.
That divine Power is exerted for our keeping on condition of our
trusting ourselves to Him and trusting Him for ourselves. And that
condition is no arbitrary one, but is prescribed by the very nature of
divine help and of human faith.
Benson also says:
1 Peter 1:5. Who are kept — Who, though now surrounded with many
apparent dangers, are not left defenceless, but are guarded, kept as
in a garrison, as the word φρουρουμενους signifies; by the power of
God — Which worketh all in all; or secured from all real harm, under
the observation of his all-seeing eye, and the protection of his
almighty hand; through faith — Through the continued exercise of that
faith, by which alone salvation is both received and retained. The
clause is very emphatical: “It represents,” says Macknight, “believers
as attacked by evil spirits and wicked men, their enemies, but
defended against those attacks by the power of God, through the
influence of their faith, (1 John 5:4,) just as those who remain in an
impregnable fortress are secured from the attacks of their enemies by
its ramparts and walls.”
Who are kept by the power of God - That is, "kept" or preserved in the
faith and hope of the gospel; who are preserved from apostacy, or so
kept that you will finally obtain salvation. The word which is used
here, and rendered "kept," (φρουρέω phroureō,) is rendered in 2
Corinthians 11:32, kept with a garrison; in Galatians 3:23, and here,
kept; in Philippians 4:7, shall keep. It does not elsewhere occur in
the New Testament. It means to keep, as in a garrison or fortress; or
as with a military watch. The idea is, that there was a faithful
guardianship exercised over them to save them from danger, as a castle
or garrison is watched to guard it against the approach of an enemy.
Through faith - That is, he does not keep us by the mere exertion of
power, but he excites faith in our hearts, and makes that the means of
keeping us. As long as we have faith in God, and in his promises, we
are safe. When that fails, we are weak; and if it should fail
altogether, we could not be saved.