RE: [users@httpd] https redirected to http, different login?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: nandelbosc@xxxxxxxx [mailto:nandelbosc@xxxxxxxx]
> Sent: Donnerstag, 14. April 2005 17:03
> To: users@xxxxxxxxxxxxxxxx
> Subject: [users@httpd] https redirected to http, different login?
> 
> 
> Hi list!
> 
> Imagine that scene:
> 
> I have apache/2.0.52-r1, mod ssl/2.0.52 and openssl/0.9.7d 
> running on a
> gentoo box...
> 
> Some pages on this webserver have a .htaccess* file with 
> AuthType Basic...
> I need the users of this server login under HTTPS protocol 
> (for encrypt
> user/pass information) and then be redirected to another page 
> under HTTP
> protocol.
> 
> That redirect works fine, in part, because when the user is 
> redirected to
> HTTP, the server request username & login for second time, 
> and obviously
> without encryption.
> 
> In summary... I only need ssl encryption for the moment to 
> send/receive
> login & pass, and only request login one time.
> 
> How can I solve this problem?

Not possible using basic_auth. The HTTP site and the HTTPS site are two different virtual hosts (they're on different ports!). So the browser will always regard them as two different authentication realms and never use the same credentials.

However, I think you fundamentally misunderstand how basic_auth works. What happens is that the browser caches the username and password (aka: "credentials") from the first request and after, submits them with every request in the same "realm" (realm = any URL under the directory it first hit the authentication).

So even if your scheme worked, it would not give any security because a snooper could extract the credentials from any HTTP requests which followed the HTTPS login.

You have two options:

- put everything under HTTPS (you're not worried about server load, are you?)
- use session-management to validate the user (ie, give him a cookie).

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

PS - read on...

> 
> *content of .htaccess file:
> 
>  AuthType Basic
>  AuthName "Message"
>  AuthUserFile /path/to/my/pass/file
>  Require valid-user
> 
> 
> 
> (I attached my apache.conf)
> 
> Another 2 quick questions... ;)
> 
> 1- If you look the config file, looks something like:
> 
>  Alias /temp "/path/to/webpage/1/2/4"
> 
>  <Directory "/path/to/webpage/1/2/4">
>    Options None
>    AllowOverride None
>    Order allow,deny
>    Allow from all
>  </Directory>
> 
> But when I type http://my.server/temp in my browser server return Not
> Found error... why?

Does /path/to/webpage/1/2/4 exist?

what's in the error_log

> 
> 2- If you look the config file looks something like:
> 
>  <Directory "/path/to/webpage/directory/to/list">
>          Options Indexes
>          AllowOverride None
>  </Directory>
> 
> In theory this directory can be listed, but ins't can, the 
> server return
> Forbidden error... why? I'm sure to have the correct rights in that
> directory.

But do you have an "Allow from all" anywhere?

> 
> 
> Sorry for my bad English and thanks for all!!!
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux