Click here to Skip to main content
15,038,345 members
Articles / Programming Languages / XML
Technical Blog
Posted 23 Dec 2010

Tagged as

Stats

13.3K views
2 bookmarked

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

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
23 Dec 2010CC (ASA 2.5)
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.

Image 1

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

XML
<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.

Image 2

Image 3

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

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

XML
<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

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.