Solved

Authentication Help

Posted on 2004-08-19
11
187 Views
Last Modified: 2010-03-04
What is the best practice to authenticate my cgi scripts?

I am currently using the .htaccess file to protect my html files.

I have all of my cgi scripts in the /cgi-bin/ & would like to authenticate.
0
Comment
Question by:Cleavis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 15

Expert Comment

by:periwinkle
ID: 11845849
By 'authenticate', do you mean password protect?  You can use .htaccess password protection to do this - you'd add a .htaccess file to the /cgi-bin directory that required a login of a username and password prior to delivering the files...
0
 

Author Comment

by:Cleavis
ID: 11845930
Yes I do want to password protect. I am trying to use the .htaccess file. I would like to protect files individually.

I am using the following htaccess file & i have no success yet.

<Files manifest007.cgi>
AuthName Member
AuthType Basic
AuthUserFile /security/manifest/.htpasswd
AuthGroupFile /security/manifest/.htgroup
require group manifest_users
deny from all
satisfy any
</Files>
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 11846073
You need the full path to the files, not just the filename, I believe...
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:Cleavis
ID: 11846091
actually i just read an article on the httpd.conf file. i had allow override none for the cgi-bin  i changed that over to allow override all & this solves the problem.

Thanks for your help.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 11846122
Nope, I appear to be wrong on that one.  Instead, you'd use something like:

AuthName Member
AuthType Basic
AuthUserFile /security/manifest/.htpasswd
AuthGroupFile /security/manifest/.htgroup

<Files manifest007.cgi>
require group manifest_users
</Files>

(see:

http://httpd.apache.org/docs/mod/core.html#files
)
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 11846143
Post a comment in the community service section - they can make this a PAQ (previously asked question) and refund your points as you answered your own question :)
0
 

Author Comment

by:Cleavis
ID: 11846198
I was just going to ask you what i should do about these points.

If you include the the Auth information inside the <Files> tag you can refer to different password & group files for different cgi scripts.

I have many different groups within our organization accessing confidential files.  The file below is currently working. It will prompt for username & password each time i request one of these scripts.  

<Files manifest007.cgi>
AuthName Member
AuthType Basic
AuthUserFile /security/manifest/.htpasswd
AuthGroupFile /security/manifest/.htgroup
require group manifest_users
deny from all
satisfy any
</Files>

<Files manifest001.cgi>
AuthName Member
AuthType Basic
AuthUserFile /security/manpower/.htpasswd
AuthGroupFile /security/manpower/.htgroup
require group web_users
deny from all
satisfy any
</Files>

0
 
LVL 15

Expert Comment

by:samri
ID: 11849751
give the pts to me :))


/ request for PAQ/Refund from CommunitySupport (http://www3.experts-exchange.com/Community_Support/).   Post a 0-pts question.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 11855927
Recommendation: PAQ - refund.
0
 
LVL 2

Accepted Solution

by:
Lunchy earned 0 total points
ID: 11885562
Closed, 500 points refunded.
Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question