db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Haase (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5522) Document the NATIVE authentication scheme.
Date Fri, 09 Mar 2012 14:24:57 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kim Haase updated DERBY-5522:
-----------------------------

    Attachment: NativeAuthExampleEmbedded.java

Yup, just changing the names in the SYSCS_UTIL.SYSCS_CREATE_USER call -- nowhere else -- causes
the program to work fine:

java -cp /export/home/chaase/javadbmore/codetrunk/trunk/jars/insane/derby.jar:. NativeAuthExampleEmbedded
Trying to connect to jdbc:derby:nativeAuthEmbDB;user=mary;create=true
Connected to database jdbc:derby:nativeAuthEmbDB;user=mary;create=true
Storing some sample users in the database.
Turning on NATIVE authentication.
Value of requireAuthentication is null
Value of sqlAuthorization is null
Value of defaultConnectionMode is noAccess
Value of fullAccessUsers is sqlsam,mary
Value of readOnlyAccessUsers is guest
Closed connection
Database shut down normally
Trying to connect to jdbc:derby:nativeAuthEmbDB without username or password
Correct behavior: SQLException: Database connection refused.
Trying to connect to jdbc:derby:nativeAuthEmbDB;user=noacc;password=ajaxj3x9
Correct behavior: SQLException: Database connection refused.
Trying to connect to jdbc:derby:nativeAuthEmbDB;user=guest;password=java5w6x
Connected to database nativeAuthEmbDB with read-only access
Correct behavior: SQLException: DDL is not permitted for a read-only connection, user or database.
Trying to connect to jdbc:derby:nativeAuthEmbDB;user=mary;password=little7xylamb
Connected to database nativeAuthEmbDB
Created table accessibletbl
Value of accessibletbl/textcol is hello
Granted select/insert privileges to sqlsam
Trying to connect to jdbc:derby:nativeAuthEmbDB;user=sqlsam;password=light8q9bulb
Connected to database nativeAuthEmbDB
Value of accessibletbl/textcol is hello
Inserted string into table
Value of accessibletbl/textcol is hello
Value of accessibletbl/textcol is sam
Correct behavior: SQLException: User 'SQLSAM' does not have DELETE permission on table 'MARY'.'ACCESSIBLETBL'.
Trying to connect to jdbc:derby:nativeAuthEmbDB;user=mary;password=little7xylamb
Connected to database nativeAuthEmbDB
Removed table accessibletbl
Closed connection
Database shut down normally
Derby system shut down normally

The only oddity is that turning on NATIVE auth is supposed to automatically set requireAuthentication
and sqlAuthorization to true, but when I retrieve the values of these properties after turning
on NATIVE auth, the program output indicates that they are not set. 

BTW, it is helpful to learn that the readOnlyAccessUsers and fullAccessUsers properties work
just the same with NATIVE as with BUILTIN. 


                
> Document the NATIVE authentication scheme.
> ------------------------------------------
>
>                 Key: DERBY-5522
>                 URL: https://issues.apache.org/jira/browse/DERBY-5522
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 10.9.0.0
>            Reporter: Rick Hillegas
>            Assignee: Kim Haase
>         Attachments: NativeAuthExampleEmbedded.java, NativeAuthExampleEmbedded.java
>
>
> We should document NATIVE authentication after we have implemented the changes described
on DERBY-866. The documentation changes are described by the functional spec UserManagement.html
attached to that issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message