all groups > dotnet distributed apps > october 2005 >
You're in the

dotnet distributed apps

group:

Beginner's Questions


Beginner's Questions JT
10/29/2005 10:06:04 PM
dotnet distributed apps:
Hi all,
I have written an app with a Windows Forms UI that is deployed to clients
across the internet via Terminal Services. It uses SQL Server as a data
store, and ADO.NET for CRUD. The data access layer is currently completely
ensnarled within the code for the Windows Forms app, and calls stored
procedures on the data source using Windows Integrated Authentication. The
user's identity is used by several triggers to identify who last updated data.

I am considering moving to a distributed architecture that would involve a
web services data access layer on a web server, and a deployed Windows Forms
Presentation layer client on user machines accross the internet. I know this
is quite a radical change, but hardware and bandwidth costs will eventually
make it very justifiable.

My questions....

1. What is the single best book I can buy in this regard?

2. Currently, users sign-on to my domain when they access my app via
Terminal Services. This allows me to use suser_sname in my AfterUpdate
triggers. It also allows me to establish very specific permissions for these
users based on AD GPO's and SQL server roles. Furthermore, the user's
Window's username is the primary key in a Client Access Table and is required
to return, via sproc, the name of the database he/she is allowed to connect
to, completing an SQL connection string that initially reads "Initial
Catalog=". How could I achieve this in a distributed app environment? I
believe a standard approach is to have the client authenticate at the DALC,
and then have the DALC run as a single domain user account in order to take
advantage of connection pooling. Obviously, this blows my afterupdate
triggers and initial user-to-database redirection strategy.

3. I am considering sticking with Windows Forms as my app uses a fair
amount of drag-drop and graphical image manipulation (also reasons to get
away from Terminal services). Are these valid reasons for avoiding a web
forms app for the presentation layer?

4. There is obviously no real data going over the internet with the
Terminal Services configuration. The data involves protected healthcare
info, and WILL go over the internet if I adopt the distributed structure.
Would SSL be the recommended means of securing the data? If so, would this
offer any alternative authentication strategies?

I know these are BIG questions, and I don't expect to see any books written
in reply. But any pointers to good references, walkthroughs, etc, would be
great. (Already read MS Distributed App Architecture Guide and Microsoft
Guide for Designing Data Tier Components and Passing Data Through Tiers).
--
Thanks.
RE: Beginner's Questions lukezhan NO[at]SPAM online.microsoft.com
10/30/2005 12:00:00 AM
Hello.

As for books, I recommened the following two:

XML Web Services in the Organization
http://www.microsoft.com/mspress/books/6534.asp

Understanding Web Services Specifications and the WSE
http://www.microsoft.com/MSPress/books/6708.asp

The reason I recommend the last one is for security. SSL is a proper way to
protect your data. Another is WS-Security and WSE. Here is also a good
article for WSE:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/
wse2wspolicy.asp

Hope this help,

Luke
RE: Beginner's Questions Luc
10/30/2005 7:56:01 AM
Hi JT. Yes this is quite a change. We are going under a similar process and
I think your question is of interest.

We validated this solution with Microsoft and this architecture is very
secure. We do use Windows form on the presentation layer which is on
terminal server and call web services on the business logic side. IIS in the
entry point for our SOA architecture and we are using only Windows integrated
autentication in order to autenticate who is gaining access to the server
side.

This way, the credential of the client side are transported to the server
side and the thread still knows the identity of the autenticated user. So
the information is still availlable for you to connect to your database.

Knowing that and knowing you want to use connection pooling, there are ways
to still do what you want.

On our side, we are using an Oracle Database. So we decided to use "Proxy"
authentication on the DB Side. Which means that we are going to have only
one real user interfacing the database but the identity of the authenticated
user will be passed as a parameter. Then the database user will work "on
behalf" of the real user. Thus all transactions will be stamped with the
identity of the real authenticated user.

I know this information is very roughly said but there are many books about
SOA architecture that can give you good information regarding identity
passing and how you can achieve that. Also, there may be an equivalent way
of using "proxy" authentication on SQL Server.

If your architecture reside on the same domain and you are not going on the
internet, to my point of view there is no need to go for SSL. But if so, I
will strongly recommend it. The infromation between the two tier will by
passed using XML which to my point of view is still a good way to bind to
data controls on the presentation layer.

Hope this help.

[quoted text, click to view]
RE: Beginner's Questions JT
10/31/2005 8:54:02 PM
Thank you both for your answers. I have three follow-on questions...

1. Authenticating the user. My users will all be communicating with my web
service(s) accross the Internet using the downloaded Windows Forms client I
supply them. What is my best bet for authenticating the users to my web
service? To my database (SQL Server)? I am assuming that Windows Integrated
Auth will not work for the web service. Or perhaps it would, if I gave the
users domain accounts. Can this be done outside of the RDC/Terminal Services
environment? If not, would it be reasonable to store usernames and passwords
on SQL Server, and use basic auth with https?
2. SQL Server 2005 Web Services. If I upgrade to SQL Server 2005, I can
expose its native web services, and perhaps avoid using a middle data access
tier and IIS altogether? If I require all of my Internet users to use a
Windows 2K or greater OS, can I authenticate them to this type of web service
using Windows Integrated Auth? I would like to avoid mixed auth to the SQL
server.
3. My current terminal services app has about 25 typed datasets, each with
from one to 40 datatables (average of three per dataset). Should I create
one huge web service with methods on all of these business entities, or many
smaller services?

Thanks for any further advice.

--
John


[quoted text, click to view]
RE: Beginner's Questions lukezhan NO[at]SPAM online.microsoft.com
11/1/2005 12:00:00 AM
Hello,

1. Windows Integrated Auth can be used for web service, but not for
internet user. You may consider VPN conncetion and your user can log in
with domain account on a VPN connection.

2. SQL Server 2005 can expose data via web service, but Internet users
cannot log in with Windows Integrated Auth since they don't have domain
account.

3. In my opnion, smaller services are more flexible than a huge one.

Hope this help,

Luke
AddThis Social Bookmark Button