As caillte pointed out, using a database is really the only way to go. CSV files, DBM files, or plain-text files of any variety are very easy to hack around with, but they are hard to scale, especiaally under a deadline. Unless you're doing a five minute hack that will be used only once or twice, it is best to do it properly the first time, which once you get used to it isn't that much harder anyway.

There are DBD (Database Drivers) for Perl for nearly every DB that you can think of, and a few you probably wouldn't want to. Informix, Oracle, MySQL, ODBC, Solid, Interbase, the list is pretty large, so you can pick whatever you have access to. MySQL is good because it is Open Source, and runs just as well on NT as it does on UNIX. You can even purchase a support contract on it, which is an important factor when trying to convince IT to use it.

Regarding "unprivileged users", this is easy to implement using a database as a conduit to pass information:
Web <---> CGI <---> SQL <---> "Priviledged" User App DB Process
The CGI can handle login access verification and basic security. The "Priviledged" process can handle the actual special work, taking its command from the configuration in the database. You can add extra security by using SSL, restricting access to the CGI application itself, and more. The system user that runs the Web server (i.e. 'nobody') just needs read/write access to the SQL database, and you can even limit that further using SQL access control methods (i.e. 'SELECT' and 'UPDATE' but not 'INSERT')

The configuration is managed from a central database, so the process itself can read and re-read its config from this database on demand, or on a regular schedule.

For simplicity, if you tie the DB to a hash, merely putting stuff in the hash in one program, will make it instantly available to another using the same table. If you are new to SQL, this is by far the easiest way to get going.

In reply to Re: Web-based configuration and secure data storage by tadman
in thread Web-based configuration and secure data storage by dash2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.