Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I ran into a problem when Apache uses auth for the entire web site; which authenticates over LDAP.

However, I need to be able to run a certain process which creates an HTTP request to a web service URL from Unix command line, and is executed as a system user which is NOT in LDAP.

Is it possible to somehow configure Apache to pretend that a specific URL was authenticated when it wasn't? (I don't mean turn OFF authentication - I still need to have REMOTE_USER set to correct user).

Thanks

share|improve this question

1 Answer 1

What program are you using to generate the http request? You should have that program authenticate to Apache. curl, for example, supports HTTP Basic, HTTP digest, NTLM, and GSS-Negotiate.; e.g.

curl --basic --user username:password http://example.com/webservice
share|improve this answer
    
Apache is doing LDAP auth against LDAP database. And the user is NOT in LDAP> –  Aye Mar 26 '11 at 20:32
    
What do you mean by "the user"? The user that the process making the web service request runs as on Unix? That doesn't matter, as Apache never sees that. Just have your process send Apache a username and password that is valid for a user in LDAP. Or are you saying that the web service makes use of the CGI environment variable REMOTE_USER, which is set by the Apache authentication, but you want to be able to have Apache set REMOTE_USER to an arbitrary value without actually performing any authentication? –  sciurus Mar 27 '11 at 14:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.