OpenID Connect has discovery endpoints containing a JKWS endpoint to get public keys to validate Identity and Access tokens.
So for example:
- I have a desktop application which gets an Identity token from the STS
- the application gets the jwks_uri from the Discovery document
- the application gets the public keys from this uri and validates the Identity token
So a man-in-the-middle attacker (like malware on a PC) can:
- intercept an Identity token from the STS, modify it and sign it with its own private key
- intercept the jwks_uri request and return its own public key(s)
Now the attacker can send anything he likes without the application knowing it?