The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> Security and Cryptography
|
User Authentication
Discuss User Authentication in the Security and Cryptography forum on Dev Shed. User Authentication Security and Cryptography forum discussing issues related to coding, server applications, network protection, data protection, firewalls, ciphers and the like.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

June 13th, 2001, 04:08 PM
|
|
Contributing User
|
|
Join Date: Feb 2001
Location: USA
Posts: 830
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
|
|
|
User Authentication
I have a site hosted on a Linux / Apache platform and will be password-protecting an area of the site. I have been contemplating doing this with HTTP Basic Authentication. I read some information on the web that stated that when using HTTP Authentication, username and password are transmitted unencrypted across the web, which seems to defeat the whole purpose of the password-protection, except when dealing with users that are non-malicious, or malicious, but inept. Is there a way to implement HTTP Basic Authentication in conjunction with SSI so that username and password are encrypted for transmission?
|

June 13th, 2001, 10:09 PM
|
|
Apprentice Deity
|
|
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237

Time spent in forums: 4 m 8 sec
Reputation Power: 17
|
|
|
Do you mean SSL? If so, yes. If SSL is implemented, EVERYTHING (including HTTP Basic Auth usernames and passwords) will be encrypted.
|

June 14th, 2001, 06:47 AM
|
|
Registered User
|
|
Join Date: Dec 2000
Posts: 23
Time spent in forums: 22 m 26 sec
Reputation Power: 0
|
|
|
basic authentication
yes, a user's credentials entered after a 401 browser challenge (which brings up the standard browser dialog box asking for username and password) will be passed in the header request as essentially clear-text. Like this:
Authorization: Basic hu748dlAG837842BZzU==
Don't be fooled that the username  assword string (which is what the junk text represents) is encrypted... it's not. It's in base64 format, so that anyone can easily decrypt it.
===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more
===========================================
|

June 14th, 2001, 10:03 AM
|
|
Contributing User
|
|
Join Date: Feb 2001
Location: USA
Posts: 830
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
|
|
|
User Authentication
Rod K,
Yes, you're right of course, I did mean SSL. The thing is, I don't want to put everything behind SSL due to the performance penalty and other issues, I would like to just authenticate the user in that fashion and then have them go back to a regular HHTP connection to continue browsing the site.
ame12,
That kind of defeats the purpose then, doesn't it?
|

June 14th, 2001, 10:45 AM
|
|
Contributing User
|
|
Join Date: Jan 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
>> I don't want to put everything behind SSL due to the performance penalty and other issues
What performance penalty? What other issues? In 5 years or so, http will be gone, just https that is left.
|

June 15th, 2001, 12:44 PM
|
|
Junior Member
|
|
Join Date: Jun 2001
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Look into the method used by PHPLib for handling this very issue without SSL. They use MD5 and a randomly generated key value to create a hash value to be returned from the client to the server. The Password is never sent as clear text.
|

June 15th, 2001, 02:51 PM
|
|
Apprentice Deity
|
|
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237

Time spent in forums: 4 m 8 sec
Reputation Power: 17
|
|
|
That's nothing be a horrible hack.
Since no decryption is done server side, all a sniffer would have to do is send what they sniff. I.E. the md5 hash
|

June 15th, 2001, 02:55 PM
|
|
Junior Member
|
|
Join Date: Jun 2001
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
True a sniffer could get the hash, but the key which is randomly generated, passed to the login page to be used in the MD5 hash generation, is only valid for the current session. Even if a sniffer had all that information, it is only valid for the session that was in progress, unless I'm missing something here.
|

June 15th, 2001, 08:12 PM
|
|
Contributing User
|
|
Join Date: Apr 2001
Location: Tauranga, NZ
Posts: 349
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|

June 16th, 2001, 08:38 AM
|
|
Registered User
|
|
Join Date: Dec 2000
Posts: 23
Time spent in forums: 22 m 26 sec
Reputation Power: 0
|
|
|
penalty
Just an FYI.. yes there is a huge performance penalty for implementing SSL (20X on some systems). That's why there's a great business in selling hardware crypto accelerators.
Regarding MD5... depends upon the implementation, but usually MD5 is susceptible to sniffing because it is a flat hash that is compared with the server's version of the same credentials.
Not entirely secure in most cases...
===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more
===========================================
|

June 16th, 2001, 03:18 PM
|
|
Contributing User
|
|
Join Date: Jan 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
>> yes there is a huge performance penalty for implementing SSL (20X on some systems)
Wrong. The performance difference is minimal. There is no reason not to implement SSL for such situation.
>> That's why there's a great business in selling hardware crypto accelerators
This statement doesn't support the performance penalty of SSL.
|

June 16th, 2001, 09:00 PM
|
|
Registered User
|
|
Join Date: Dec 2000
Posts: 23
Time spent in forums: 22 m 26 sec
Reputation Power: 0
|
|
|
SSL performance penalty
>>> The performance difference is minimal. There is no reason not to implement SSL for such situation.
Y'know I did a search and... you appear to be absolutely correct in this statement. I've got to back to my IT department and figure out why they are buying these SSL hardware accelerators. The reason they were buying these is - they told me - 10x or 20x delays in SSL... but having done a search I found that typically delays are 22%... not 20x.
Research paper here:
http://www.cs.nyu.edu/artg/research...comparison.html
Thanks for the heads up
===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more
===========================================
|

June 17th, 2001, 03:59 AM
|
|
Contributing User
|
|
Join Date: Jan 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Not to mention 20%, even 30% is reasonable. 20x is just way too non-sense. Getting better hardware would also make the difference less significant, maybe just 5%.
|

June 21st, 2001, 09:19 AM
|
|
Contributing User
|
|
Join Date: Feb 2001
Location: USA
Posts: 830
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
|
|
|
security
Everyone's input is greatly appreciated, but is there any consensus on this subject: how to implement a secure form of user authentication? I didn't realize this was going to be uncharted territory. I mentioned a performance penalty with SSL becuase that is what I had heard. My site is already taking aperformance hit because I am using a single PHP template as the basis for the entire site and using includes to incorporate the content for individual pages, so if there is a performance penalty with SSL I think the combination would cripple the site. At this point, the option that seems to be most viable is to create a database of usernames and passwords, then have the user enter their username and password on a form that is submitted through a https connection. If the username and password checks out, place a cookie (that will expire after, say, a day) on their machine that will be checked for by all pages in the protected area of the site. A couple of questions about that approach...how safe would my database be on the server? I actually don't even know where the database is located, I have a virtual hosting account and just connect to the database with a datasource name. Also, I apparently get just one database, so I would be putting various tables in the same database that are not related to each other , such as a table storing usernames / passwords, a table containing a membership directory for the organization, etc. Is that a good idea in general / in this context? Any advice appreciated.
|

June 28th, 2001, 05:41 AM
|
 |
Contributing User
|
|
Join Date: Jun 2001
Location: Manchester, UK
Posts: 80
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
i have a question. is the security issue more on the server or client side? if the issue is with server side snooping then my suggestion below will not be valid, if the issue is more on the client side then...
why not authenticate on an alternative port? would you guess to snoop on port 1603? (this is an example port number  ) a redirect could then take you to the approriate page back on the http port.
i would be interested to hear what others think to this approach.
cheers - robert.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|