The Zohar speaks of Joseph as the progenitor of our people in that his children became our tribes and it says in the Zohar that this was through the combination of the powers of the sun and moon joining together to pass through him (in Kabbalah cosmology these are the Sephirot Keter and the Nukva, the feminine aspect of Hashem). As to this image, Potiphar’s wife represents the rich and powerful bent on having their way, in this case seducing Joseph; but his connection to righteousness resists her pulling him into adultery and the subsequent agonies of Gehenna, the mystical Jewish “hell”- a state of burning misery, guilt and remorse.