473,795 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web services and security

I want to make a security system in my webservice similar to the one that
reporting services uses it has a logon user and logoff user web method...
when you log on it logs you into a session and maintains your logged in
status until you log off or timeout... I dont want to have to pass
username/pass back and forth each time I call a method... I want to use
sessions and I need a custom authentication and authorization method for our
service (its how we defined it to work) how would you go about doing this?
In reporting services it uses a web service to do it in this order

Connect to web service with no IIS authentication
Log into Web service via a public webmethod called LogonUser
Webservice consumer has a cookier container and credentials set to
CrentialCache.D efaultNetworkCr edentials

user logs on, all web methods now run as that user until user timesout or
calls LogOffUser

any ideas on how to do this? its basically like forms authentication just in
a web service and no login form... thanks!
Apr 23 '07 #1
3 1997
A better option is to use WSE 3.0 (WS-Security). You can attach an 509
certificate, which will be more secure, and have less overhead, than adding
a session to the web service. It is also standards based, which allows you
to dupe the methodology for systems that have to be contacted from Java
(example).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Smokey Grindle" <no****@dontspa mme.comwrote in message
news:u0******** ******@TK2MSFTN GP03.phx.gbl...
>I want to make a security system in my webservice similar to the one that
reporting services uses it has a logon user and logoff user web method...
when you log on it logs you into a session and maintains your logged in
status until you log off or timeout... I dont want to have to pass
username/pass back and forth each time I call a method... I want to use
sessions and I need a custom authentication and authorization method for
our service (its how we defined it to work) how would you go about doing
this? In reporting services it uses a web service to do it in this order

Connect to web service with no IIS authentication
Log into Web service via a public webmethod called LogonUser
Webservice consumer has a cookier container and credentials set to
CrentialCache.D efaultNetworkCr edentials

user logs on, all web methods now run as that user until user timesout or
calls LogOffUser

any ideas on how to do this? its basically like forms authentication just
in a web service and no login form... thanks!
Apr 23 '07 #2
wouldnt each client require an X509 cert on their machine though?

"Cowboy (Gregory A. Beamer)" <No************ @comcast.netNoS pamMwrote in
message news:A1******** *************** ***********@mic rosoft.com...
>A better option is to use WSE 3.0 (WS-Security). You can attach an 509
certificate, which will be more secure, and have less overhead, than
adding a session to the web service. It is also standards based, which
allows you to dupe the methodology for systems that have to be contacted
from Java (example).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Smokey Grindle" <no****@dontspa mme.comwrote in message
news:u0******** ******@TK2MSFTN GP03.phx.gbl...
>>I want to make a security system in my webservice similar to the one that
reporting services uses it has a logon user and logoff user web method...
when you log on it logs you into a session and maintains your logged in
status until you log off or timeout... I dont want to have to pass
username/pass back and forth each time I call a method... I want to use
sessions and I need a custom authentication and authorization method for
our service (its how we defined it to work) how would you go about doing
this? In reporting services it uses a web service to do it in this order

Connect to web service with no IIS authentication
Log into Web service via a public webmethod called LogonUser
Webservice consumer has a cookier container and credentials set to
CrentialCache. DefaultNetworkC redentials

user logs on, all web methods now run as that user until user timesout or
calls LogOffUser

any ideas on how to do this? its basically like forms authentication just
in a web service and no login form... thanks!

Apr 23 '07 #3
Yes, but getting the cert can be part of the sign up procedure for the
application. This can be highly encapsuluated on a SmartClient application.
There are other, less secure, methods in WS-Security.

You can also generate keys for users after they have established a session
and pass that key (initially null) with each subsequent request. This will
require a custom authentication/session framework, but it is doable. I
currently use a key on one set of web services, but it was one that had to
be thrown up quickly, sits behind SSL and I control the clients (which are
other web apps on another domain), so I am not that worried about security.

As a slight alteration, you can send user login info every time and store
the current session completely on the backend. As this requires a user's
login, you will have to use SSL. If you are using a Smart Client and would
like to hide this, you can have them login via a web service and have it
return session token. If you use a custom method, you can keep the "session"
alive on the server side as long as you want. Just make sure it eventually
times out and the app logs it out when they shut it down. Do not trust users
to end session.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Smokey Grindle" <no****@dontspa mme.comwrote in message
news:ux******** ********@TK2MSF TNGP04.phx.gbl. ..
wouldnt each client require an X509 cert on their machine though?

"Cowboy (Gregory A. Beamer)" <No************ @comcast.netNoS pamMwrote in
message news:A1******** *************** ***********@mic rosoft.com...
>>A better option is to use WSE 3.0 (WS-Security). You can attach an 509
certificate , which will be more secure, and have less overhead, than
adding a session to the web service. It is also standards based, which
allows you to dupe the methodology for systems that have to be contacted
from Java (example).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

************** *************** *************** *
Think outside the box!
************** *************** *************** *
"Smokey Grindle" <no****@dontspa mme.comwrote in message
news:u0******* *******@TK2MSFT NGP03.phx.gbl.. .
>>>I want to make a security system in my webservice similar to the one that
reporting services uses it has a logon user and logoff user web method...
when you log on it logs you into a session and maintains your logged in
status until you log off or timeout... I dont want to have to pass
username/pass back and forth each time I call a method... I want to use
sessions and I need a custom authentication and authorization method for
our service (its how we defined it to work) how would you go about doing
this? In reporting services it uses a web service to do it in this order

Connect to web service with no IIS authentication
Log into Web service via a public webmethod called LogonUser
Webservice consumer has a cookier container and credentials set to
CrentialCache .DefaultNetwork Credentials

user logs on, all web methods now run as that user until user timesout
or calls LogOffUser

any ideas on how to do this? its basically like forms authentication
just in a web service and no login form... thanks!

Apr 23 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4195
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my send mail code is executed, other necessary Windows Services have been terminated before it can actually send the mail. I've updated my HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry DependOnService value including SMPTSVC and...
13
1315
by: david | last post by:
I met the security problem. I have developed the form based security for ASP.NET appliation. However, it seems that my window based client for my Web services application can not access to the server side. How to overcome this situation? Thanks David
7
1988
by: Magdelin | last post by:
Hi, My security team thinks allowing communication between the two IIS instances leads to severe security risks. Basically, we want to put our presentation tier on the perimeter network and the business tier inside the fire wall or internal network. The biz tier will be developed and deployed as web services on IIS. I know microsoft recommends this architecture but I am not able to convince my security team. They say IIS is vulnerable...
0
1724
by: juchytil | last post by:
We created a C# Windows forms application and put the .EXE on our web server. We can download the executable from the web server to a desktop and it will display OK. When we click a button that causes the executable to call a web service on the same web server, we get the following code access security violation. -------------- begin violation ------------------------------------------- Could not talk to the web server. Error =...
3
5006
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function HelloWorld() As > <System.Xml.Serialization.SoapElementAttribute("return")> String
2
1133
by: Grep J | last post by:
Hello, I'm quite new to Web Services and like to know what kind of security is usually put to company's Web Services. Are there any documents how secure your Web Service when you publish them to clients? Could some give some tips.
3
1862
by: Smokey Grindle | last post by:
I want to make a security system in my webservice similar to the one that reporting services uses it has a logon user and logoff user web method... when you log on it logs you into a session and maintains your logged in status until you log off or timeout... I dont want to have to pass username/pass back and forth each time I call a method... I want to use sessions and I need a custom authentication and authorization method for our service...
4
1913
by: Marco Pais | last post by:
Hello. This post is long, but I think that's a pertinent question for many people. I built a client/server application using .NET and SQL server, a 2 tier application. This first version was built in a rush, so its architecture is
1
1236
by: Rory Becker | last post by:
Does anyone have any links to information regarding the security of ADO.Net Data Services (Astoria)? How to close down access to given areas? How to default to no access and open up access needed? Role based access? Anything like that? Thanks in advance
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7540
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.