You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Lenni Kuff (JIRA)" <ji...@apache.org> on 2014/04/22 02:17:14 UTC
[jira] [Updated] (SENTRY-177) Sentry Policy Service does not treat
role names as case insensitive
[ https://issues.apache.org/jira/browse/SENTRY-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lenni Kuff updated SENTRY-177:
------------------------------
Description:
The Sentry Policy Service does not treat role names as case insensitive. Role names are always stored in lowercase, but the checks to see if a role exists are done in a case sensitive fashion. This leads to lots of errors about roles not existing when they actually do.
For example:
{code}
SentryPolicyServiceClient client = new SentryPolicyServiceClient(conf);
Set<String> userGroupNames = Sets.newHashSet();
userGroupNames.add("lskuff");
String roleName = "newRole";
client.createRole("lskuff", userGroupNames, roleName);
// Fails with role does not exist error message since "newRole" is stored as "newrole"
client.grantRoleToGroup("lskuff", userGroupNames,
"lskuff", roleName);
org.apache.sentry.provider.db.SentryNoSuchObjectException: Role: TAlterSentryRoleAddGroupsRequest(protocol_version:1, requestorUserName:lskuff, requestorGroupNames:[lskuff], roleName:newRolename, groups:[TSentryGroup(groupName:lskuff)]) does not exist.. Server Stacktrace: org.apache.sentry.provider.db.SentryNoSuchObjectException: Role: newRolename
at org.apache.sentry.provider.db.service.persistent.SentryStore.alterSentryRoleAddGroups(SentryStore.java:435)
{code}
was:
The Sentry Policy Service does not treat role names as case insensitive. Role names are always stored in lowercase, but the checks to see if a role exists are done in a case sensitive fashion. This leads to lots of errors about roles not existing when they actually do.
For example:
{code}
SentryPolicyServiceClient client = new SentryPolicyServiceClient(conf);
Set<String> userGroupNames = Sets.newHashSet();
userGroupNames.add("lskuff");
String roleName = "newRole";
client.createRole("lskuff", userGroupNames, roleName);
// Fails with role does not exist error message since "newRole" is stored as "newrole"
client.grantRoleToGroup("lskuff", userGroupNames,
"lskuff", roleName);
{code}
> Sentry Policy Service does not treat role names as case insensitive
> -------------------------------------------------------------------
>
> Key: SENTRY-177
> URL: https://issues.apache.org/jira/browse/SENTRY-177
> Project: Sentry
> Issue Type: Bug
> Affects Versions: 1.3.0
> Reporter: Lenni Kuff
>
> The Sentry Policy Service does not treat role names as case insensitive. Role names are always stored in lowercase, but the checks to see if a role exists are done in a case sensitive fashion. This leads to lots of errors about roles not existing when they actually do.
> For example:
> {code}
> SentryPolicyServiceClient client = new SentryPolicyServiceClient(conf);
> Set<String> userGroupNames = Sets.newHashSet();
> userGroupNames.add("lskuff");
> String roleName = "newRole";
> client.createRole("lskuff", userGroupNames, roleName);
> // Fails with role does not exist error message since "newRole" is stored as "newrole"
> client.grantRoleToGroup("lskuff", userGroupNames,
> "lskuff", roleName);
> org.apache.sentry.provider.db.SentryNoSuchObjectException: Role: TAlterSentryRoleAddGroupsRequest(protocol_version:1, requestorUserName:lskuff, requestorGroupNames:[lskuff], roleName:newRolename, groups:[TSentryGroup(groupName:lskuff)]) does not exist.. Server Stacktrace: org.apache.sentry.provider.db.SentryNoSuchObjectException: Role: newRolename
> at org.apache.sentry.provider.db.service.persistent.SentryStore.alterSentryRoleAddGroups(SentryStore.java:435)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)