Configure Non-SSL (Development Only)

K2 Services is configured by default to require SSL and should always be configured this way in production environments.  The information provided in this section is for testing (non-production) purposes only.

It may be desired to remove the SSL requirement during development and testing against K2 Services endpoints.  This section details the steps necessary to remove the SSL requirement.  All steps assume a default K2 installation.

IIS Settings

  1. Start Internet Information Services (IIS) Manager 
  2. Navigate to {Server} > Sites > K2
  3. Select Bindingsā€¦ and ensure there are no SSL bindings
    7
  4. Close the Site Bindings dialog
  5. Select SSL Settings  and ensure the following
    1. Require SSL: unchecked (default)b
    2. Client Certificates
      1. Ignore: checked (default)
    8
  6. Navigate to {Server} > Sites > K2
  7. Select Authentication and ensure the following
    1. Windows Authentication: Enabled
    2. Anonymous Authentication: Disabled
    3. Basic Authentication: Disabled  NOTE: K2 implements Basic for you
      4
    4. Highlight Windows Authentication and select Providersā€¦ and ensure the following
    5. Providers: NTLM; Negotiate
    10
  8. Navigate to {Server} > Sites > K2 > K2Services
  9. Select SSL Settings  and ensure SSL is not enabled
    1. Require SSL: unchecked (default)
    2. Client Certificates
      1. Ignore: checked (default)
    11
  10. Navigate to {Server} > Sites > K2 > K2Services 
  11. Select Authentication and ensure the following:
    1. Windows Authentication: Enabled
    2. Anonymous Authentication: Enabled
    3. Basic Authentication: Disabled  NOTE: K2 implements Basic for you
  12. Navigate to {Server} > Application Pools
  13. Select K2 blackpearl and ensure the following
    1. .NET Framework Version: 2.0
    2. Pipeline mode: Classic
12

Web.config Settings

  1.  Open C:\Program Files (x86)\K2 blackpearl\WebServices\K2Services\web.config
  2. To support BASIC + HTTP
    1. Set the requireSSL tag to False
      <configuration>
        <sourceCode.services>
          <basicAuthentication requireSSL="False" enabled="True" cachingEnabled="True" cachingDuration="15" defaultSecurityLabel="K2" />
        </sourceCode.services>
      </configuration>

    2. Set the service endpoints and base addresses for HTTP
      <services>
        <service behaviorConfiguration="SourceCode.Services.RestBehavior" name="SourceCode.Services.SyncRest">
          <endpoint address="Task" behaviorConfiguration="SourceCode.Services.RestBehavior" binding="webHttpBinding" bindingConfiguration="SourceCode.Services.SyncRestBinding+HTTP" contract="SourceCode.Services.ServiceContracts.ITaskService" />
          <endpoint address="Identity" behaviorConfiguration="SourceCode.Services.RestBehavior" binding="webHttpBinding" bindingConfiguration="SourceCode.Services.SyncRestBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IIdentityService" />
          <endpoint address="Core" behaviorConfiguration="SourceCode.Services.RestBehavior" binding="webHttpBinding" bindingConfiguration="SourceCode.Services.SyncRestBinding+HTTP" contract="SourceCode.Services.ServiceContracts.ICoreService" />
          <host>
            <baseAddresses>
              <add baseAddress="http://api.denallix.com:81/K2Services/WCF.svc" />
            </baseAddresses>
          </host>
        </service>
        <service behaviorConfiguration="SourceCode.Services.SoapBehavior" name="SourceCode.Services.SyncWcf">
          <endpoint address="Task" behaviorConfiguration="SourceCode.Services.SoapBehavior" binding="basicHttpBinding" bindingConfiguration="SourceCode.Services.SyncWcfBinding+HTTP" contract="SourceCode.Services.ServiceContracts.ITaskService" />
          <endpoint address="Identity" behaviorConfiguration="SourceCode.Services.SoapBehavior" binding="basicHttpBinding" bindingConfiguration="SourceCode.Services.SyncWcfBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IIdentityService" />
          <endpoint address="Core" behaviorConfiguration="SourceCode.Services.SoapBehavior" binding="basicHttpBinding" bindingConfiguration="SourceCode.Services.SyncWcfBinding+HTTP" contract="SourceCode.Services.ServiceContracts.ICoreService" />
          <host>
            <baseAddresses>
              <add baseAddress="http://api.denallix.com:81/K2Services/WCF.svc" />
            </baseAddresses>
          </host>
        </service>
      </services>

    3. Set the security mode to TransportCredentialOnly for the endpoint bindings
    <bindings>
      <webHttpBinding>
        <binding name="SourceCode.Services.SyncRestBinding+HTTP">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </webHttpBinding>
      <basicHttpBinding>
        <binding name="SourceCode.Services.SyncWcfBinding+HTTP">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>

  3. To support Windows + HTTP
    1. Set the service endpoints and base addresses for HTTP
      <services>
        <service behaviorConfiguration="SourceCode.Services.RestBehavior" name="SourceCode.Services.Rest">
          <endpoint address="Process" behaviorConfiguration="SourceCode.Services.RestBehavior" binding="webHttpBinding" bindingConfiguration="SourceCode.Services.RestBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IProcessNavigationService" />
          <endpoint address="Worklist" behaviorConfiguration="SourceCode.Services.RestBehavior" binding="webHttpBinding" bindingConfiguration="SourceCode.Services.RestBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IWorklistNavigationService" />
          <endpoint address="Identity" behaviorConfiguration="SourceCode.Services.RestBehavior" binding="webHttpBinding" bindingConfiguration="SourceCode.Services.RestBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IIdentityService" />
          <endpoint address="Core" behaviorConfiguration="SourceCode.Services.RestBehavior" binding="webHttpBinding" bindingConfiguration="SourceCode.Services.RestBinding+HTTP" contract="SourceCode.Services.ServiceContracts.ICoreService" />
          <host>
            <baseAddresses>
              <add baseAddress="http://api.denallix.com:81/K2Services/WCF.svc" />
            </baseAddresses>
          </host>
        </service>
        <service behaviorConfiguration="SourceCode.Services.SoapBehavior" name="SourceCode.Services.Wcf">
          <endpoint address="Process" behaviorConfiguration="SourceCode.Services.SoapBehavior" binding="basicHttpBinding" bindingConfiguration="SourceCode.Services.WcfBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IProcessService" />
          <endpoint address="Worklist" behaviorConfiguration="SourceCode.Services.SoapBehavior" binding="basicHttpBinding" bindingConfiguration="SourceCode.Services.WcfBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IWorklistService" />
          <endpoint address="Identity" behaviorConfiguration="SourceCode.Services.SoapBehavior" binding="basicHttpBinding" bindingConfiguration="SourceCode.Services.WcfBinding+HTTP" contract="SourceCode.Services.ServiceContracts.IIdentityService" />
          <endpoint address="Core" behaviorConfiguration="SourceCode.Services.SoapBehavior" binding="basicHttpBinding" bindingConfiguration="SourceCode.Services.WcfBinding+HTTP" contract="SourceCode.Services.ServiceContracts.ICoreService" />
          <host>
            <baseAddresses>
              <add baseAddress="http://api.denallix.com:81/K2Services/WCF.svc" />
            </baseAddresses>
          </host>
        </service>
      </services>

    2. Set the security mode to TransportCredentialOnly for the endpoint bindings
<bindings>
  <webHttpBinding>
    <binding name="SourceCode.Services.RestBinding+HTTP">
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Windows" />
      </security>
    </binding>
  </webHttpBinding>
  <basicHttpBinding>
    <binding name="SourceCode.Services.WcfBinding+HTTP">
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Windows" />
      </security>
    </binding>
  </basicHttpBinding>
</bindings>

Configure SSL and Non-SSL

The configuration from the SSL and Non-SSL sections can be combined to support both SSL and Non-SSL endpoints at the same K2 Services virtual directory. Review the Troubleshooting topic when combining multiple bindings.

K2 blackpearl Developers Reference4.7
Video Links Learn Support
No videos found for this article
K2 on YouTube
No Additional links found for this article
No self-learning content for this article
Try some scenarios...
No relevant support links available for this article