You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Shakti <co...@ea-world.com> on 2008/04/15 19:56:31 UTC
[users@httpd] SSL and Basic Authentication
Hi,
I am new to the apache and need help with ssl authentication. I have
compiled apache2 on Mac OS X. Configured it with basic authentication
and that worked fine. I enabled ssl and that worked fine. Then I
generated certificates for the server and clients, installed
certificates in client's browsers and that worked OK too.
Then I tried to combine certificate authentication with basic
authentication and that is were I run into a problem. I am not sure if
that is possible to do? When I do that I get normal prompt form the
server to accept the certificate, them the user name and password
prompt. I type the user name and password, but then it comes again and
again and prompts me for the user name and password over and over again.
When I do not use client certificate, then typing the user name and
password works fine. Here is the section in httpd-ssl.conf where I am
experimenting
<Directory "/usr/local/apache2/htdocs">
Options Indexes FollowSymLinks MultiViews
SSLVerifyClient require
SSLVerifyDepth 1
SSLCACertificatePath "conf/certs"
SSLCACertificateFile "conf/certs/cwsca.crt"
AuthType Basic
AuthName "CoreWafer"
AuthUserFile /usr/local/apache2/conf/passwd/passwords
AuthGroupFile /usr/local/apache2/conf/passwd/groups
Require group CoreWafer
Order allow,deny
Allow from all
</Directory>
If I disable:
SSLVerifyClient require
SSLVerifyDepth 1
SSLCACertificatePath "conf/certs"
SSLCACertificateFile "conf/certs/cwsca.crt"
then prompting for user name and password works fine. If I disable:
AuthType Basic
AuthName "CoreWafer"
AuthUserFile /usr/local/apache2/conf/passwd/passwords
AuthGroupFile /usr/local/apache2/conf/passwd/groups
Require group CoreWafer
then using the client certificate works fine. It is when I try to use
both, that is the client certificate and the password when I get into
trouble.
I came a cross kx509 Web Authentication at:
http://www.dice.inf.ed.ac.uk/groups/services/web/docs/kx509.html
that appears to be doing exactly what I wanted, which is, first use the
client certificate to open ssl channel and then prompt for user name and
password. However, they are using module mod_auth_ssl.c that I was not
able to track down anywhere on the Internet. Also it appears that that
module maybe for Apache 1.3 and not for Apache 2.
Any ideas/comments can this be done and how?
Thank you very much,
Shakti
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] SSL and Basic Authentication
Posted by Shakti <co...@ea-world.com>.
Joshua Slive wrote:
> On Tue, Apr 15, 2008 at 3:57 PM, Shakti <co...@ea-world.com> wrote:
>
>
>> [Tue Apr 15 13:21:31 2008] [info] Faking HTTP Basic Auth header:
>> "Authorization: Basic
>> L0M9VVMvU1Q9TmV3IE1leGljby9PPUNvcmUgV2Ffh98rh9q3fq038nv8r8qhe9rgheXMgQWJxL0NOPUNvcmVXYWZlclN5c3RlbXMvZW1haWxBZGRyZXNzPWVhcmxAY29yZXdhZmVyLmNvbTpwYXNzd29yZA=="
>>
>
> Check your SSLOptions directive. You seem to have FakeBasicAuth
> enabled, which will certainly mess-up real basic auth.
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.or
Hi Joshua,
Hey it WORKS, I removed FakeBasicAuth from options, since that was
default setting, and it works.
Thank you very much,
Shakti
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] SSL and Basic Authentication
Posted by Joshua Slive <jo...@slive.ca>.
On Tue, Apr 15, 2008 at 3:57 PM, Shakti <co...@ea-world.com> wrote:
> [Tue Apr 15 13:21:31 2008] [info] Faking HTTP Basic Auth header:
> "Authorization: Basic
> L0M9VVMvU1Q9TmV3IE1leGljby9PPUNvcmUgV2Ffh98rh9q3fq038nv8r8qhe9rgheXMgQWJxL0NOPUNvcmVXYWZlclN5c3RlbXMvZW1haWxBZGRyZXNzPWVhcmxAY29yZXdhZmVyLmNvbTpwYXNzd29yZA=="
Check your SSLOptions directive. You seem to have FakeBasicAuth
enabled, which will certainly mess-up real basic auth.
Joshua.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] SSL and Basic Authentication
Posted by Shakti <co...@ea-world.com>.
Joshua Slive wrote:
> On Tue, Apr 15, 2008 at 1:56 PM, Shakti <co...@ea-world.com> wrote:
>
>> Hi,
>>
>> I am new to the apache and need help with ssl authentication. I have
>> compiled apache2 on Mac OS X. Configured it with basic authentication and
>> that worked fine. I enabled ssl and that worked fine. Then I generated
>> certificates for the server and clients, installed certificates in client's
>> browsers and that worked OK too.
>>
>> Then I tried to combine certificate authentication with basic
>> authentication and that is were I run into a problem. I am not sure if that
>> is possible to do? When I do that I get normal prompt form the server to
>> accept the certificate, them the user name and password prompt. I type the
>> user name and password, but then it comes again and again and prompts me for
>> the user name and password over and over again.
>>
>> When I do not use client certificate, then typing the user name and
>> password works fine. Here is the section in httpd-ssl.conf where I am
>> experimenting
>>
>> <Directory "/usr/local/apache2/htdocs">
>> Options Indexes FollowSymLinks MultiViews
>> SSLVerifyClient require
>> SSLVerifyDepth 1
>> SSLCACertificatePath "conf/certs"
>> SSLCACertificateFile "conf/certs/cwsca.crt"
>>
>> AuthType Basic
>> AuthName "CoreWafer"
>> AuthUserFile /usr/local/apache2/conf/passwd/passwords
>> AuthGroupFile /usr/local/apache2/conf/passwd/groups
>> Require group CoreWafer
>>
>> Order allow,deny
>> Allow from all
>> </Directory>
>>
>> If I disable:
>>
>> SSLVerifyClient require
>> SSLVerifyDepth 1
>> SSLCACertificatePath "conf/certs"
>> SSLCACertificateFile "conf/certs/cwsca.crt"
>>
>> then prompting for user name and password works fine. If I disable:
>>
>> AuthType Basic
>> AuthName "CoreWafer"
>> AuthUserFile /usr/local/apache2/conf/passwd/passwords
>> AuthGroupFile /usr/local/apache2/conf/passwd/groups
>> Require group CoreWafer
>>
>> then using the client certificate works fine. It is when I try to use both,
>> that is the client certificate and the password when I get into trouble.
>>
>
> I'm not an expert in this stuff, but I'd suggest
> 1. Move SSLVerifyDepth out of the <Directory> section. According to
> the docs, this will force a renegotiation when placed there. (And you
> are just repeating the default anyway, so you can probably remove it
> entirely.)
> 2. Tell us what the error log says and what you are seeing in the access log.
>
> Joshua.
>
Hi
Thank you for your reply. I have follow your suggestion and removed
SSLVerifyDepth. Then cleared all logs, started the server and saved all
log files during each step so that all logs can be seen. I have put them
into one file (attached here) with comment indicating what steps have
been accomplish after each entry in a log file.
I can not deduce anything from these longs?
Thank you,
Shakti
Re: [users@httpd] SSL and Basic Authentication
Posted by Joshua Slive <jo...@slive.ca>.
On Tue, Apr 15, 2008 at 1:56 PM, Shakti <co...@ea-world.com> wrote:
> Hi,
>
> I am new to the apache and need help with ssl authentication. I have
> compiled apache2 on Mac OS X. Configured it with basic authentication and
> that worked fine. I enabled ssl and that worked fine. Then I generated
> certificates for the server and clients, installed certificates in client's
> browsers and that worked OK too.
>
> Then I tried to combine certificate authentication with basic
> authentication and that is were I run into a problem. I am not sure if that
> is possible to do? When I do that I get normal prompt form the server to
> accept the certificate, them the user name and password prompt. I type the
> user name and password, but then it comes again and again and prompts me for
> the user name and password over and over again.
>
> When I do not use client certificate, then typing the user name and
> password works fine. Here is the section in httpd-ssl.conf where I am
> experimenting
>
> <Directory "/usr/local/apache2/htdocs">
> Options Indexes FollowSymLinks MultiViews
> SSLVerifyClient require
> SSLVerifyDepth 1
> SSLCACertificatePath "conf/certs"
> SSLCACertificateFile "conf/certs/cwsca.crt"
>
> AuthType Basic
> AuthName "CoreWafer"
> AuthUserFile /usr/local/apache2/conf/passwd/passwords
> AuthGroupFile /usr/local/apache2/conf/passwd/groups
> Require group CoreWafer
>
> Order allow,deny
> Allow from all
> </Directory>
>
> If I disable:
>
> SSLVerifyClient require
> SSLVerifyDepth 1
> SSLCACertificatePath "conf/certs"
> SSLCACertificateFile "conf/certs/cwsca.crt"
>
> then prompting for user name and password works fine. If I disable:
>
> AuthType Basic
> AuthName "CoreWafer"
> AuthUserFile /usr/local/apache2/conf/passwd/passwords
> AuthGroupFile /usr/local/apache2/conf/passwd/groups
> Require group CoreWafer
>
> then using the client certificate works fine. It is when I try to use both,
> that is the client certificate and the password when I get into trouble.
I'm not an expert in this stuff, but I'd suggest
1. Move SSLVerifyDepth out of the <Directory> section. According to
the docs, this will force a renegotiation when placed there. (And you
are just repeating the default anyway, so you can probably remove it
entirely.)
2. Tell us what the error log says and what you are seeing in the access log.
Joshua.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org