473,803 Members | 3,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remote logon page like Microsoft passport

Hi,

Our company has a database of users that we use to authenticate users on
various websites.

However, some of our customers want to develop a website on their own and
use the same database authenticate users.

At first I was thinking to create a WebService that accepts username &
password and returns if it's valid or not. But it is *very* important that
our customers don't know the password of these users. Because our customers
could "log" the data send to the webservice, this is obviously not a good
idea.

So I guess what we need is a system like Microsoft passport where the user
gets redirected to another website to logon and returns to the original url
afterwards.

What would be the best way to communicate between urls? It should be easy to
implement and yet secure.

Steven

- - -
Jun 19 '06 #1
10 2091
you can always do this:

Client Web Form should have the action form using POST method to your page
in your server with 2 forms (user and pwd) and 2 hidden inputs ( clientID
and PostBackURL )

your page accepts by POST the clientID and check if there's a correct
clientID to use your function, if ok accept user and pwd, and get true or
false, and redirect again to PostBackURL

*************** *************** *******

or have the same, but the LOGIN page is in your server and you only accept,
ClientID and PostBackURL [or only ClientID and from the DB you know where to
redirect the user after a good authentication]

using this they never know username/pwd from your own clients

*************** *************** *******

.... did I miss anything?
hope the idea is exactly what you need...

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Steven Spits" <no****@company .com> escreveu na mensagem
news:e3******** ******@TK2MSFTN GP05.phx.gbl...
Hi,

Our company has a database of users that we use to authenticate users on
various websites.

However, some of our customers want to develop a website on their own and
use the same database authenticate users.

At first I was thinking to create a WebService that accepts username &
password and returns if it's valid or not. But it is *very* important that
our customers don't know the password of these users. Because our
customers could "log" the data send to the webservice, this is obviously
not a good idea.

So I guess what we need is a system like Microsoft passport where the user
gets redirected to another website to logon and returns to the original
url afterwards.

What would be the best way to communicate between urls? It should be easy
to implement and yet secure.

Steven

- - -

Jun 19 '06 #2
Bruno,
Client Web Form should have the action form using POST method to your page
in your server with 2 forms (user and pwd) and 2 hidden inputs ( clientID
and PostBackURL )

your page accepts by POST the clientID and check if there's a correct
clientID to use your function, if ok accept user and pwd, and get true or
false, and redirect again to PostBackURL
This way would allow the client to log input before sending it to us. So no,
not a good idea.
or have the same, but the LOGIN page is in your server and you only
accept, ClientID and PostBackURL [or only ClientID and from the DB you
know where to redirect the user after a good authentication]

using this they never know username/pwd from your own clients


This is what I meant when saying "like Microsoft passport". But I'm still
not sure how to make it secure?

For example, how do I test in PostBackURL that the user was authenticated
using *our* login page? Using parameters
("http://ClientServer/WebApp/Validated.aspx? UserID=12345") would be
insecure, unless both parties write some code to check if the querystring is
not tampered with (like
http://aspnet.4guysfromrolla.com/art...083105-1.aspx). But I want
implementation to be as easy as possible so I'm not sure this is the way to
go...

Steven

- - -
Jun 19 '06 #3
steve that's why I told you to use POST instead of GET

POST does not give values in the URL Address... on GET

Web Client Application:

<form name="myform" id="myform" method="POST"
action="www.you rserver.com/loginpage.aspx" >
<input type="hidden"
value="http://www.ClientWebSe rver.com/user/default.aspx" name="PostBackU RL"
/>
<input type="hidden" value"iux876xj" name="CLientID" />
<a href="#" onclick="docume nt.myform.submi t();">Please click here to
login</a>
</form>

*************** *************** *************** *************** ********
Your loginpage.apx in you server

<%
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArg s)
Dim sClientID as String = request("Client ID")
if sClientID isnot nothing then
if validateClientI D( sClientID ) then
' everything is ok, let's show the login page to the
user, but before let's keep the PostBackURL
session("Redire ctTo") = request("PostBa ckURL")
else
' the clientID does not EXIST redirect the user with an
error
response.redire ct("http://www.ClientWebSe rver.com/user/default.aspx?er ror=1",
true )
end if
end if
End Sub

Protected Sub btnLogin_Click( ByVal sender As Object, ByVal e As
System.EventArg s)
' imagine this is the event when the user click the LOGIN button
in this page
dim sUser as string = fUser.text.tost ring
dim sPwd as string = fPwd.text.tostr ing

if validateUser(sU ser, sPwd) then
response.redire ct( session("PostBa ckURL"), true)
else
myErrorLabel.Te xt = "Invalid Username/Password!"
end if
End Sub
%>
got it?...

if you still have doubts, send me an email (br*********@gm ail.com) and I
will send you 2 pages with this working.

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Steven Spits" <no****@company .com> escreveu na mensagem
news:uW******** ******@TK2MSFTN GP03.phx.gbl...
Bruno,
Client Web Form should have the action form using POST method to your
page in your server with 2 forms (user and pwd) and 2 hidden inputs (
clientID and PostBackURL )

your page accepts by POST the clientID and check if there's a correct
clientID to use your function, if ok accept user and pwd, and get true or
false, and redirect again to PostBackURL


This way would allow the client to log input before sending it to us. So
no, not a good idea.
or have the same, but the LOGIN page is in your server and you only
accept, ClientID and PostBackURL [or only ClientID and from the DB you
know where to redirect the user after a good authentication]

using this they never know username/pwd from your own clients


This is what I meant when saying "like Microsoft passport". But I'm still
not sure how to make it secure?

For example, how do I test in PostBackURL that the user was authenticated
using *our* login page? Using parameters
("http://ClientServer/WebApp/Validated.aspx? UserID=12345") would be
insecure, unless both parties write some code to check if the querystring
is not tampered with (like
http://aspnet.4guysfromrolla.com/art...083105-1.aspx). But I want
implementation to be as easy as possible so I'm not sure this is the way
to go...

Steven

- - -

Jun 19 '06 #4
"Bruno Alexandre" wrote:
steve that's why I told you to use POST instead of GET
POST does not give values in the URL Address... on GET
There is no difference in using POST or GET. Both can be tampered with.

I think you misunderstood me. The QueryString I used as an example is the
one *after* validation. Like this one on your code:
if validateUser(sU ser, sPwd) then
response.redire ct( session("PostBa ckURL"), true)
else
myErrorLabel.Te xt = "Invalid Username/Password!"
end if
End Sub


I want to return to the client WHO was authenticated. And I also want to
make sure in "PostBackUR L" that the user was actually validated and didn't
typed that URL directly in his browser.

I appreciate your help...!

Steven

- - -
Jun 19 '06 #5
You can temper the Passport URL's... but what's the point? you will not be
validated!

sincerelly I thing you are putting too much in a really simple thing!
you problem is the username and password (as in Passport) and that YOU CAN
NOT temper as I told you!

soon you are login in your client could set a session to true and only show
the postbackurl page if the sessionID is the same that you can send him
back, for example...

like:

http://www.ClientWebServer.com/user/...e/default.aspx
and youre client must use redirect em asp.net to show the content, that's
called URL Mapping

in the HOW DO I: Microsoft Video Series, you have this in the Tips & Tricks
VIDEO (this particulary part stars at 14.05'')

http://msdn.microsoft.com/asp.net/le...t/default.aspx

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Steven Spits" <no****@company .com> escreveu na mensagem
news:eh******** *****@TK2MSFTNG P04.phx.gbl...
"Bruno Alexandre" wrote:
steve that's why I told you to use POST instead of GET
POST does not give values in the URL Address... on GET


There is no difference in using POST or GET. Both can be tampered with.

I think you misunderstood me. The QueryString I used as an example is the
one *after* validation. Like this one on your code:
if validateUser(sU ser, sPwd) then
response.redire ct( session("PostBa ckURL"), true)
else
myErrorLabel.Te xt = "Invalid Username/Password!"
end if
End Sub


I want to return to the client WHO was authenticated. And I also want to
make sure in "PostBackUR L" that the user was actually validated and didn't
typed that URL directly in his browser.

I appreciate your help...!

Steven

- - -

Jun 19 '06 #6
"Bruno Alexandre" wrote:
You can temper the Passport URL's... but what's the point? you will not be
validated!
We are clearly talking about something else.

Like I said before twice, *AFTER* validation I want to return to the calling
webserver and indicate WHO logged on. Tampering with this information (POST
or GET doesn't matter) has a very good point because I can fool the
webserver I got validated correctly as someone else!
sincerelly I thing you are putting too much in a really simple thing!
One can never put enough effort in security.
you problem is the username and password (as in Passport) and that YOU CAN
NOT temper as I told you!
The validation itself happens on my server, so I'm not afraid of any
tampering here...
soon you are login in your client could set a session to true and only
show the postbackurl page if the sessionID is the same that you can send
him back, for example...
....not sure what you mean here? How can a SessionID help me? We're talking
different servers here.
and youre client must use redirect em asp.net to show the content, that's
called URL Mapping


I'm familiar with url mapping, but I'm not sure how this is going to help
me? Url mapping is just another way to send parameters, only less visible to
the user.

Steven

- - -
Jun 19 '06 #7
the best is to pass back an authenciation ticket in the URL. you should
encrypt the ticket with a key only known to the requesting site.
-- bruce (sqlwork.com)

"Steven Spits" <no****@company .com> wrote in message
news:e3******** ******@TK2MSFTN GP05.phx.gbl...
Hi,

Our company has a database of users that we use to authenticate users on
various websites.

However, some of our customers want to develop a website on their own and
use the same database authenticate users.

At first I was thinking to create a WebService that accepts username &
password and returns if it's valid or not. But it is *very* important that
our customers don't know the password of these users. Because our
customers could "log" the data send to the webservice, this is obviously
not a good idea.

So I guess what we need is a system like Microsoft passport where the user
gets redirected to another website to logon and returns to the original
url afterwards.

What would be the best way to communicate between urls? It should be easy
to implement and yet secure.

Steven

- - -

Jun 19 '06 #8
Did you ever look to the Passport URL for once??

I just loged in from Expression product and the URL to the LOGIN form is:

https://login.live.com/ppsecure/secu...e35d5e24f9bbd3

if you cut it, we have:

lc=1033
id=42814
ru=https%3a%2f% 2fprofile.micro soft.com%3a443% 2fRegSysProfile Center%2fWizard .aspx%3ffamilyI d%3d4DFD5390-0793-420A-890A-97DC3AD94127%26 displayLang%3de n%26oRef%3dhttp %253a%252f%252f www.microsoft.c om%252fproducts %252fexpression %252fen%252fgra phic_designer%2 52fgd_free_tria l.aspx%26wizid% 3d026BB8CF-6048-41A0-B74C-544A76CC587C%26 LCID%3d1033%26f u%3dhttp%253a%2 52f%252fwww.mic rosoft.com%252f downloads%252fd etails.aspx%253 fFamilyId%253d4 DFD5390-0793-420A-890A-97DC3AD94127%25 26displaylang%2 53den%2526hash% 253dM9RRC95%26c u%3dhttp%253a%2 52f%252fwww.mic rosoft.com%252f downloads%252fd etails.aspx%253 fFamilyId%253d4 DFD5390-0793-420A-890A-97DC3AD94127%25 26displaylang%2 53den
tw=1800
fs=1
kv=4
ct=1150883054
cb=LCID%3d1033% 26WizID%3d026BB 8CF-6048-41A0-B74C-544A76CC587C%26 ReturnURL%3dhtt ps%253a%252f%25 2fprofile.micro soft.com%253a44 3%252fRegSysPro fileCenter%252f Wizard.aspx%253 ffamilyId%253d4 DFD5390-0793-420A-890A-97DC3AD94127%25 26displayLang%2 53den%2526oRef% 253dhttp%25253a %25252f%25252fw ww.microsoft.co m%25252fproduct s%25252fexpress ion%25252fen%25 252fgraphic_des igner%25252fgd_ free_trial.aspx %2526wizid%253d 026BB8CF-6048-41A0-B74C-544A76CC587C%25 26LCID%253d1033 %2526fu%253dhtt p%25253a%25252f %25252fwww.micr osoft.com%25252 fdownloads%2525 2fdetails.aspx% 25253fFamilyId% 25253d4DFD5390-0793-420A-890A-97DC3AD94127%25 2526displaylang %25253den%25252 6hash%25253dM9R RC95%2526cu%253 dhttp%25253a%25 252f%25252fwww. microsoft.com%2 5252fdownloads% 25252fdetails.a spx%25253fFamil yId%25253d4DFD5 390-0793-420A-890A-97DC3AD94127%25 2526displaylang %25253den
ems=1
seclog=10
ver=2.1.6000.1
rn=7xgfU7pV&tpf =2a069e68c054b7 772ee35d5e24f9b bd3

as you can see, the PostBackURL here is called "ru"
and in cb you have ReturnURL after the SessionID

so, all the form does is what I told you.

and here I can prove you that I can temper Passport just playing with the
Query, but... like I told you, what's the point? I never get into where I
want if I temper it!
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Steven Spits" <no****@company .com> escreveu na mensagem
news:uT******** ******@TK2MSFTN GP04.phx.gbl...
"Bruno Alexandre" wrote:
You can temper the Passport URL's... but what's the point? you will not
be validated!


We are clearly talking about something else.

Like I said before twice, *AFTER* validation I want to return to the
calling webserver and indicate WHO logged on. Tampering with this
information (POST or GET doesn't matter) has a very good point because I
can fool the webserver I got validated correctly as someone else!
sincerelly I thing you are putting too much in a really simple thing!


One can never put enough effort in security.
you problem is the username and password (as in Passport) and that YOU
CAN NOT temper as I told you!


The validation itself happens on my server, so I'm not afraid of any
tampering here...
soon you are login in your client could set a session to true and only
show the postbackurl page if the sessionID is the same that you can send
him back, for example...


...not sure what you mean here? How can a SessionID help me? We're talking
different servers here.
and youre client must use redirect em asp.net to show the content, that's
called URL Mapping


I'm familiar with url mapping, but I'm not sure how this is going to help
me? Url mapping is just another way to send parameters, only less visible
to the user.

Steven

- - -

Jun 21 '06 #9
Bruno,

I appreciate your help, but if you don't *read* my mails, we're getting
nowhere...
I just loged in from Expression product and the URL to the LOGIN form is:


For the third time: the problem is not the url *TO* the login form, it's the
url *GOING BACK* from the login page to site that originally requested the
authentication.

Based on your example: what happens when I copy & paste the value of "ru" in
my browser? How to check if the user was actually validated?

Steven

- - -
Jun 21 '06 #10

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

Similar topics

3
5255
by: Jacob | last post by:
Hello All, I am trying to serve out some content via IIS that is hosted on a remote fileserver, and am unable to get the delegation working correctly. Our setup is as follows: Local LAN Windows 2000 domain (mixed-mode): MYDOMAIN (mydomain.net) Windows 2003 Server w/IIS6: WEB01 Windows 2000 Server hosting files: FILE01 Windows XP Pro client workstation: CLIENT01
24
2677
by: asj | last post by:
It seems that Microsoft may be slowly phasing away Passport, which had been one of the hyped components of the eroded dotnet hype....bye bye, passport, we hardly knew ye! bwahahahbwahahaha!!!!! http://www.dashes.com/anil/2004/10/17/wither_passport "Microsoft hasn't talked much about Passport lately, but Monster.com sent out an email last week saying that they were discontinuing the option to sign in using Passport. And I noticed today...
9
4639
by: Hermit Dave | last post by:
Hi, I am making a web application (rather two applications) one which is host and used by customers when they are just browsing through products. The second application resides on a secure server. This is going to hold all account related information for the customers and will also be used for admin The login is implemented using forms authentication and i was just reading up about that... but as everyone already knows.... its all...
14
8683
by: | last post by:
I cannot for the life of me get remove debugging to work. I continue to receive "Error while trying to run project: Unable to start debugging on the web server. Access is denied. Verify that you are an administrator or member of the Debugger Users". I have followed (ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vsdebug/html/vxtbsHTTPServer Errors.htm). I have seen...
7
2599
by: | last post by:
I'm writing an ASP.NET app, using Visual Studio 2003. VS is running locally on my laptop, but the web app is running on a remote server. My laptop is not in the domain. I do have a domain account. I had no issue creating the web app on the remote server after authenticating with the domain account, but I can't debug. It complains that I don't have rights. My domain account is in the administrators group on the remote machine. I also have...
5
17770
by: =?Utf-8?B?QWRyaWFuTW9ycmlz?= | last post by:
Hello! I'm trying to copy a file from another computer on the network that I do not have permission with my current logon details to access. If I open the folder using the Windows file manager with the path "\\ 192.168.2.2\temp" (where temp is a shared directory on server \\192.168.2.2), windows prompts for a User Name and password of a user who has permission on that computer to access that directory. If I enter valid details, the...
0
10546
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...
0
10310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10292
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
10068
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
9121
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...
0
6841
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
5498
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...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.