You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kim Haase (Updated) (JIRA)" <ji...@apache.org> on 2012/03/08 21:59:58 UTC
[jira] [Updated] (DERBY-5522) Document the NATIVE authentication
scheme.
[ 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
Okay, now it's time for stupid questions.
I thought I would start by trying out the feature (best way to learn how it works), so I modified the SQL authorization embedded example we already have. I'm running into a bit of a catch-22, however. At first I tried setting the authentication provider to NATIVE::LOCAL before I created any users --
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
Turning on NATIVE authentication.
---SQLException Caught---
SQLState: XCY05
Severity: 30000
Message: Invalid change of the derby.authentication.provider property. Once set to NATIVE authentication, this property cannot be changed. NATIVE::LOCAL is the only NATIVE value accepted by derby.authentication.provider. This property cannot be set to NATIVE::LOCAL unless credentials for the database owner have been stored in the database using the syscs_util.syscs_create_user procedure.
I was confused by the first part of this because I hadn't set the property previously, but I figured I had to create the users first and then set it. But I still get the same error:
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.
---SQLException Caught---
SQLState: XCY05
Severity: 30000
Message: Invalid change of the derby.authentication.provider property. Once set to NATIVE authentication, this property cannot be changed. NATIVE::LOCAL is the only NATIVE value accepted by derby.authentication.provider. This property cannot be set to NATIVE::LOCAL unless credentials for the database owner have been stored in the database using the syscs_util.syscs_create_user procedure.
I thought I was following Bootstrapping method 3, "The database already exists and the DBO calls syscs_util.syscs_set_database_property('derby.authentication.provider', 'NATIVE::LOCAL' )."
Maybe it should exist, but there shouldn't be an active connection to it, because the default provider is still BUILTIN, and what I'm really doing is changing it from BUILTIN to NATIVE? (Which ought to be possible, I should think?) But the only way I can call statements is with an active connection. I'm perplexed.
> 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
>
>
> 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