If $P \to X$ is a $G$-principal bundle, then the space $map_G (P;EG)$ is contractible. Let $map_P(X;BG)$ be the space of all maps $f$ with $f^{\ast} EG \cong P$. There is an obvious map $map_G (P;EG) \to map_P (X;BG)$, a universal bundle for the gauge group $Aut(P)$ (automorphism group of $P$).