The 5th and 14th amendments provide that no person shall "be deprived of life, liberty, or property, without due process of law". He was convicted of a crime. The punishment can include random searches, drug tests, ankle monitors, etc., as long as it is provided for by law.