Rashi on Daniel
To you, O Lord, is the righteousness i.e., Your judgments and retributions that You have brought upon us—justice and righteousness are with You.
Rashi on Daniel
and to us is the shamefacedness We should be ashamed for what has happened to us, for we caused it for ourselves.