Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.13 KB | None | 0 0
  1. <services>
  2. <service name="SampleServiceConsoleHost.HelloWorldService" behaviorConfiguration="SampleService">
  3. <endpoint address="" binding="customBinding" bindingConfiguration="SampleService" contract="SampleServiceConsoleHost.IHelloWorld"/>
  4.  
  5. <host>
  6. <baseAddresses>
  7. <add baseAddress="net.tcp://localhost:9000/servicemodelsamples/service"/>
  8. </baseAddresses>
  9. </host>
  10. </service>
  11. </services>
  12. <bindings>
  13. <netTcpBinding>
  14. <binding name="TransportSecuredBinding">
  15. <security mode="Transport">
  16. <transport clientCredentialType="Windows" />
  17. </security>
  18. </binding>
  19. </netTcpBinding>
  20.  
  21.  
  22. <customBinding>
  23. <binding name="AnonBinding">
  24. <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
  25. <secureConversationBootstrap
  26. authenticationMode="AnonymousForCertificate"/>
  27. </security>
  28. <binaryMessageEncoding/>
  29. <tcpTransport />
  30. </binding>
  31.  
  32. <binding name="SampleService">
  33. <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
  34. <secureConversationBootstrap authenticationMode="IssuedToken">
  35. <issuedTokenParameters tokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
  36. <issuer address="net.tcp://localhost:8000/sts" bindingConfiguration="TransportSecuredBinding" binding="netTcpBinding">
  37. <identity>
  38. <dns value="STSAuthority"/>
  39. </identity>
  40. </issuer>
  41. </issuedTokenParameters>
  42. </secureConversationBootstrap>
  43. </security>
  44. <binaryMessageEncoding/>
  45. <tcpTransport />
  46. </binding>
  47. </customBinding>
  48. </bindings>
  49.  
  50. <behaviors>
  51. <serviceBehaviors>
  52. <behavior name="SampleService" returnUnknownExceptionsAsFaults="false">
  53. <serviceCredentials>
  54. <issuedTokenAuthentication allowUntrustedRsaIssuers="true" revocationMode="NoCheck" certificateValidationMode="None">
  55. <knownCertificates>
  56. <add storeLocation="LocalMachine" storeName="My" findValue="CN=STSAuthority" x509FindType="FindBySubjectDistinguishedName"/>
  57. <add storeLocation="LocalMachine" storeName="My" findValue="CN=SampleService" x509FindType="FindBySubjectDistinguishedName"/>
  58. </knownCertificates>
  59. </issuedTokenAuthentication>
  60. </serviceCredentials>
  61. </behavior>
  62. </serviceBehaviors>
  63. </behaviors>
  64.  
  65. <client>
  66. <!--<endpoint name="clientendpoint" address="net.tcp://localhost:9000/servicemodelsamples/service"
  67. binding="customBinding"
  68. contract="IHelloWorld"
  69. behaviorConfiguration="ServiceBehavior"
  70. bindingConfiguration="ServiceBinding">
  71. </endpoint> -->
  72.  
  73.  
  74.  
  75. <endpoint name="clientendpoint" address="net.tcp://localhost:9000/servicemodelsamples/service"
  76. binding="customBinding"
  77. contract="IHelloWorld"
  78. behaviorConfiguration="ServiceBehavior"
  79. bindingConfiguration="ServiceBinding"
  80. >
  81. </endpoint>
  82.  
  83. </client>
  84.  
  85. <bindings>
  86. <netTcpBinding>
  87. <binding name="TransportSecuredBinding">
  88. <security mode="Transport">
  89. <transport clientCredentialType="Windows" />
  90. </security>
  91. </binding>
  92. </netTcpBinding>
  93.  
  94. <customBinding>
  95. <binding name="AnonBinding">
  96. <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
  97. <secureConversationBootstrap
  98. authenticationMode="AnonymousForCertificate"/>
  99. </security>
  100. <binaryMessageEncoding/>
  101. <tcpTransport />
  102. </binding>
  103. <binding name="ServiceBinding">
  104. <security authenticationMode="SecureConversation">
  105. <secureConversationBootstrap authenticationMode="IssuedToken">
  106. <issuedTokenParameters tokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
  107. <issuer address="net.tcp://localhost:8000/sts" bindingConfiguration="TransportSecuredBinding" binding="netTcpBinding">
  108. <identity>
  109. <dns value="STSAuthority"/>
  110. </identity>
  111. </issuer>
  112. </issuedTokenParameters>
  113. </secureConversationBootstrap>
  114. </security>
  115. <binaryMessageEncoding/>
  116. <tcpTransport />
  117. </binding>
  118. </customBinding>
  119. </bindings>
  120.  
  121. <behaviors>
  122. <endpointBehaviors>
  123. <behavior name="ServiceBehavior">
  124. <clientCredentials>
  125. <issuedToken>
  126. <localIssuer address="net.tcp://localhost:8000/sts" bindingConfiguration="TransportSecuredBinding" binding="netTcpBinding">
  127. <identity>
  128. <dns value="STSAuthority"/>
  129. </identity>
  130. </localIssuer>
  131. </issuedToken>
  132. <!--clientCertificate findValue="CN=SampleClient" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectDistinguishedName"/-->
  133. <serviceCertificate>
  134. <defaultCertificate findValue="CN=STSAuthority" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectDistinguishedName"/>
  135. <authentication revocationMode="NoCheck" certificateValidationMode="None"></authentication>
  136. </serviceCertificate>
  137. </clientCredentials>
  138. </behavior>
  139. </endpointBehaviors>
  140. </behaviors>
  141.  
  142. <services >
  143. <service behaviorConfiguration="ServiceBehavior"
  144. name="Samples.Security.STS.SecurityTokenService">
  145. <!-- Mutual X509 Endpoint -->
  146.  
  147. <!--endpoint
  148. binding="netTcpBinding"
  149. address=""
  150. bindingConfiguration="TransportSecuredBinding"
  151. contract="Samples.Security.STS.ISecurityTokenService">
  152. </endpoint-->
  153. <endpoint
  154. binding="netTcpBinding"
  155. address=""
  156. bindingConfiguration="TransportSecuredBinding"
  157. contract="Samples.Security.STS.ISecurityTokenService">
  158. </endpoint>
  159.  
  160. <host>
  161. <baseAddresses>
  162. <add baseAddress ="net.tcp://localhost:8000/sts/" />
  163. </baseAddresses>
  164. </host>
  165. </service>
  166. </services>
  167.  
  168. <bindings>
  169. <netTcpBinding>
  170. <binding name="TransportSecuredBinding">
  171. <security mode="Transport">
  172. <transport clientCredentialType="Windows" />
  173. </security>
  174. </binding>
  175. </netTcpBinding>
  176. <customBinding>
  177. <binding name="AnonBinding">
  178. <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true">
  179. <secureConversationBootstrap
  180. authenticationMode="AnonymousForCertificate"/>
  181. </security>
  182. <binaryMessageEncoding/>
  183. <tcpTransport />
  184. </binding>
  185. </customBinding>
  186. </bindings>
  187.  
  188. <!--For debugging purposes set the includeExceptionDetailInFaults attribute to true-->
  189. <behaviors >
  190. <serviceBehaviors>
  191. <behavior name="ServiceBehavior">
  192. <serviceCredentials>
  193. <serviceCertificate findValue="CN=STSAuthority" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectDistinguishedName"/>
  194.  
  195. <!-- Only for Mutual Certificate -->
  196. <clientCertificate>
  197. <authentication revocationMode="NoCheck"/>
  198. </clientCertificate>
  199.  
  200. </serviceCredentials>
  201.  
  202. <serviceDebug includeExceptionDetailInFaults="true"/>
  203. </behavior>
  204. </serviceBehaviors>
  205. </behaviors>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement