[XQZone General] Strategies for pseudo-cron jobs w/ CIS?
Raffaele Sena
raff at aromatic.org
Mon Jan 10 13:36:09 PST 2005
The other option is to use XDBC, but you would still have to run your
application from a cron job (unless you want to create a "daemon").
You cold write your app in Java, PHP or Perl. You could set the
authentication to "digest" if you worry about password in clear (the Java
and PHP drivers should support digest. I think the Perl driver has not been
updated yet). On the other side I am pretty shure there is some Perl package
available that would let you create a daemon with 2 lines of perl :)
I don't know how to solve the security issues since you still will have to
have a user and password stored somewhere and when you run the script the
login will succeed (but maybe there is a way to check if your script is
really running as a daemon and only query CIS in that case only).
(on Windows you can substitute the word "daemon" with "service" and I am
sure there are plenty of packages that let you create quick and dirty Window
services).
-- Raffaele
-----Original Message-----
From: general-bounces at xqzone.marklogic.com
[mailto:general-bounces at xqzone.marklogic.com] On Behalf Of David Sewell
Sent: Monday, January 10, 2005 9:13 AM
To: General XQZone Discussion
Subject: [XQZone General] Strategies for pseudo-cron jobs w/ CIS?
What systems do people have for running CIS XQuery programs on a regular
basis?
For example, suppose one wants to back up certain database files to the
filesystem on a daily basis. One procedure would be (I'm assuming a
Unix/Linux host here):
1. Create a CIS user called "backup".
2. Write an XQuery backup script that checks incoming IP address and
logs user in as "backup" if incoming IP address = local host.
3. Amp the backup script with permissions needed to access database
files and write to filesystem.
4. Add a system cron job entry that uses an HTTP-fetching program like
wget to call the script.
There are some obvious security issues with this approach. Anyone logged
on to the local host could run the script if they knew about it. (The
alternative, putting an explicit line xdmp:login('backup','password'),
in the XQuery script and making that script readable only by root, has
its own security issues.)
What are some other ways of accomplishing this? (Besides remembering to
run the script manually every day...)
--
David Sewell, Editorial and Technical Manager
Electronic Imprint, The University of Virginia Press
PO Box 400318, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell at virginia.edu Tel: +1 434 924 9973
Web: http://www.ei.virginia.edu/
_______________________________________________
General mailing list
General at xqzone.marklogic.com
http://xqzone.com/mailman/listinfo/general
!DSPAM:41e2acaa256368676919502!
More information about the General
mailing list