Several things; the Constitution guarantees that:
No person shall […] be deprived of life, liberty, or property, without due process of law(amd 5),
In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial, by an impartial jury of the State and district wherein the crime shall have been committed(amd 6), and
Excessive bail shall not be required, nor excessive fines imposed(amd 8)
Sheriffs derive their authority and power from their respective state constitution and/or state statute.
And federal agents from the Constitution for the United States.
Not all federal laws are legitimate; only those which qualify under This Constitution, and the Laws of the United States which shall be made in Pursuance thereof;
, the 9th and 10th amendments make it clear that most of the laws/agencies/rules/regulations are, in fact, illegitimate. (The War on Drugs is a stellar example: most of it is founded on re-imagining the commerce clause to mean that the federal government can dictate trade within a state and case law stemming from the repealed 18th amendment.)
In fact, sheriffs in one state might might have more authority and power than a sheriff would have in another state. Since the sheriff is technically not a federal empowered official, he or she has no lawful purview or authority over a federal agent carrying out federal duties. A federal agent does have lawful authority to arrest a sheriff in a hypothetical situation if a sheriff interferes or tries to impede a federal agent faithfully carrying out their duties.
Again: 5th, 6th, and 8th amendments.
By the way this POTUS is not doing anything to clean up a criminal IRS....I am sure Hillary would not do anything either to bring that organization to heel.