[24609] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6785 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 9 18:10:32 2004

Date: Fri, 9 Jul 2004 15:10:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 9 Jul 2004     Volume: 10 Number: 6785

Today's topics:
    Re: Secure Database Systems <jm@zzzzzzzzzzzz.com>
    Re: Secure Database Systems <jm@zzzzzzzzzzzz.com>
    Re: Secure Database Systems (Gordon Burditt)
    Re: Secure Database Systems <maustin@firstdbasource.com>
    Re: what do you call funct ( funct()) <nilram@hotpop.com>
    Re: XSLT Transformation <axel@strube-zettler.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 09 Jul 2004 18:54:01 GMT
From: Randy Lawrence <jm@zzzzzzzzzzzz.com>
Subject: Re: Secure Database Systems
Message-Id: <dRBHc.34815$eH1.16477912@newssvr28.news.prodigy.com>

Sarah Tanembaum wrote:
> I was wondering if it is possible to create a secure database system
> using RDBMS(MySQL, Oracle, SQL*Server, PostgreSQL etc) and web
> scripting/programming language(Perl, PHP, Ruby, Java, ASP, etc) combination?
> 
> I have the following in mind:
> 
> I wanted to store all my( and my brothers and sisters) important
> document
> information such as birth certificate, SSN, passport number, travel
> documents, insurance(car, home, etc) document, and other important
> documents
> imagined in the database.
> 
> The data will be entered either manually and/or scanned(with OCR). I
> need to
> be able to search on all the fields in the database.
> 
> We have 10 computers(5bros, 4sisters, and myself) plus 1 server with I
> maintained. The data should be synchronize/replicate between those
> computers.
> 
> Well, so far it is easy, isn't it?
> 
> Here's my question:
> 
> a) How can I make sure that it secure so only authorized person can
> modify/add/delete the information? Beside transaction logs, are there
> any
> other method to trace any transaction(kind of paper trail)?
> 
> Assuming there are 3 step process to one enter the info e.g:
> - One who enter the info (me)
> - One who verify the info(the owner of info)
> - One who verify and then commit the change!
> How can I implement such a process in RDBMS and/or PHP or any  other web
> language?
> 
> b) How can I make sure that no one can tap the info while we are
> entering
> the data in the computer? (our family are scattered within US and
> Canada)
> 
> c) Is it possible to securely synchronize/replicate between our
> computers
> using VPN? Does RDBMS has this functionality by default?
> 
> d) Other secure method that I have not yet mentioned.
> 
> Anyone has good ideas on how to implement such a systems?
> 
> Thanks
> 
> 
> 

Some suggestions:

1.  Use 2-factor authentication.  So if a password gets stolen, it isn't 
enough by itself to access data.

2.  Use 128-bit encryption for storage using secure algorithm (blowfish, 
twofish or AES.

3.  Use 128-bit encryption for communication.

4.  Use secure key exchange protocols.

5.  Use secure key generation algorithm.

6.  Use digital signatures and public-key encryption where appropriate. 
  Client should authenticate server and server should authenticate 
client to eliminate man-in-the-middle attacks.

7.  Take a look at Groove.net products to see how they designed their 
secure p2p shared-workspace applications.

8.  Use firewalls to restrict access to communication ports based on IP 
addresses or range of addresses or ip countries.  Why allow access from 
Chinese or Russian IP addresses if all your family members are in USA? ;)

IMHO, the openssl interface in Ruby 1.8.1-snapshot makes this fairly 
easy to do compared to other scripting languages.


------------------------------

Date: Fri, 09 Jul 2004 18:55:08 GMT
From: Randy Lawrence <jm@zzzzzzzzzzzz.com>
Subject: Re: Secure Database Systems
Message-Id: <gSBHc.34817$eH1.16478070@newssvr28.news.prodigy.com>

Sarah Tanembaum wrote:

> I was wondering if it is possible to create a secure database system
> using RDBMS(MySQL, Oracle, SQL*Server, PostgreSQL etc) and web
> scripting/programming language(Perl, PHP, Ruby, Java, ASP, etc) combination?
> 
> I have the following in mind:
> 
> I wanted to store all my( and my brothers and sisters) important
> document
> information such as birth certificate, SSN, passport number, travel
> documents, insurance(car, home, etc) document, and other important
> documents
> imagined in the database.
> 
> The data will be entered either manually and/or scanned(with OCR). I
> need to
> be able to search on all the fields in the database.
> 
> We have 10 computers(5bros, 4sisters, and myself) plus 1 server with I
> maintained. The data should be synchronize/replicate between those
> computers.
> 
> Well, so far it is easy, isn't it?
> 
> Here's my question:
> 
> a) How can I make sure that it secure so only authorized person can
> modify/add/delete the information? Beside transaction logs, are there
> any
> other method to trace any transaction(kind of paper trail)?
> 
> Assuming there are 3 step process to one enter the info e.g:
> - One who enter the info (me)
> - One who verify the info(the owner of info)
> - One who verify and then commit the change!
> How can I implement such a process in RDBMS and/or PHP or any  other web
> language?
> 
> b) How can I make sure that no one can tap the info while we are
> entering
> the data in the computer? (our family are scattered within US and
> Canada)
> 
> c) Is it possible to securely synchronize/replicate between our
> computers
> using VPN? Does RDBMS has this functionality by default?
> 
> d) Other secure method that I have not yet mentioned.
> 
> Anyone has good ideas on how to implement such a systems?
> 
> Thanks
> 
> 
> 

One more thing...ssh tunneling is your best friend.  If the 
communication protocols available in your RDBMS server or client aren't 
sufficiently secure, simply using SSH tunneling.


------------------------------

Date: 9 Jul 2004 20:09:29 GMT
From: gordonb.zirtz@burditt.org (Gordon Burditt)
Subject: Re: Secure Database Systems
Message-Id: <ccmu1p$uvo@library1.airnews.net>

>I was wondering if it is possible to create a secure database system
>using RDBMS(MySQL, Oracle, SQL*Server, PostgreSQL etc) and web
>scripting/programming language(Perl, PHP, Ruby, Java, ASP, etc) combination?

It depends on how you define 'secure' and what your security policy
is.  For example, MySQL allows database connections to be encrypted
with SSL.  I suspect that some of the others do also.  Also, most
web servers can be set up in a configuration that supports https.
And pretty much every web browser supports https.

>I have the following in mind:
>
>I wanted to store all my( and my brothers and sisters) important
>document
>information such as birth certificate, SSN, passport number, travel
>documents, insurance(car, home, etc) document, and other important
>documents
>imagined in the database.

Why is this not several SEPARATE databases?

>The data will be entered either manually and/or scanned(with OCR). I
>need to
>be able to search on all the fields in the database.

Do you actually have a program that does decent OCR of handwriting,
starting from images?  It would be useful to be able to take a bunch
of scanned cancelled checks and search for, say, "Auto insurance"
(a comment I'd probably write on the memo line of the check).

It is very difficult to get anything useful out of searching images
stored as binary blobs in a database table.

>We have 10 computers(5bros, 4sisters, and myself) plus 1 server with I
>maintained. The data should be synchronize/replicate between those
>computers.

MySQL allows replication between different servers, again with SSL
for the replication connection.  Generally, though, changes need to
be entered at the master.

>Well, so far it is easy, isn't it?
>
>Here's my question:
>
>a) How can I make sure that it secure so only authorized person can
>modify/add/delete the information? Beside transaction logs, are there
>any
>other method to trace any transaction(kind of paper trail)?

Who's an authorized person?
At what granularity do you need the access controls?  For example,
MySQL has access controls on individual table columns, so a specific
person (database login) may be allowed read-write, read, or no
access to the 'SSN' column.  However, I do not believe it has any
kind of access restrictions that would allow one to read and alter
the SSN in THEIR OWN RECORD ONLY.  If you put each person's data
in different tables, or different databases, that would make access
control better, but it makes it harder to search for things like
"whose wills are kept by <name of attorney>"?

It is possible for PHP to access the data using its own database
login (for which it will likely have near-full privileges), and let
the PHP code enforce restrictions like "a user may see only his own
SSN".  PHP would have its own set of web users (with their own
passwords, privileges, etc. enforced by PHP but with the info kept
in the database).  This does mean, however, that anyone with PHP's
database login gets to see all the data.  It also means that the
PHP code that enforces the security rules could leak information
if the security policy is not implemented correctly.  And implementing
all that PHP code CORRECTLY takes work.

A suggestion for your PHP web pages:  log the time, date, IP address
the request came from, user name (or other form identifying the
requester), whether the password was correct (log the bad attempts
too!), what they accessed, and what they changed, and what the old
values of the changed fields were.

MySQL has query logs (however, if there is one database user, PHP,
for all the web page users, it will not log which query was made
on behalf of who).  Your PHP application can log what screens who
viewed and what changes were entered.  This takes WORK.  PHP will
not do all that logging itself automatically.


>Assuming there are 3 step process to one enter the info e.g:
>- One who enter the info (me)

Now, right here, you've got a security problem.  You see all the data.
And you shouldn't.

>- One who verify the info(the owner of info)
>- One who verify and then commit the change!

For a multi-step process like this you need some place in the database
to store pending changes.  What is your access policy for THOSE?
Can I, who entered the data, see the data I entered while it is waiting
for the owner of the data to approve it?

>How can I implement such a process in RDBMS and/or PHP or any  other web
>language?
>
>b) How can I make sure that no one can tap the info while we are
>entering
>the data in the computer? (our family are scattered within US and
>Canada)

Use SSL web pages (https).  SSL between the web server and the
database matters less if the web server and the database are on the
same machine or on a local LAN, and direct access to the database
is not allowed except on the same machine or within the local LAN.
But SSL between the web server and various users' browsers all over
the continent is a must.  Even if you use a VPN, browsers tend to
take better care of SSL data (like not leaving it around in a cache).

>c) Is it possible to securely synchronize/replicate between our
>computers
>using VPN? Does RDBMS has this functionality by default?

VPN is typically not a feature of a RDBMS (neither is "wireless
802.11g", or DSL, or IP over Avian Carriers - a RDBMS typically
runs over IP, and a VPN uses some means to transport IP securely).
A RDBMS that can replicate over the net should be able to transparently
replicate over a VPN if you set up the VPN to encrypt all traffic.
There is nothing inherently wrong with using multiple security
layers (e.g. https over IPSEC over SSH tunnel over WEP-enabled
802.11g, although this is a bit extreme) unless the overhead just
gets to be unacceptable.

MySQL supports replication over a SSL database connection, by itself
without needing to install a VPN.  (Having both is not an unreasonable
choice, though).

Is there a need for users of this database to access data on the
road, away from their VPNs?  For example, several family members
are on a trip, there's an accident, and one of them urgently needs
medical history information for one of the others.


>d) Other secure method that I have not yet mentioned.

Another thing to think of is encrypting data *IN* the database, and
if you do that, how you manage keys.  Presumably some of this info
is being kept to ensure that it is available if the owner of the
data dies, which may make this option less desirable.

>Anyone has good ideas on how to implement such a systems?

First, you need to decide on your security policy (especially the part about
legitimate users snooping on other legitimate users data).  You also need to
decide what functions are needed.  A RDBMS can generally "search on anything"
but a web page, unless it lets you enter an arbitrary SQL query, usually doesn't.

					Gordon L. Burditt


------------------------------

Date: Fri, 09 Jul 2004 20:58:02 GMT
From: Michael Austin <maustin@firstdbasource.com>
Subject: Re: Secure Database Systems
Message-Id: <uFDHc.931$AX6.131@newssvr22.news.prodigy.com>

Sarah Tanembaum wrote:
> I was wondering if it is possible to create a secure database system
> using RDBMS(MySQL, Oracle, SQL*Server, PostgreSQL etc) and web
> scripting/programming language(Perl, PHP, Ruby, Java, ASP, etc) combination?
> 
> I have the following in mind:
> 
> I wanted to store all my( and my brothers and sisters) important
> document
> information such as birth certificate, SSN, passport number, travel
> documents, insurance(car, home, etc) document, and other important
> documents
> imagined in the database.


they are actually going to allow you to do this??  I certainly 
wouldn't... because if you didn't do it right, all of you would be 
subject to identity theft.

<snippage>

Michael Austin.


------------------------------

Date: 09 Jul 2004 15:54:43 -0500
From: Dale Henderson <nilram@hotpop.com>
Subject: Re: what do you call funct ( funct())
Message-Id: <87hdsgnbos.fsf@camel.tamu-commerce.edu>

>>>>> "JM" == Josef Moellers <josef.moellers@fujitsu-siemens.com> writes:

    JM> Ken Sington wrote:
    >> Josef Moellers wrote:
    >>> Ken Sington wrote:
    >> ...  ...
    >> 
    >>>  orthogonality?
    >>> 
    >> I almost dismissed it. never knew there was such a word.  I
    >> looked it up in the dictionary: ...sum of two products...  then
    >> google.com, and found lots of references to mathmatics.

    JM> Yes, in mathematics I'd read it as being "at right angles" or
    JM> whatever linear algebra makes out of that. 
     
     "at right angles" is a fair description. The most technical
     definition is that the inner product (dot product) of two vectors
     is zero.

     And since inner product and vector have very broad definitions so
     to can orthogonality. For example:

     If f,g are real-valued functions over the reals (i.e. f:R->R
     g:R->R). 

     We can defined the inner product:

     <f,g>=\int_R f(x)g(x) dx where \int_R is the integral over all
     real numbers that is from -infinity to infinity.

     So that f,g are orthogonal if <f,g>=0.

      

    JM> It then also bears the notion of two vectors being independent
    JM> of each other so they span a plane where you can construct
    JM> points out of both vectors independently, which probably led
    JM> to the adoption of this term in CS:


     Vectors needn't be orthogonal to be linearly independent. For
     example (0,1) and (1,1) are linearly independent and span the
     plane but are not orthogonal, <(0,1),(1,1)>=1!=0.

     This is all WAY off topic and further discussion should be moved
     to sci.math.

-- 
Dale Henderson 

"Imaginary universes are so much more beautiful than this stupidly-
constructed 'real' one..."  -- G. H. Hardy


------------------------------

Date: Fri, 09 Jul 2004 21:39:35 +0200
From: Axel Strube-Zettler <axel@strube-zettler.de>
Subject: Re: XSLT Transformation
Message-Id: <2l8ag2F9jss8U1@uni-berlin.de>

Axel Strube-Zettler wrote:

Thanks to all, I am happy now. XML::XSLT is not installed on the server 
(it's just a Pro Webspace Package of Germany's largest Provider Company, 
    I myself can't install anything), but I found out that LibXSLT is 
installed. It just took me 5 minutes to get it working - not really 
difficult;-)

Great! Now the pages are displayed in Opera and older Browsers too!

Thank you for the excellent help! Axel



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 6785
***************************************


home help back first fref pref prev next nref lref last post