||The ability to sustain indirect reciprocity is an example of collective intelligence. It is increasingly relevant to future technology and autonomous machines that need to function in a coalition. Indirect reciprocity involves providing benefit to others without guaranteeing a future return. The identity through which an agent presents itself to others is fundamental, as this is how the reputation of an agent is considered. In this paper we examine the sharing of identity between agents, which is an important and frequently overlooked issue when considering indirect reciprocity. We model an agent's identity using traits, which can be shared with other agents, and offer a basis for an agent to change their identity. Through this approach we determine how shared identity affects cooperation, and the conditions through which cooperation can be sustained. This also helps us to understand how and why behavioral strategies involving identity function are put in place, such as whitewashing. The framework offers the opportunity to assess the interplay between the sharing of traits and the cost, in terms of reduced cooperation and opportunities for shirkers to benefit.