Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C148DCABE for ; Thu, 10 May 2012 16:23:16 +0000 (UTC) Received: (qmail 5785 invoked by uid 500); 10 May 2012 16:23:16 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 5766 invoked by uid 500); 10 May 2012 16:23:16 -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 5755 invoked by uid 99); 10 May 2012 16:23:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 16:23:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 16:23:15 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 31BB714C5C for ; Thu, 10 May 2012 16:22:55 +0000 (UTC) Date: Thu, 10 May 2012 16:22:55 +0000 (UTC) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Message-ID: <1564093448.49908.1336666975220.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (DERBY-3146) Adjust length restriction on user identifiers (authorization ids) to same as other identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik resolved DERBY-3146. ---------------------------------- Resolution: Fixed > Adjust length restriction on user identifiers (authorization ids) to same as other identifiers > ---------------------------------------------------------------------------------------------- > > Key: DERBY-3146 > URL: https://issues.apache.org/jira/browse/DERBY-3146 > Project: Derby > Issue Type: Improvement > Components: JDBC, SQL > Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2, 10.8.2.2 > Reporter: Dag H. Wanvik > Assignee: Dag H. Wanvik > Priority: Minor > Fix For: 10.9.0.0 > > Attachments: DERBY-3146.diff, DERBY-3146.stat > > > While working on roles, I notice that there is a max size of 30 on > user ids in derby (authorization identifiers), e.g. the check being > performed in the parser: > private void checkAuthorizationLength( String authorization) > : > checkIdentifierLengthLimit( authorization, Limits.DB2_MAX_USERID_LENGTH); > : > where Limits.DB2_MAX_USERID_LENGTH == 30. I have checked, and I don't > think there are any fundamental reasons why Derby can't lift this DB2 > restriction: Then authorization identifiers would have the same max > limit as other identifiers: 128 (Limits.MAX_IDENTIFIER_LENGTH). > Currently, this limit of 30 is enforced for GRANT/REVOKE, i.e. for the > grantees. > However, in the CREATE SCHEMA statement, the clause > AUTHORIZATION > which allows specifying a schema's owner, is *not* subject to this > restriction. This is also reflected in the reference documentation for > system tables: > > SYS.SYSCHEMAS: > Column Name Type Length Nullability Contents > ------------------------------------------------------------------- > AUTHORIZATIONID VARCHAR 128 false the authorization > identifier of the > owner of the schema > SYS.SYSTABLEPERMS: > Column Name Type Length Nullability Contents > ------------------------------------------------------------------- > GRANTEE VARCHAR 30 False The authorization ID > of the user to whom > the privilege is > granted. > Furthermore, the limit is enforced in the authorizer code > (AuthorizationServiceBase#authenticate). It is also reflected in the > metadata: EmbedDatabaseMetaData#getMaxUserNameLength. > I think it would be good to harmonize these two different limits for > authorization identifier and change the limit to 128 > (Limits.MAX_IDENTIFIER_LENGTH). -- 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