If ‘The LORD is my shepherd – I lack nothing’ was the principle of the discerning disciple in Daniel 1, then Psalm 23:4 is the principle of Daniel 3.
Three young men are faced with the opportunity to save their necks, to progress their careers, to move in the right social circles – they don’t have to deny God, but they do have to bend the knee to someone else.
And yet, these three men trust in God – he is their Shepherd, they lack nothing. Their faith works in obedience to the revelation of God, even if the will of God at that moment might be their death: they will give God, and God alone, what he deserves.
Jesus was exactly the same in the Garden of Gethsemane – kind of like the second act of the temptation of Jesus. And he obeyed God perfectly.