Click here to Skip to main content
13,900,975 members
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

12.2K views
2 bookmarked
Posted 23 Dec 2010
Licenced CC (ASA 2.5)

WCF Claims, STS and Federation – Layman’s View – 2

, 23 Dec 2010
Rate this:
Please Sign up or sign in to vote.
In the previous post, we have seen the service configuration of WCF federation. In this post, let us see the STS configuration.

In the previous post, we have seen the service configuration of WCF federation. In this post, let us see the STS configuration.

In the STS’s configuration file, it is mentioned in <message> element.

<system.serviceModel>
  <services>
   <service name="Udooz.SecurityTokenService" behaviorConfiguration="stsBehavior">
    <endpoint contract="Udooz.ISecurityTokenService" 

	binding="wsHttpBinding" bindingConfiguration="stsBinding"/>
   </service>
  </services> 

<bindings>
   <wsHttpBinding>
    <binding name="stsBinding">
     <security mode="Message">
      <message clientCredentialType="UserName" />
     </security>
    </binding>
   </wsHttpBinding>
  </bindings> 

The STS service contract is declared in Udooz.ISecurityTokenService and implementation is resided in Udooz.SecurityTokenService.

The message security mode is specified in <binding>..<wsHttpBinding>..<binding name=”stsBinding”>…<security>.

This is specified in the <serviceBehaviors> section named “stsBehavior”.

<behaviors>
   <serviceBehaviors>
    <behavior name="stsBehavior">           
     <serviceCredentials>
                 <userNameAuthentication

              userNamePasswordValidationMode="Custom"

              customUserNamePasswordValidatorType=
		"UdoozCommonLib.STSUsernamePasswordValidator, UdoozCommonLib"/>
            <serviceCertificate findValue="WCFServerKey" 

		x509FindType="FindBySubjectName" 

		storeLocation="LocalMachine" storeName="My" />           
     </serviceCredentials>
    </behavior>
   </serviceBehaviors>
  </behaviors 

The username-password authentication is done by UdoozCommonLib.STSUsernamePasswordValidator class in UdoozCommonLib assembly.

To be continued…

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-ShareAlike 2.5 License

Share

About the Author

M Sheik Uduman Ali
Architect Aditi
India India
Working as Architect for Aditi, Chennai, India.

My Website: www.udooz.net

My Blog: www.udooz.net/blog

You may also be interested in...

Comments and Discussions

 
QuestionNext (3rd) article? Pin
Chiragdbhavsar4-Jun-12 1:15
memberChiragdbhavsar4-Jun-12 1:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190306.1 | Last Updated 23 Dec 2010
Article Copyright 2010 by M Sheik Uduman Ali
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid