[ 
https://issues.apache.org/jira/browse/SENTRY-2039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16245959#comment-16245959
 ] 

Sergio Peña commented on SENTRY-2039:
-------------------------------------

I noticed that components authorizables are obtained from 
{{*ModelAuthorizable.from(KeyValue keyValue)}} and that differs a little 
between them. 

For instance:
{code}
IndexerModelAuthorizables, SolrModelAuthorizables, SqoopModelAuthorizables: 
These lower the case on both key and value strings, compare it and return an 
Authorizable object with both string cases lowered.

KafkaModelAuthorizables, DBModelAuthorizables: These lower the case on the key 
only, but compares key and value as lower case. However, they return an 
Authorizable object with the key (lowercase) but the value as original.
{code}

I'm not sure how Kafka and DB can be affected if I lower the case automatically 
on the constructor. It might need probably more investigation on those 
components to understand the behavior (especially Kafka which I don't know how 
it works yet).

Perhaps is good to keep the equalsIgnoreCase() for now on the KeyValue.equals() 
as it used to work before? then create a follow-up jira to revisit the KeyValue 
class. Seems this KeyValue can be replaced by a common API, like the Pair 
class. That would worth the investigation.

> KeyValue is case sensitive and it causes incompatibility issues with external 
> components
> ----------------------------------------------------------------------------------------
>
>                 Key: SENTRY-2039
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2039
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>    Affects Versions: 1.8.0
>            Reporter: Sergio Peña
>            Assignee: Sergio Peña
>         Attachments: SENTRY-2039.1.patch, SENTRY-2039.2.patch
>
>
> A refactor done on SENTRY-999 changed the way KeyValue.equals() checks for 
> equality. It used to be case insensitive and now it is case sensitive. This 
> may cause issues (like hbase indexer) when policies are written with case 
> insensitive.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to