Genpact Cora Knowledge Center

Support

Use WCF Consumer and REST Consumer with Kerberos

You can use Kerberos authentication in a WCF Consumer Activity or REST Conusmer Activity.

  1. Configure the necessary activity.
  2. Add the following sections to the activity's custom configuration.
<configuration>
  <system.serviceModel>
    <extensions>
      <behaviorExtensions>
        <add name="insertCustomHeaders" type="PNMsoft.Sequence.ServiceModel.Web.RestServiceInsertCustomHeadersExtension, PNMsoft.Sequence.ServiceModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1" />
      </behaviorExtensions>
    </extensions>
    <client>
      <endpoint name="RestServiceConsumer0webHttpBinding" binding="webHttpBinding" bindingConfiguration="WebHttpBinding" behaviorConfiguration="webBehavior" contract="RestServiceConsumer0">
        <identity>
          <servicePrincipalName value="HTTP/YourServiceName" />       // this is the Kerberos URL
        </identity>
      </endpoint>
      <metadata>
        <wsdlImporters>
          <extension type="PNMsoft.Sequence.ServiceModel.Web.RestWsdlImportExtension, PNMsoft.Sequence.ServiceModel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1" />
        </wsdlImporters>
      </metadata>
    </client>
    <bindings>
      <webHttpBinding>
        <binding name="WebHttpBinding" maxReceivedMessageSize="2147483647">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"></transport>
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="webBehavior">
          <clientCredentials>
            <windows allowedImpersonationLevel="Delegation" />
          </clientCredentials>
          <webHttp />
          <insertCustomHeaders>
            <headers></headers>
          </insertCustomHeaders>
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>