Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 72883 invoked from network); 20 Feb 2007 18:07:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2007 18:07:15 -0000 Received: (qmail 41142 invoked by uid 500); 20 Feb 2007 18:07:22 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 40862 invoked by uid 500); 20 Feb 2007 18:07:21 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 40851 invoked by uid 99); 20 Feb 2007 18:07:21 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 10:07:21 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.18.42.249] (HELO nwk-ea-fw-1.sun.com) (192.18.42.249) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 10:07:09 -0800 Received: from d1-sfbay-09.sun.com ([192.18.39.119]) by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l1KI6jkx019357 for ; Tue, 20 Feb 2007 10:06:45 -0800 (PST) Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JDR00901WSD6000@d1-sfbay-09.sun.com> (original mail from Richard.Hillegas@Sun.COM) for derby-user@db.apache.org; Tue, 20 Feb 2007 10:06:45 -0800 (PST) Received: from [192.9.61.161] by d1-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JDR00MV4WZ7BKU0@d1-sfbay-09.sun.com> for derby-user@db.apache.org; Tue, 20 Feb 2007 10:06:45 -0800 (PST) Date: Tue, 20 Feb 2007 10:06:30 -0800 From: Rick Hillegas Subject: Re: Security in Derby In-reply-to: Sender: Richard.Hillegas@Sun.COM To: Derby Discussion Message-id: <45DB38A6.40906@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: User-Agent: Thunderbird 1.5.0.5 (X11/20060828) X-Virus-Checked: Checked by ClamAV on apache.org Hi Alexander, In terms of using a Java Security Manager, there will be better out-of-the-box support for a secure network server in the next feature release (10.3). That work is tracked by https://issues.apache.org/jira/browse/DERBY-2196. Right now, you can grab a generic policy file from the development codeline at java/drda/org/apache/derby/drda/server.policy. I will mouse that file into my reply. You will need to customize some variables in that file in order to fit it to your particular environment. I hope this helps. Here's the moused-in server policy file: grant codeBase "${derby.install.url}derby.jar" { // // These permissions are needed for everyday, embedded Derby usage. // permission java.lang.RuntimePermission "createClassLoader"; permission java.util.PropertyPermission "derby.*", "read"; permission java.io.FilePermission "${derby.system.home}","read"; permission java.io.FilePermission "${derby.system.home}${/}-", "read,write,delete"; // // This permission lets you backup and restore databases // to and from arbitrary locations in your file system. // // This permission also lets you import/export data to and from // arbitrary locations in your file system. // // You may want to restrict this access to specific directories. // permission java.io.FilePermission "<>", "read,write,delete"; }; grant codeBase "${derby.install.url}derbynet.jar" { // // This permission lets the Network Server manage connections from clients. // permission java.net.SocketPermission "${derby.drda.host}:*", "accept"; }; Alexander Trauzzi wrote: > Greetings to all the Derbites in mailing list land. I have a rather > simple, but potentially complicated question. > > I grabbed a copy of the latest derby-bin distribution. I ran the > scripts required to run it as a network server, just as a quick little > test in the console. > > The first concern I have is that anyone seems to have the ability to > connect to my server and create databases? > I did a bit of searching with Google and also within the derby site > and came up with all kinds of very complicated and confusing > recommendations to "secure" a server. Some were in the manual, > referring to authentication, others involved using a Java security > manager. Neither of which were explained in such a way that I could > easily absorb or put into practical use. Especially the Java security > manager. > > Is there any resource that is straightforward, concise and simple that > can help me set up a derby network server that authenticates based on > username/password pairs? I'm talking MySQL-easy (anyone can set up a > MySQL server!). > > Thank you to all who reply... > > - Alexander Trauzzi