It's the other way around. It's not legal unless these people are under an executive branch department or agency, with department heads appointed by the president, and confirmed by the Senate.
These people have not all been vetted, hired, and granted security clearances appropriate to the level of access they've obtained.
All of this is illegal.