共用方式為


<knownCertificates>

表示 X.509 憑證的集合,這些憑證是用來驗證由安全性權杖服務 (STS) 發行的安全性認證。

<configuration>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceCredentials>
            <issuedTokenAuthentication>
              <knownCertificates>

Syntax

<knownCertificates>
  <add findValue="String"
       storeLocation="CurrentUser/LocalMachine"
       storeName=" CurrentUser/LocalMachine"
       x509FindType="FindByThumbprint/FindBySubjectName/FindBySubjectDistinguishedName/FindByIssuerName/FindByIssuerDistinguishedName/FindBySerialNumber/FindByTimeValid/FindByTimeNotYetValid/FindBySerialNumber/FindByTimeExpired/FindByTemplateName/FindByApplicationPolicy/FindByCertificatePolicy/FindByExtension/FindByKeyUsage/FindBySubjectKeyIdentifier" />
</knownCertificates>

屬性和項目

下列各節說明屬性、子元素和父元素

屬性

無。

子元素

元素 描述
<add> 將 X.509 憑證加入至集合。

父項目

元素 描述
<issuedTokenAuthentication> 指定發行為服務認證的權杖。

備註

發行之權杖的情況有三個階段。 在第一個階段中,用戶端會嘗試存取稱為「安全權杖服務」的服務。 此安全權杖服務接著會驗證用戶端,隨後並對用戶端發出權杖,通常是安全性判斷提示標記語言 (SAML) 權杖。 用戶端接著會以權杖傳回服務。 此服務會檢查資料的權杖,使服務能夠驗證權杖,因此也能夠驗證用戶端。 若要驗證權杖,安全權杖服務所使用的憑證必須讓服務知道。

<issuedTokenAuthentication> 元素是任何此類安全權杖服務憑證的存放庫。 若要新增憑證,請使用 <knownCertificates> 元素。 為每個憑證插入 <add>,如下列範例所示。

<issuedTokenAuthentication>
  <knownCertificates>
    <add findValue="www.contoso.com"
         storeLocation="LocalMachine"
         storeName="My"
         X509FindType="FindBySubjectName" />
  </knownCertificates>
</issuedTokenAuthentication>

根據預設,必須從安全權杖服務取得憑證。 這些「已知的」憑證可確保只有合法的用戶端可以存取服務。

若要檢閱由同盟服務驗證的用戶端必需條件,以及使用此組態元素時的詳細資訊,請參閱如何設定同盟服務的認證。 如需同盟案例的詳細資訊,請參閱同盟和發行的權杖 (機器翻譯)

如需示範如何在設定中填入集合的範例,請參閱 <add>

另請參閱