Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44134 invoked from network); 16 Jan 2007 22:03:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jan 2007 22:03:49 -0000 Received: (qmail 65709 invoked by uid 500); 16 Jan 2007 22:03:55 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 65669 invoked by uid 500); 16 Jan 2007 22:03:55 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 65655 invoked by uid 99); 16 Jan 2007 22:03:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jan 2007 14:03:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jan 2007 14:03:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C8D357141D1 for ; Tue, 16 Jan 2007 14:03:27 -0800 (PST) Message-ID: <22999666.1168985007820.JavaMail.jira@brutus> Date: Tue, 16 Jan 2007 14:03:27 -0800 (PST) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2109) System privileges In-Reply-To: <5831879.1164211141923.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465306 ] Rick Hillegas commented on DERBY-2109: -------------------------------------- I agree that a DatabasePrincipal should encode both the database name and the authorization id inside that database. It is interesting that the same authorization id can have different credentials depending on the connected database. I don't know what the terms-of-art here are, but for the rest of this discussion, I'm going to use the following nomenclature: systemWideID - This is a user name that is authenticated with databaseName = null. databaseScopedID - This is a user name that is authenticated with a non-null databaseName. It is interesting that we authenticate the user twice when creating a database. First we authenticate with a systemWideID. If that succeeds, we create the database and mark that authorization id as the database owner. Then we re-authenticate the user as a databaseScopedID, using the same credentials. Clearly this assumes that at bootstrap time, the same credentials will work for the systemWideID and the databaseScopedID. The policy file syntax for Principals is a little limited. That is, you're only allowed to declare one argument to your Principal's constructor. This means that we have to glue together the authorization id and database name. Maybe we can model this on the names used for KerberosPrincipal. Those names are of the form userName@realm. I don't know if the @ is going to be a nuisance. Any separator we choose will have escaping problems and @ may be particularly annoying to customers who want their authorization ids to be email addresses. But here's what it would look like: # this is a systemWideID grant principal org.apache.derby.authentication.DatabasePrincipal "fred" ... # this is a databaseScopedID grant principal org.apache.derby.authentication.DatabasePrincipal "fred@fredsDB" ... # this systemWideID is an email address grant principal org.apache.derby.authentication.DatabasePrincipal "fred@@comcast.net" ... # this databaseScopedID is an email address grant principal org.apache.derby.authentication.DatabasePrincipal "fred@@comcast.net@fredsDB" ... I think that the create-database privilege should be granted to systemWideIDs for the following reasons: 1) The actual database creation today depends on whether we can authenticate the systemWideID, not the databaseScopedID. 2) This is a generic privilege which is not bound to a particular database name. I think that the engine-shutdown privilege is also a systemWideID. So for this first release, I think we only need systemWideIDs--although the user guides should explain the implications of escaping @. > System privileges > ----------------- > > Key: DERBY-2109 > URL: https://issues.apache.org/jira/browse/DERBY-2109 > Project: Derby > Issue Type: New Feature > Components: Security > Affects Versions: 10.3.0.0 > Reporter: Rick Hillegas > Fix For: 10.3.0.0 > > Attachments: systemPrivs.html, systemPrivs.html > > > Add mechanisms for controlling system-level privileges in Derby. See the related email discussion at http://article.gmane.org/gmane.comp.apache.db.derby.devel/33151. > The 10.2 GRANT/REVOKE work was a big step forward in making Derby more secure in a client/server configuration. I'd like to plug more client/server security holes in 10.3. In particular, I'd like to focus on authorization issues which the ANSI spec doesn't address. > Here are the important issues which came out of the email discussion. > Missing privileges that are above the level of a single database: > - Create Database > - Shutdown all databases > - Shutdown System > Missing privileges specific to a particular database: > - Shutdown that Database > - Encrypt that database > - Upgrade database > - Create (in that Database) Java Plugins (currently Functions/Procedures, but someday Aggregates and VTIs) > Note that 10.2 gave us GRANT/REVOKE control over the following database-specific issues, via granting execute privilege to system procedures: > Jar Handling > Backup Routines > Admin Routines > Import/Export > Property Handling > Check Table > In addition, since 10.0, the privilege of connecting to a database has been controlled by two properties (derby.database.fullAccessUsers and derby.database.defaultConnectionMode) as described in the security section of the Developer's Guide (see http://db.apache.org/derby/docs/10.2/devguide/cdevcsecure865818.html). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira