Not sure how it's changed. It was okay for Federal officers to carry on or off duty. Check in at counter. This usually involved whatever airport police checking your ID. Check in with TSA and flight crew. US Marshall never a part of it.Law enforcement traveling on official business only, escorting prisoners, etc. Must be coordinated with TSA, US Marshalls, etc.
After 9/11 we had to complete an online training module.
Armed FDOs had to attend a 40 hr (?) training program.
State or local officers needed to have a specific reason to be armed.