我正在尝试从部署到Azure的肯塔基州AuthServices中获取示例MVC应用程序,并使用Okta作为IDP。我跳过了几个障碍,但偶然发现了CryptographicException“数据保护操作失败了”。我不知道该怎么解决。
当出现这种情况时,浏览器中的URL为https://mysite.azurewebsites.net/AuthServices/Acs
如有任何帮助,我们将不胜感激。
下面是我的web.config的肯塔基部分。我没有身份服务器,所以删除了所有的联邦配置。
<kentor.authServices entityId="https://mysite.azurewebsites.net/AuthServices"
returnUrl="https://mysite.azurewebsites.net/"
authenticateRequestSigningBehavior="Never">
<identityProviders>
<add entityId="http://www.okta.com/1111111"
allowUnsolicitedAuthnResponse="true" binding="HttpRedirect"
metadataLocation="https://dev-11111.oktapreview.com/app/1111111/sso/saml/metadata"
loadMetadata="true">
<signingCertificate fileName="~/App_Data/okta.cert" />
</add>
</identityProviders>
让我知道,如果我可以提供任何进一步的信息,以帮助您协助我!
发布于 2016-03-20 22:39:48
它实际上是一个Azure问题,正如安德斯所指出的。修正是将以下内容添加到web.config中:
<system.identityModel>
<identityConfiguration>
<securityTokenHandlers>
<add type="System.IdentityModel.Services.Tokens.MachineKeySessionSecurityTokenHandler, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<remove type="System.IdentityModel.Tokens.SessionSecurityTokenHandler, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</securityTokenHandlers>
</identityConfiguration>
</system.identityModel>发布于 2016-03-20 08:56:40
看起来像是Kentor.AuthServices中的一个bug。最近我做了一些重写,它使用了数据保护API,所以那里可能出了问题。请在github站点上提交一个问题,包括异常的堆栈跟踪以及您正在使用的API模块(MVC、HttpModule或OWIN)的信息。
https://stackoverflow.com/questions/36101733
复制相似问题