A very common technique in the analysis of algorithms involving random permutations is to have each element $x$ select a rank $\rho(x)$ uniformly at random from the real interval $[0,1]$. The permutation $\pi$ is then formed by sorting on ranks.
Is it possible to invert this transformation? That is, given a permutation $\pi$ generated randomly in $S_n$, choose ranks $\rho(x)$ (with some additional randomness) such that
Over all possible $\pi$, each $\rho(x)$ is uniformly distributed in $[0,1]$
$\rho(\pi(1)) < \rho(\pi(2)) < \dots < \rho(\pi(n))$
(Optional) $\rho(\pi(i))$ depends only only $\pi(1), \dots, \pi(i)$
Seemingly, giving $\rho(\pi(1))$ the distribution on the minimum of $n$ uniform variables, and so on, would work. Is there are any reference?