reference request – Kernels with finite dimensional feature spaces

Suppose $x,y in mathbb{R}^n$ for some given fixed n.

Consider a kernel $K(x,y) = f(langle x, y rangle)$, I’d like to know which functions $f$ admit a finite dimensional feature map. In other words, for $x,y in mathbb{R}^n$, what functions $f$ does there exist an $m$ and $phi: mathbb{R^n} rightarrow mathbb{R}^m$ with

$f(langle x, y rangle ) = langle phi(x), phi(y)rangle?$

I can show that $f$ must be polynomial if $m < 2^n$, but I’m sure there must exist a more comprehensive result.