使用 Data Protector 而不是机器密钥是 IdentityServer3 IIS 部署的一个选项吗?

Is using Data Protector instead of machine key an option for IdentityServer3 IIS deployment?

部署文档是这样说的:

If you are running in IIS, you need to synchronize machine keys. If you are running outside of IIS, you need to use a web farm compatible data protector for Katana.

我的问题是,同步机器密钥是 IIS 的唯一有效方法,还是数据保护器方法也是一种选择?如果是这样,是否有理由更喜欢机器密钥而不是数据保护器证书?

您可以使用 IdentityServerOptions.

中的 DataProtector 属性 在 IdentityServer 3 中注册 OWIN/Katana IDataProtector

只要数据保护器是 'secure' 并且其中使用的任何密钥在所有实例中都相同,那么您没有理由应该对此使用机器密钥,这样所有 IdentityServer 实例就可以取消保护彼此令牌。

我过去推荐 IIS 机器密钥的唯一原因是因为它是一种相对常见的方法并且被大多数管理员理解。