He then asked if we knew the rules and regs (I actually have them printed out but buried under all the gear) and gave us a copy...
Nothing wrong with that. Definitely within the bounds of his authority.
...while inquiring about the 4 steps of gun safety...
Whoops! He stepped outside the bounds of his authority on that one. Don't get me wrong -- I agree with the Jeff Coopers four rules. However, since when were they incorporated into Park rules, regs, or procedures? Since when is a Park Ranger EVER had the authority to give someone a knowledge test in order to exercise their Second Amendment rights?
What if he'd asked you how you safe your weapon and you replied, "Drop mag, rack slide" instead what he was looking for, which may have been, "thumb safety?" What if your "safety" is only a decocking lever? What if you safety only works when a round is in the chamber and the hammer is cocked?
...which I recited flawlessly...
Glad to hear it, but you shouldn't have had to. Legally, you should be able to ignore any such unlawful requests and be on your merry way without interference.
I'm not one to get prickly with law enforcement either, but I probably would have responded with a chuckle and something like, "Whose four steps? Mine or Jeff Coopers?" It would have let him know I knew what he was talking about without cooperating with his intrusive questions.
If he'd responded with something like, "Ok, let's hear your four rules," I'd have given him the following:
Rule 1: In order to protect the sanctity of law, we must first protect the integrity of the supreme law of the land, that is, our Constitution.
Rule 2: In their great wisdom, our Founding Fathers incorporated the oath of office into the Constitution itself. Today, adherence to that oath is required by all officers, whether civil, military, or law enforcement.
Rule 3: Supporting and defending the Constitution requires all officers to....
At this point he'd probably waive his hand and wish us a good day. If not, I'd feign wide eyes and mutter "golly gees!" as he stumbled over Cooper's four rules of gun safety. While noting his name tag and badge number for a letter up his chain of command. Let them deal with his foolishness. Someone along the chain is bound to have enough brain cells to send a "knock it off" memo back down.