God only caused the first test onto Job (destroying his crops, killing his kids, etc. that he gets back in the end) in Job 1. As said in Job 2:4-7, Satan did the rest of the stuff to Job throughout the book.-Sun_Tzu-
But Satan only does what he does because God allows him to do it. It is God who says"Behold, he is in your power, only spare his life." (Job 2:11) and in Job 42:11, all the resonsibility is placed on God's shoulders, where it reads "...all the trouble the LORD had brought upon him..."
God's "rude boasting" from Job 38-41 was more of a response to Elihu's own angry boasting from Job 32-37 which is basically him saying "I'm all that and a bag of chips!" in response to Job's questioning from Job 29-31 and then God is all "Ah hellz na! He didn't just say that, did he!?" and gave a response which IMO is less boasting then the equivalent a parent telling their adolescent teen who thinks they know it all that they don't know ****.
I don't think God was resonding to Elihu. One reason for this is because Elihu is not rebuked in chapter 42 with Job's other friends. In fact, Elihu is not mentioned at all, before or after his speech, possibly hinting towards the idea Elihu's speech being added to the story after the rest of the story was written. Another reason why I don't think God is talking to Elihu is because Elihu pretty much tells Job the same thing that God says.I realize from looking at my previous post that I'm right now only able to post at a SW level as it's been a long day and I'm sleepy as hell right now. So I'll try and give you a better discussion tomorrow when my head stops spinning. Hell, I'll probably end up arguing with my current self more then you at first :P