Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Basic Authentication/Custom Login page

Reply
Thread Tools

Basic Authentication/Custom Login page

 
 
mike
Guest
Posts: n/a
 
      09-14-2005
Hello.

I'm creating a site that has basic authentication. Is it possible to have a
custom login page display instead of the Windows login page?

Thanks in advance,

Mike


 
Reply With Quote
 
 
 
 
WJ
Guest
Posts: n/a
 
      09-14-2005
Form Authentication will serve your purpose ad this requires Anonymous
instead of Basic. Keep in mind that Basic Auth. does not protect your
system.

John

"mike" <> wrote in message
news:...
> Hello.
>
> I'm creating a site that has basic authentication. Is it possible to have
> a custom login page display instead of the Windows login page?
>
> Thanks in advance,
>
> Mike
>



 
Reply With Quote
 
 
 
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-14-2005
Hello WJ,

what do you mean by "does not protect you system"?? can you elaborate?

it is all a matter of where you store your user accounts, if you store them
in some windows backed store (LSA, Domain) then you have to resort to some
IIS authentication. And basic is the one with the broadest compatibility.
Of course, keep in mind that basic auth transmits the password in clear text,
so you HAVE to layer SSL of basic auth.

One gotcha is, that you have to live with the window login dialog - i can
give you code to do that, if you really want to go this route. But this would
mean that you have to do auth yourself.

Another option is to use Forms Authentication, typically with user accounts
stored in a database. This allows out of the box to provide your own login
UI - again you have to do auth yourself.

maybe this clear it up a little bit. feel free to ask.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Form Authentication will serve your purpose ad this requires Anonymous
> instead of Basic. Keep in mind that Basic Auth. does not protect your
> system.
>
> John
>
> "mike" <> wrote in message
> news:...
>
>> Hello.
>>
>> I'm creating a site that has basic authentication. Is it possible to
>> have a custom login page display instead of the Windows login page?
>>
>> Thanks in advance,
>>
>> Mike
>>



 
Reply With Quote
 
mike
Guest
Posts: n/a
 
      09-15-2005
Hi, Dominick.

The application is intended for our salesmen, and they are domain users, and
therefore I would like to use the WindowsPrincipal object instead of
GenericPrinciple, for purposes of delegation.

Although Basic Auth would only "natively" give me a one-hop delegate, I
would still like to have IIS authenticate against Active Directory.

Of course, if one of the "higher-ups" insists on a friendly-looking sign-in
page, then Forms Authentication will be the way.

Mike

"Dominick Baier [DevelopMentor]" <>
wrote in message news: om...
> Hello WJ,
>
> what do you mean by "does not protect you system"?? can you elaborate?
>
> it is all a matter of where you store your user accounts, if you store
> them in some windows backed store (LSA, Domain) then you have to resort to
> some IIS authentication. And basic is the one with the broadest
> compatibility. Of course, keep in mind that basic auth transmits the
> password in clear text, so you HAVE to layer SSL of basic auth.
>
> One gotcha is, that you have to live with the window login dialog - i can
> give you code to do that, if you really want to go this route. But this
> would mean that you have to do auth yourself.
>
> Another option is to use Forms Authentication, typically with user
> accounts stored in a database. This allows out of the box to provide your
> own login UI - again you have to do auth yourself.
>
> maybe this clear it up a little bit. feel free to ask.
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
>> Form Authentication will serve your purpose ad this requires Anonymous
>> instead of Basic. Keep in mind that Basic Auth. does not protect your
>> system.
>>
>> John
>>
>> "mike" <> wrote in message
>> news:...
>>
>>> Hello.
>>>
>>> I'm creating a site that has basic authentication. Is it possible to
>>> have a custom login page display instead of the Windows login page?
>>>
>>> Thanks in advance,
>>>
>>> Mike
>>>

>
>



 
Reply With Quote
 
mike
Guest
Posts: n/a
 
      09-15-2005
So I guess the answer is "No"?

"WJ" <> wrote in message
news:...
> Form Authentication will serve your purpose ad this requires Anonymous
> instead of Basic. Keep in mind that Basic Auth. does not protect your
> system.
>
> John
>
> "mike" <> wrote in message
> news:...
>> Hello.
>>
>> I'm creating a site that has basic authentication. Is it possible to have
>> a custom login page display instead of the Windows login page?
>>
>> Thanks in advance,
>>
>> Mike
>>

>
>



 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-15-2005
Hello Mike,

a) you can get rid of the windows dialog, even with basic - but that means
calling LogonUser to authenticate against AD, which would also give you a
token to construct a WindowsPrincipal for "delegation"

b) in theory you can also use integrated and configure IE to send credentials
automatically (theory=users must be logged onto the domain - keep alives
have to be enabled between web server and client)



---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Hi, Dominick.
>
> The application is intended for our salesmen, and they are domain
> users, and therefore I would like to use the WindowsPrincipal object
> instead of GenericPrinciple, for purposes of delegation.
>
> Although Basic Auth would only "natively" give me a one-hop delegate,
> I would still like to have IIS authenticate against Active Directory.
>
> Of course, if one of the "higher-ups" insists on a friendly-looking
> sign-in page, then Forms Authentication will be the way.
>
> Mike
>
> "Dominick Baier [DevelopMentor]"
> <> wrote in message
> news: om...
>
>> Hello WJ,
>>
>> what do you mean by "does not protect you system"?? can you
>> elaborate?
>>
>> it is all a matter of where you store your user accounts, if you
>> store them in some windows backed store (LSA, Domain) then you have
>> to resort to some IIS authentication. And basic is the one with the
>> broadest compatibility. Of course, keep in mind that basic auth
>> transmits the password in clear text, so you HAVE to layer SSL of
>> basic auth.
>>
>> One gotcha is, that you have to live with the window login dialog - i
>> can give you code to do that, if you really want to go this route.
>> But this would mean that you have to do auth yourself.
>>
>> Another option is to use Forms Authentication, typically with user
>> accounts stored in a database. This allows out of the box to provide
>> your own login UI - again you have to do auth yourself.
>>
>> maybe this clear it up a little bit. feel free to ask.
>>
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> Form Authentication will serve your purpose ad this requires
>>> Anonymous instead of Basic. Keep in mind that Basic Auth. does not
>>> protect your system.
>>>
>>> John
>>>
>>> "mike" <> wrote in message
>>> news:...
>>>> Hello.
>>>>
>>>> I'm creating a site that has basic authentication. Is it possible
>>>> to have a custom login page display instead of the Windows login
>>>> page?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Mike
>>>>



 
Reply With Quote
 
mike
Guest
Posts: n/a
 
      09-15-2005
HI, Dominick. Thanks for responding.

You said that I "can get rid of the windows dialog, even with basic", my
question is "How"?

Thanks again,

Mike

"Dominick Baier [DevelopMentor]" <>
wrote in message news: om...
> Hello Mike,
>
> a) you can get rid of the windows dialog, even with basic - but that means
> calling LogonUser to authenticate against AD, which would also give you a
> token to construct a WindowsPrincipal for "delegation"
>
> b) in theory you can also use integrated and configure IE to send
> credentials automatically (theory=users must be logged onto the domain -
> keep alives have to be enabled between web server and client)
>
>
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
>> Hi, Dominick.
>>
>> The application is intended for our salesmen, and they are domain
>> users, and therefore I would like to use the WindowsPrincipal object
>> instead of GenericPrinciple, for purposes of delegation.
>>
>> Although Basic Auth would only "natively" give me a one-hop delegate,
>> I would still like to have IIS authenticate against Active Directory.
>>
>> Of course, if one of the "higher-ups" insists on a friendly-looking
>> sign-in page, then Forms Authentication will be the way.
>>
>> Mike
>>
>> "Dominick Baier [DevelopMentor]"
>> <> wrote in message
>> news: om...
>>
>>> Hello WJ,
>>>
>>> what do you mean by "does not protect you system"?? can you
>>> elaborate?
>>>
>>> it is all a matter of where you store your user accounts, if you
>>> store them in some windows backed store (LSA, Domain) then you have
>>> to resort to some IIS authentication. And basic is the one with the
>>> broadest compatibility. Of course, keep in mind that basic auth
>>> transmits the password in clear text, so you HAVE to layer SSL of
>>> basic auth.
>>>
>>> One gotcha is, that you have to live with the window login dialog - i
>>> can give you code to do that, if you really want to go this route.
>>> But this would mean that you have to do auth yourself.
>>>
>>> Another option is to use Forms Authentication, typically with user
>>> accounts stored in a database. This allows out of the box to provide
>>> your own login UI - again you have to do auth yourself.
>>>
>>> maybe this clear it up a little bit. feel free to ask.
>>>
>>> ---------------------------------------
>>> Dominick Baier - DevelopMentor
>>> http://www.leastprivilege.com
>>>> Form Authentication will serve your purpose ad this requires
>>>> Anonymous instead of Basic. Keep in mind that Basic Auth. does not
>>>> protect your system.
>>>>
>>>> John
>>>>
>>>> "mike" <> wrote in message
>>>> news:...
>>>>> Hello.
>>>>>
>>>>> I'm creating a site that has basic authentication. Is it possible
>>>>> to have a custom login page display instead of the Windows login
>>>>> page?
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Mike
>>>>>

>
>



 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-15-2005
Hello Mike,

well - there are some steps necessary

a) enable anonymous again
b) enable forms auth
c) validate the user against AD (e.g. using LogonUser) in your logon page
d) issue the auth cookie yourself - remember the user password somehow
d) Handle Authenticate_Request or FormsAuthentication_Authenticate (not sure
which one is better) - call LogonUser to get a token, wrap the token in a
WindowsIdentity, wrap WindowsIdentity with WindowsPrincipal, replace Context.User

that should work.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> HI, Dominick. Thanks for responding.
>
> You said that I "can get rid of the windows dialog, even with basic",
> my question is "How"?
>
> Thanks again,
>
> Mike
>
> "Dominick Baier [DevelopMentor]"
> <> wrote in message
> news: om...
>
>> Hello Mike,
>>
>> a) you can get rid of the windows dialog, even with basic - but that
>> means calling LogonUser to authenticate against AD, which would also
>> give you a token to construct a WindowsPrincipal for "delegation"
>>
>> b) in theory you can also use integrated and configure IE to send
>> credentials automatically (theory=users must be logged onto the
>> domain - keep alives have to be enabled between web server and
>> client)
>>
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> Hi, Dominick.
>>>
>>> The application is intended for our salesmen, and they are domain
>>> users, and therefore I would like to use the WindowsPrincipal object
>>> instead of GenericPrinciple, for purposes of delegation.
>>>
>>> Although Basic Auth would only "natively" give me a one-hop
>>> delegate, I would still like to have IIS authenticate against Active
>>> Directory.
>>>
>>> Of course, if one of the "higher-ups" insists on a friendly-looking
>>> sign-in page, then Forms Authentication will be the way.
>>>
>>> Mike
>>>
>>> "Dominick Baier [DevelopMentor]"
>>> <> wrote in message
>>> news: om...
>>>
>>>> Hello WJ,
>>>>
>>>> what do you mean by "does not protect you system"?? can you
>>>> elaborate?
>>>>
>>>> it is all a matter of where you store your user accounts, if you
>>>> store them in some windows backed store (LSA, Domain) then you have
>>>> to resort to some IIS authentication. And basic is the one with the
>>>> broadest compatibility. Of course, keep in mind that basic auth
>>>> transmits the password in clear text, so you HAVE to layer SSL of
>>>> basic auth.
>>>>
>>>> One gotcha is, that you have to live with the window login dialog -
>>>> i can give you code to do that, if you really want to go this
>>>> route. But this would mean that you have to do auth yourself.
>>>>
>>>> Another option is to use Forms Authentication, typically with user
>>>> accounts stored in a database. This allows out of the box to
>>>> provide your own login UI - again you have to do auth yourself.
>>>>
>>>> maybe this clear it up a little bit. feel free to ask.
>>>>
>>>> ---------------------------------------
>>>> Dominick Baier - DevelopMentor
>>>> http://www.leastprivilege.com
>>>>> Form Authentication will serve your purpose ad this requires
>>>>> Anonymous instead of Basic. Keep in mind that Basic Auth. does not
>>>>> protect your system.
>>>>>
>>>>> John
>>>>>
>>>>> "mike" <> wrote in message
>>>>> news:...
>>>>>> Hello.
>>>>>>
>>>>>> I'm creating a site that has basic authentication. Is it possible
>>>>>> to have a custom login page display instead of the Windows login
>>>>>> page?
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Mike
>>>>>>



 
Reply With Quote
 
mike
Guest
Posts: n/a
 
      09-15-2005
Hi, Dominick.

Ok, I thought you were saying that I can enable Basic in IIS and override
the window that the browser displays.

I was trying to avoid the steps that you listed, but thanks for listing
them. I'll probably wind up needing that info.

Thanks again,

Mile

"Dominick Baier [DevelopMentor]" <>
wrote in message news: om...
> Hello Mike,
>
> well - there are some steps necessary
>
> a) enable anonymous again
> b) enable forms auth
> c) validate the user against AD (e.g. using LogonUser) in your logon page
> d) issue the auth cookie yourself - remember the user password somehow
> d) Handle Authenticate_Request or FormsAuthentication_Authenticate (not
> sure which one is better) - call LogonUser to get a token, wrap the token
> in a WindowsIdentity, wrap WindowsIdentity with WindowsPrincipal, replace
> Context.User
>
> that should work.
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
>> HI, Dominick. Thanks for responding.
>>
>> You said that I "can get rid of the windows dialog, even with basic",
>> my question is "How"?
>>
>> Thanks again,
>>
>> Mike
>>
>> "Dominick Baier [DevelopMentor]"
>> <> wrote in message
>> news: om...
>>
>>> Hello Mike,
>>>
>>> a) you can get rid of the windows dialog, even with basic - but that
>>> means calling LogonUser to authenticate against AD, which would also
>>> give you a token to construct a WindowsPrincipal for "delegation"
>>>
>>> b) in theory you can also use integrated and configure IE to send
>>> credentials automatically (theory=users must be logged onto the
>>> domain - keep alives have to be enabled between web server and
>>> client)
>>>
>>> ---------------------------------------
>>> Dominick Baier - DevelopMentor
>>> http://www.leastprivilege.com
>>>> Hi, Dominick.
>>>>
>>>> The application is intended for our salesmen, and they are domain
>>>> users, and therefore I would like to use the WindowsPrincipal object
>>>> instead of GenericPrinciple, for purposes of delegation.
>>>>
>>>> Although Basic Auth would only "natively" give me a one-hop
>>>> delegate, I would still like to have IIS authenticate against Active
>>>> Directory.
>>>>
>>>> Of course, if one of the "higher-ups" insists on a friendly-looking
>>>> sign-in page, then Forms Authentication will be the way.
>>>>
>>>> Mike
>>>>
>>>> "Dominick Baier [DevelopMentor]"
>>>> <> wrote in message
>>>> news: om...
>>>>
>>>>> Hello WJ,
>>>>>
>>>>> what do you mean by "does not protect you system"?? can you
>>>>> elaborate?
>>>>>
>>>>> it is all a matter of where you store your user accounts, if you
>>>>> store them in some windows backed store (LSA, Domain) then you have
>>>>> to resort to some IIS authentication. And basic is the one with the
>>>>> broadest compatibility. Of course, keep in mind that basic auth
>>>>> transmits the password in clear text, so you HAVE to layer SSL of
>>>>> basic auth.
>>>>>
>>>>> One gotcha is, that you have to live with the window login dialog -
>>>>> i can give you code to do that, if you really want to go this
>>>>> route. But this would mean that you have to do auth yourself.
>>>>>
>>>>> Another option is to use Forms Authentication, typically with user
>>>>> accounts stored in a database. This allows out of the box to
>>>>> provide your own login UI - again you have to do auth yourself.
>>>>>
>>>>> maybe this clear it up a little bit. feel free to ask.
>>>>>
>>>>> ---------------------------------------
>>>>> Dominick Baier - DevelopMentor
>>>>> http://www.leastprivilege.com
>>>>>> Form Authentication will serve your purpose ad this requires
>>>>>> Anonymous instead of Basic. Keep in mind that Basic Auth. does not
>>>>>> protect your system.
>>>>>>
>>>>>> John
>>>>>>
>>>>>> "mike" <> wrote in message
>>>>>> news:...
>>>>>>> Hello.
>>>>>>>
>>>>>>> I'm creating a site that has basic authentication. Is it possible
>>>>>>> to have a custom login page display instead of the Windows login
>>>>>>> page?
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>>
>>>>>>> Mike
>>>>>>>

>
>



 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      09-15-2005
Hello WJ,

so FormsAuth needs SSL too - does that mean it does not protect my system
??

btw - Basic Auth is probably supported on every browser on this planet

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> "mike" <> wrote in message
> news:%...
>
>> So I guess the answer is "No"?
>>

> Right. As these are Windows only. You do not want to implement Basic
> because it is vulnerable unless it is SSL enabled.
>
> FormAuth is the appropriate way. It also can run on multiple platforms
> and or Browsers.
>
> John
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
login page stays on login page Shannon ASP .Net 2 01-09-2008 10:51 PM
asp:login w/ ASP.NET 2.0 -- still can't get basic login page to work Sasquatch ASP .Net 2 10-04-2006 04:04 PM
Can't create simple login page using asp:login control Sasquatch ASP .Net 2 10-03-2006 09:22 PM
Login page with Basic authentication (newbie) Steven K0 ASP .Net Security 1 04-10-2005 02:45 AM
Forms Login Page Not Login Out Hermit Dave ASP .Net 5 01-13-2004 07:14 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57