UN General Assembly Resolution 70/175 (2015) - United Nations Standard Minimum Rules for the Treatment of Prisoners (the Nelson Mandela Rules)
Basic principles
Rule 1
All prisoners shall be treated with the respect due to their inherent dignity and value as human beings. No prisoner shall be subjected to, and all prisoners shall be protected from, torture and other cruel, inhuman or degrading treatment or punishment, for which no circumstances whatsoever may be invoked as a justification. The safety and security of prisoners, staff, service providers and visitors shall be ensured at all times.
...
Rule 5
1. The prison regime should seek to minimize any differences between prison life and life at liberty that tend to lessen the responsibility of the prisoners or the respect due to their dignity as human beings. ...
...
Rule 50
The laws and regulations governing searches of prisoners and cells shall be in accordance with obligations under international law and shall take into account international standards and norms, keeping in mind the need to ensure security in the prison. Searches shall be conducted in a manner that is respectful of the inherent human dignity and privacy of the individual being searched, as well as the principles of proportionality, legality and necessity.
..
Rule 58
... 2. Where conjugal visits are allowed, this right shall be applied without discrimination, and women prisoners shall be able to exercise this right on an equal basis with men. Procedures shall be in place and premises shall be made available to ensure fair and equal access with due regard to safety and dignity.
...
Rule 72
The prison administration shall treat the body of a deceased prisoner with respect and dignity. The body of a deceased prisoner should be returned to his or her next of kin as soon as reasonably possible, at the latest upon completion of the investigation. The prison administration shall facilitate a culturally appropriate funeral if there is no other responsible party willing or able to do so and shall keep a full record of the matter.
...