Under section 642(a) of the Illegal Immigration Reform and Immigrant Responsibility Act of 1996, a Federal, State, or local government entity or official may not prohibit, or in any way restrict, any government entity or official from sending to, or receiving from, the Immigration and Naturalization Service information regarding the citizenship or immigration status, lawful or unlawful, of any individual.
An then there's Section 287(g) of the Immigration and Nationality Act, which allows the U.S. attorney general to enter into written agreements with any state or political subdivision to permit the state or locality's officers to perform immigration functions.