<wsFederationHttpBinding>

WS-Federation をサポートするバインディングを定義します。

スキーマの階層

<system.serviceModel>
  <bindings>
    <wsFederationHttpBinding>

構文

<wsFederationHttpBinding>
    <binding 
        bypassProxyOnLocal="Boolean"
        closeTimeout="TimeSpan" 
        hostNameComparisonMode="StrongWildcard/Exact/WeakWildcard"
        maxBufferPoolSize="integer"
        maxReceivedMessageSize="integer"
        messageEncoding="Text/Mtom" 
                name="string"
        openTimeout="TimeSpan" 
        privacyNoticeAt="Uri"
        privacyNoticeVersion="Integer"
        proxyAddress="Uri" 
        receiveTimeout="TimeSpan"
        sendTimeout="TimeSpan"
        textEncoding="UnicodeFffeTextEncoding/Utf16TextEncoding/ Utf8TextEncoding"
        transactionFlow="Boolean"
        useDefaultWebProxy="Boolean">
        <security mode="None/Message/TransportWithMessageCredential">
         <message 
            algorithmSuite="Basic128/Basic192/Basic256/Basic128Rsa15/Basic256Rsa15/TripleDes/TripleDesRsa15/Basic128Sha256/Basic192Sha256/TripleDesSha256/Basic128Sha256Rsa15/Basic192Sha256Rsa15/Basic256Sha256Rsa15/TripleDesSha256Rsa15"
            issuedTokenType="string" 
            issuedKeyType="SymmetricKey/PublicKey"
            negotiateServiceCredential="Boolean" >
            <claimTypeRequirements>
               <add claimType="URI"
                    isOptional="Boolean" />
            </claimTypeRequirements>
                        <issuer address="Uri" >
               <headers>
                  <add name="String"
                       namespace="String" />
                          </headers>
                              <identity>
                                 <certificate encodedValue="String"/>
                                <certificateReference findValue="String" 
                                 isChainIncluded="Boolean"
                            storeName="AddressBook/AuthRoot/CertificateAuthority/Disallowed/My/Root/TrustedPeople/TrustedPublisher"
                                  storeLocation="LocalMachine/CurrentUser"
                                   X509FindType=System.Security.Cryptography.X509certificates.X509findtype/>
                                   <dns value="String"/>
                                <rsa value="String"/>
                                <servicePrincipalName value="String"/>
                                <usePrincipalName value="String"/>
                              </identity>
                        </issuer>
                        <issuerMetadata address=String" >
               <headers>
                  <add name="String"
                       namespace="String" />
               </headers>
               <identity>
                  <certificate encodedValue="String"/>
                  <certificateReference findValue="String" 
                     isChainIncluded="Boolean"
                     storeName="AddressBook/AuthRoot/CertificateAuthority/Disallowed/My/Root/TrustedPeople/TrustedPublisher"
                     storeLocation="LocalMachine/CurrentUser"
                     x509FindType=System.Security.Cryptography.X509certificates.X509findtype/>
                  <dns value="String"/>
                  <rsa value="String"/>
                  <servicePrincipalName value="String"/>
                  <usePrincipalName value="String"/>
               </identity>
                        </issuerMetadata>
            <tokenRequestParameters>
               <xmlElement>
               </xmlElement>
            </tokenRequestParameters>
           </message>
        </security>
        <reliableSession ordered="Boolean"
           inactivityTimeout="TimeSpan"
           enabled="Boolean" />
       <readerQuotas             maxArrayLength="Integer"            maxBytesPerRead="Integer"            maxDepth="Integer"             maxNameTableCharCount="Integer"                     maxStringContentLength="Integer" />    </binding>
</wsFederationBinding>

属性と要素

以降のセクションでは、属性、子要素、および親要素について説明します。

属性

属性 説明

bypassProxyOnLocal

ローカル アドレスでプロキシ サーバーをバイパスするかどうかを示すブール値。既定値は false です。

closeTimeout

クローズ操作が完了するまでの期間を指定する TimeSpan 値。この値は必ず Zero 以上である必要があります。既定値は 00:01:00 です。

hostnameComparisonMode

URI の解析に使用する HTTP ホスト名比較モードを指定します。この属性は HostnameComparisonMode 型で、URI が一致したときにサービスへのアクセスにホスト名を使用するかどうかを指定します。既定値は StrongWildcard で、一致しているホスト名を無視します。

maxBufferPoolSize

このバインディングに使用するバッファー プール サイズの上限を指定する整数。既定は 524,288 バイト (512 * 1024) です。Windows Communication Foundation (WCF) では、多くの部分でバッファーを使用します。使用するたびに毎回バッファーを作成および破棄すると負荷が高くなります。バッファーのガベージ コレクションも同様です。バッファー プールを使用すると、バッファーをプールから取得して使用し、作業が終わったらプールに戻すことができます。これで、バッファーの作成と破棄のオーバーヘッドを回避できます。

maxReceivedMessageSize

このバインディングで構成されるチャネルで受信可能な最大メッセージ サイズ (ヘッダーを含む) をバイト単位で指定する正の整数。この制限を超えるメッセージの送信者が、SOAP エラーを受信します。受信者がメッセージをドロップし、トレース ログにそのイベントのエントリを作成します。既定値は 65536 です。

messageEncoding

メッセージのエンコードに使用されるエンコーダーを定義します。有効な値は次のとおりです。

  • Text: テキスト メッセージのエンコーダーを使用します。

  • Mtom: Message Transmission Organization Mechanism 1.0 (MTOM) エンコーダーを使用します。

既定値は Text です。

この属性は WSMessageEncoding 型です。

name

バインディングの設定名を格納する文字列です。この値は、バインディングの ID として使用されるため、一意にする必要があります。.NET Framework 4 以降では、バインディングおよび動作に名前を付ける必要はありません。既定の構成、および名前のないバインディングと動作の詳細については、「Simplified Configuration」および「Simplified Configuration for WCF Services」を参照してください。

openTimeout

実行中の操作が完了するまでの時間間隔を指定する TimeSpan 値です。この値は必ず Zero 以上である必要があります。既定値は 00:01:00 です。

privactyNoticeAt

プライバシーに関する声明の場所を示す URI を指定する文字列。

privactyNoticeVersion

現在のプライバシーに関する声明のバージョンを指定する整数。

proxyAddress

HTTP プロキシのアドレスを指定する URI。useDefaultWebProxytrue の場合、この設定を null にする必要があります。既定値は null です。

receiveTimeout

受信操作が完了するまでの時間間隔を指定する TimeSpan 値です。この値は必ず Zero 以上である必要があります。既定値は 00:10:00 です。

sendTimeout

送信操作が完了するまでの時間間隔を指定する TimeSpan 値です。この値は必ず Zero 以上である必要があります。既定値は 00:01:00 です。

textEncoding

バインディングでメッセージの発行に使用される文字セット エンコーディングを設定します。有効な値は次のとおりです。

  • BigEndianUnicode: Unicode BigEndian エンコーディング。

  • Unicode: 16 ビット エンコーディング。

  • UTF8: 8 ビット エンコーディング。

既定値は UTF8 です。この属性は Encoding 型です。

transactionFlow

バインディングが WS-Transactions のフローをサポートするかどうかを指定するブール値です。既定値は false です。

useDefaultWebProxy

システムの自動設定 HTTP プロキシを使用するかどうかを示すブール値。この属性が true の場合、プロキシ アドレスを null (つまり、設定しない) にする必要があります。既定値は true です。

子要素

要素 説明

<wsFederationHttpBinding> の <security>

メッセージのセキュリティ設定を定義します。この要素は WSFederationHttpSecurityElement 型です。

<readerQuotas>

このバインディングを使用して設定されるエンドポイントにより処理可能な、SOAP メッセージの複雑さに対する制約を定義します。この要素は XmlDictionaryReaderQuotasElement 型です。

reliableSession

チャネルのエンドポイント間に信頼できるセッションを確立するかどうかを指定します。

親要素

要素 説明

<bindings>

この要素には、標準バインディングおよびカスタム バインディングのコレクションが保持されます。

解説

フェデレーションは、複数のシステム間で認証と承認用の ID を共有する機能です。これらの ID は、ユーザーまたはコンピューターを参照できます。フェデレーション HTTP は、SOAP セキュリティと混合モード セキュリティをサポートしますが、トランスポート セキュリティの単独使用はサポートしません。このバインドは、WS-Federation プロトコルに対して Windows Communication Foundation (WCF) サポートを提供します。このバインドで構成されたサービスは、HTTP トランスポートを使用する必要があります。

バインドは、バインド要素のスタックで構成されます。■訳文不要■

wsFederationHttpBinding のバインディング要素のスタックは、wsHttpBinding に含まれる

に含まれるスタックと同じです (<wsFederationHttpBinding> の <security> が既定値の Message に設定されている場合)。

wsFederationHttpBinding は、<wsFederationHttpBinding> の <message> 要素 のメッセージ セキュリティ設定の詳細を制御します。いったんバインディングが作成されると、そのバインディングで使用されるセキュリティは変更できなくなるため、<wsFederationHttpBinding> の <security> 要素では get アクセスしか提供されないことに注意してください。

wsFederationHttpBinding は、プライバシーに関する声明の場所を示す URI の設定と取得を行う privactyNoticeAt 属性も提供します。

ポリシーをセキュリティで保護することが、フェデレーション シナリオでは特に重要です。ポリシーを悪意のあるユーザーから保護するには、HTTPS などのセキュリティ形式の使用をお勧めします。

フェデレーション シナリオでこのバインディングを使用する場合は、発行済み (SAML) トークンの暗号化に使用するキー、トークンに入れるクレームの種類などの重要情報がサービス ポリシーに含まれる可能性があります。これが改ざんされると、攻撃者は発行済みトークンのキーを発見してさらに改ざんを行ったり、情報を暴露したりなどの悪意ある行動を取る可能性があります。このような行為を防ぐには、(HTTPS などを使用して) ポリシーをセキュリティで保護し、サービスから安全に取得する必要があります。

このバインディングの詳細については、「How to: Create a WSFederationHttpBinding」を参照してください。

<configuration>
<system.ServiceModel>
<bindings>
<wsFederationHttpBinding>
    <binding 
        bypassProxyOnLocal="false"
        transactionFlow="false"
        hostNameComparisonMode="WeakWildcard"
        maxReceivedMessageSize="1000"
        messageEncoding="Mtom" 
        proxyAddress="http://foo/bar" 
        textEncoding="Utf16TextEncoding"
        useDefaultWebProxy="false">
        <reliableSession ordered="false"
            inactivityTimeout="00:02:00" enabled="true" />
        <security mode="None">
           <message negotiateServiceCredential="false"
                algorithmSuite="Aes128"
                issuedTokenType="saml" 
                issuedKeyType="PublicKey">
               <issuer address="https://localhost/Sts" />
           </message>
        </security>
    </binding>
</wsFederationBinding>
</bindings>
</system.ServiceModel>
</configuration>

参照

リファレンス

WSFederationHttpBinding
WSFederationHttpBindingElement

概念

<binding>

その他のリソース

How to: Create a WSFederationHttpBinding
Windows Communication Foundation Bindings
Configuring System-Provided Bindings
Using Bindings to Configure Services and Clients