In David Tong's lecture notes on Gauge Theory, in the section on 'Quantising the Colour Degree of Freedom', the following action is discussed,
$$ S_{w}=\int d \tau i w^{\dagger} \frac{d w}{d t}+\lambda\left(w^{\dagger} w-\kappa\right)+w^{\dagger} A(x(\tau)) w.\tag{2.17} $$
here, the complex vector $w$ is the internal, colour degree of freedom, $A= A_{\mu} d x^{\mu} / d \tau$ is a fixed background gauge field $A_\mu(x)$, and $\lambda$ is a Lagrange multiplier to impose the following constraint:
\begin{align} w^{\dagger} w=\kappa.\tag{2.16} \end{align}
Tong claims (halfway down page 36) that the above constraint
is analogous to Gauss' law when quantising Maxwell theory, and we should impose it as a constraint that defines the physical Hilbert space.
I am confused because I don't see what Gauss' law has to do with defining the physical Hilbert space in QED. In Tong's QFT notes, the physical Hilbert space is defined via the Gupta-Bleuler condition, which is an application of gauge choice, the Lorenz gauge: $\partial_\mu A^\mu=0$. I think that I'm failing to see the connection between the gauge choice, and Gauss' law, in the notes on QED. Thus I'm unable to understand the connection to this context in the Gauge Theory notes.