The bet din shel kohanim -a judiciary body composed of kohanim – has its roots since the very start of kehuna when the mishkan was set-up. Ahron and his sons where commanded to guard the sanctity of the mizbeach (altar), the duties assigned to them, and the daily affairs of the mikdash.
Over time, the bet din shel kohanim evolved to oversee all things relating to kohanim and kehuna, even things outside the mikdash such as the ketubah of the bat-kohen. Apparently, the destruction of the second בית המקדש put an to the bet din shel kohanim and its tremendous contributions to both בני ישראל and the Kohanim.
The bet din consisted of twenty-three kohanim and would function מאחורי בית הכפורת -in the space at the rear of heichal and the western wall of the azarah.