Rick Hillegas (JIRA) wrote:
[ https://issues.apache.org/jira/browse/DERBY-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464229 ]
Rick Hillegas commented on DERBY-2109:
--------------------------------------

Thanks for helping me puzzle through these issues, Dan. Here are some more 
thoughts triggered by your last comments:

I think we need to be cautious as we start talking about roles. As I understand 
the javadoc, a Subject is a set of identities (that is, a set of Principals). A 
role, however, is a set of privileges--at least that's how ANSI models it. I 
think we will get into trouble if we mix these concepts together. That's one 
thought.

It sounds like Subject maps much better the concept of Group than Role. Normally you assign individuals (Principals) and groups (Subjects) to roles. Then you assign privileges to roles.

David


Here's another: The idea that a person (a Subject) has multiple identities is 
very thought-provoking. Each of these identities may be granted permissions to 
perform work in some domain where that identity makes sense. Permissions are 
not granted to Subjects. They are granted to identities (Principals). So if you 
operate in multiple domains, you may need to be granted permissions as multiple 
Principals.

I think that when a person connects to Derby (and passes authentication), they 
get a database identity, which is essentially their authorizationID. This 
database identity is in addition to whatever other identities they may have in 
the external authentication system. The external identities may be useful some 
day--for instance, the policy file may want to grant network permissions to 
these identities so that they can do work inside customer-written dbprocs. 
However, for our purposes today, it makes sense to me that Derby-specific 
permissions should be granted to database identities, that is, to 
DatabasePrincipals.

So I'm wondering whether we need, right now, to beef up UserAuthenticator with 
a getPrincipal() or new authenticatUser() overload. We may need to do that in 
the future to help customers grant identity-conscious permissions to dbprocs. 
But it's not clear to me that we need this machinery now.


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).

Reply via email to