<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Engwar &#187; mssql</title>
	<atom:link href="http://engwar.com/tags/mssql/feed" rel="self" type="application/rss+xml" />
	<link>http://engwar.com</link>
	<description>Chintana Wilamuna&#039;s weblog</description>
	<lastBuildDate>Wed, 30 Nov 2011 13:28:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>External user stores in Identity Server</title>
		<link>http://engwar.com/post/202?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=external-user-stores-in-identity-server</link>
		<comments>http://engwar.com/post/202#comments</comments>
		<pubDate>Fri, 18 Dec 2009 09:33:04 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
				<category><![CDATA[external user store]]></category>
		<category><![CDATA[identity server]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=202</guid>
		<description><![CDATA[Pointing WSO2 Identity Server to use user data stored in an external database has never been this easy. Once you complete the following it just works without having to do any other configuration or editing config files. All this can &#8230; <a href="http://engwar.com/post/202">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Pointing <a href="http://wso2.com/products/identity-server/">WSO2 Identity Server</a> to use user data stored in an external database has never been this easy. Once you complete the following it just works without having to do any other configuration or editing config files. All this can be done in few seconds using the excellent, intuitive web based management interface. In this case I wanted to point the Identity Server to talk to a Microsoft SQL Server database. More specifically this is how the Identity Server is configured in Apache Stonehenge project so that the .Net client program can authenticate via the Identity Server passive STS against users stored in a Microsoft SQL Server database. If you&#8217;re talking via JDBC this can be any database.</p>
<ol>
<li>You need to download the jTDS driver that can talk to Microsoft SQL. Get the latest driver <a href="http://sourceforge.net/projects/jtds/files/">here</a>.</li>
<li>Copy the jTDS jar file to &lt;Identity Server folder&gt;\repository\components\lib and restart the server.</li>
<li>Now, login to Identity Server web based administration console by going to http://localhost:9443/carbon. Default username: admin and password: admin.</li>
<li>Goto User Management &gt; Add External User Store and fill up with the following values
<p><em>Connection URL</em>: jdbc:jtds:sqlserver://localhost:1433/stocktraderdb<br />
<em>Connection user name</em>: trade<br />
<em>Connection password</em>: yyy<br />
<em>Connection password repeat</em>: yyy<br />
<em>Driver name</em>: net.sourceforge.jtds.jdbc.Driver</p>
<p><em>SQL for retrieving a given user&#8217;s password</em>: select password from accountprofile where userid = ?<br />
<em>SQL for listing users using &#8220;like&#8221;</em>: select userid from accountprofile where userid like ?<br />
<em>SQL for selecting a single user given the user name</em>: select userid from accountprofile where userid = ?<br />
<em>SQL for retrieving a user list</em>: select userid from accountprofile</p>
<p>and click Finish.
</li>
<li>Now, click Test Connection to make sure the connection to the database is working fine.</li>
</ol>
<p>That&#8217;s all you need to do. Now whenever your application point you to the Identity Server passive STS, you&#8217;ll be authenticated against users in the Microsoft SQL database.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/202/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

