質問

私は幸運のせずにしばらくの間この問題を解決しようとしています、もっとSharePoint Experienceが私の問題を特定することができるでしょう。

SharePointログの例外StackTraceは次のようになります。

System.IdentityModel.Tokens.SecurityTokenException: The issuer of the token is not a trusted issuer.    
at Microsoft.SharePoint.IdentityModel.SPLocalIssuerNameRegistry.GetIssuerName(SecurityToken securityToken)     
at Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.CreateClaims(SamlSecurityToken samlSecurityToken)     
at Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.ValidateToken(SecurityToken token)     
at Microsoft.IdentityModel.Tokens.SecurityTokenHandlerCollection.ValidateToken(SecurityToken token)     
at Microsoft.IdentityModel.Web.TokenReceiver.AuthenticateToken(SecurityToken token, Boolean ensureBearerToken, String endpointUri)     
at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest request)     
at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args)     
at Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs)     
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
.

私は逆コンパイルされたコードを見ました、それはこのように見えます:

 if (!accessProvider.SigningCertificate.Equals((X509Certificate) x509SecurityToken.Certificate))
    throw new SecurityTokenException(SPResource.GetString("IssuerIsNotTrusted"));
.

そのため、受信セキュリティトークンやアクセスプロバイダ証明書が一致しないように見えます。私はさらに、WinDBGにロードされたクラッシュダンプを作成し、私が正しい場所で検索しているかどうかわからない場合は、それからそれは間違った証明書を持っていた - それは明らかに属しても構いませんでした。。

私はこのような私のアイデンティティプロバイダを登録していました:

$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\temp\wcfsts.dev.cer")
$map1 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "Display Name" –SameAsIncoming
$realm = "http://sp2013.testweb.local"
$ap = New-SPTrustedIdentityTokenIssuer -Name "WSFederationSTS" -Description "WCF STS." –Realm $realm -ClaimsMappings $map1 -ImportTrustCertificate $cert -SignInUrl "http://wcfsts.dev/WSFederationSecurityTokenService.svc/Issue" -IdentifierClaim $map1.InputClaimType
.

CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=USで証明書を登録しました。

役に立ちましたか?

解決

私は私が間違ってしたかもしれないものを見ることによって偶然に問題を見つけました。
私はクレームチュートリアルそして、彼らがC#コードを使用してトークン発行者を登録することになることになることになるので、プロバイダーレルム「 https://intranet.contoso.com/_trust/ "であるので、" _trust "の部分を残しながらドメインを持つように変更しました。そのため、ログ内の例外は非常に誤解を招くようでした。

これの後、私は Blog Post 同じ号で、なぜ私がそれに気付かれなかったのか疑問に思います。

他のヒント

私はこのリンクからいくつかの指示をフォローしていました: HTTPS: //support.microsoft.com/en-us/help/3042604/the-convert-spwebapplication-command-cannot-convert-from-windows - claim

new-sptrustedidentytokenissuerコマンドの次の形式を使用しました:

$ap = New-SPTrustedIdentityTokenIssuer -Name $tokenIdentityProviderName -Description $TrustedIdentityTokenIssuerDescription -realm $siteRealm -ImportTrustCertificate $adfsCert -SignInUrl $signInUrl -UseDefaultConfiguration -IdentifierClaimIs EMAIL -RegisteredIssuerName $siteRealm
.

redustrationIssuernameに何を配置するかわかりませんでしたが、以前は働いていたときに空白のままになっていましたが、この場合は$ TOKENIDENTITYPROVIDernameと同じように設定します。

その後、「トークンの発行者は信頼できる発行者ではありません」というエラーを開始しました。

redustresissuernameの値をクリアしました:

Set-SPTrustedIdentityTokenIssuer -Identity $ap  -RegisteredIssuerName ""
.

そしてそれは私にとって問題を解決しました。

redwareIssuernameが機能するためには、信頼できるトークン発行者を指定するためにweb.configにissuernameRegistryエントリを追加する必要があるかもしれません。

<issuerNameRegistry 
  type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry,
  Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, 
  PublicKeyToken=31bf3856ad364e35">
  <trustedIssuers>
      <add thumbprint="99fcfe2c70ebb571020ca8aa1b7633dfe1fa1d58" name="http://localhost:48924/WingtipSTS/" />
  </trustedIssuers>
</issuerNameRegistry>
.

追加のソース: https:/ /docs.microsoft.com/en-us/previous-versions/office/developer/SharePoint-2010/ff955607(v=オフセー14)

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top