cURL / Mailing Lists / curl-users / Single Mail

curl-users

http authentication is not working..

From: Michael March <mmarch_at_gmail.com>
Date: Wed, 9 Dec 2009 14:43:48 -0700

Normal auth via a browser works fine:

lappy:HUDSON mmarch$ curl -u foo-user:bar-pass https://addressbook.acme.com

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.2.3 (Red Hat) Server at addressbook.acme.com Port 80</address>
</body></html>

.... and if this helps here is the part of the Apache conf that
enforces the authentication:

<VirtualHost *:80>
  ServerName addressbook.acme.com
  RewriteEngine On
  RewriteCond %{SERVER_PORT} !^443$
  RewriteRule ^/(.*)$ https://%{SERVER_NAME}/$1 [L,R]
  AllowEncodedSlashes on
</VirtualHost>

<VirtualHost *:443>
  ServerName addressbook.acme.com
  ServerAdmin helpdesk_at_acme.com
  DocumentRoot /var/www/docs/addressbook.acme.com/
  ErrorLog logs/addressbook.acme.com-error_log
  CustomLog logs/addressbook.acme.com-access_log common
  <Location />
     AuthType Basic
     AuthName "Login with your Acme ID"
     #AuthLDAPEnabled on
     AuthBasicProvider ldap
     AuthLDAPURL ldap://192.168.10.12:389/ou=People,dc=acme,dc=com
     AuthLDAPBindDN uid=helpdesk,ou=People,dc=acme,dc=com
     AuthLDAPBindPassword foobarfoobar
     require ldap-group cn=employees,ou=groups,dc=acme,dc=com
  </Location>
</VirtualHost>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-09