OpenID 连接提供商,支持 HMAC 而不是 RSA,如何在没有 jwks_uri 的情况下符合?

OpenID connect provider, supporting HMAC not RSA, how to conform without jwks_uri?

我正在实施一个 OpenID 连接提供程序,但我在规范中看不到任何强制执行特定签名算法的内容。这意味着我应该能够实现 HMAC/HS256 而不必费心使用证书。是吗?

如果是这样,为什么 jwks_uri 在元数据中是强制性的?

我认为这是一个有效的问题。

核心规范 hints 可能存在您没有 的情况:

OPs MUST support signing ID Tokens with the RSA SHA-256 algorithm (an alg value of RS256), unless the OP only supports returning ID Tokens from the Token Endpoint (as is the case for the Authorization Code Flow) and only allows Clients to register specifying none as the requested ID Token signing algorithm.

但随后发现文档 goes on 与此相矛盾,不允许仅将 none 作为 id_token_signing_alg:

进行广告宣传

The algorithm RS256 MUST be included.

当然,后者确实反过来证明有必要 jwks_uri,但感觉很奇怪。

Discovery 不是必需的,但如果您支持它,则元数据文档必须包含 jwks_uri 并支持 RS256。哇。你可以支持 "none"-only 没有 Discovery。