You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Gregory Chanan <gc...@cloudera.com> on 2013/10/09 22:12:07 UTC

Review Request 14561: SENTRY-38: Cleanup Roles/DBRoles

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14561/
-----------------------------------------------------------

Review request for sentry, Brock Noland and Shreepadma Venugopalan.


Bugs: SENTRY-38
    https://issues.apache.org/jira/browse/SENTRY-38


Repository: sentry


Description
-------

The Roles interface now is kind of messy, because it has a DB-specific function:

public ImmutableSet<String> getRoles(@Nullable String database, String group, Boolean isURI);

It makes more sense to just have a Roles class that store roles, and have the PolicyEngine do the service-specific calculations.


Diffs
-----

  sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/Roles.java 39044fd 
  sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/RolesFactory.java e060ff8 
  sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimplePolicyParser.java 46acf4a 
  sentry-provider/sentry-provider-policy-db/src/main/java/org/apache/sentry/provider/db/DBRoles.java fcd946d 
  sentry-provider/sentry-provider-policy-db/src/main/java/org/apache/sentry/provider/db/SimpleDBPolicyEngine.java 6607d02 

Diff: https://reviews.apache.org/r/14561/diff/


Testing
-------

Ran the unit tests; didn't run the end-to-end tests yet.


Thanks,

Gregory Chanan


Re: Review Request 14561: SENTRY-38: Cleanup Roles/DBRoles

Posted by Gregory Chanan <gc...@cloudera.com>.

> On Oct. 9, 2013, 8:21 p.m., Brock Noland wrote:
> > LGTM, can you fix the spacing issues and then upload the new patch to the JIRA?

Done.


- Gregory


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14561/#review26837
-----------------------------------------------------------


On Oct. 9, 2013, 8:12 p.m., Gregory Chanan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14561/
> -----------------------------------------------------------
> 
> (Updated Oct. 9, 2013, 8:12 p.m.)
> 
> 
> Review request for sentry, Brock Noland and Shreepadma Venugopalan.
> 
> 
> Bugs: SENTRY-38
>     https://issues.apache.org/jira/browse/SENTRY-38
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> The Roles interface now is kind of messy, because it has a DB-specific function:
> 
> public ImmutableSet<String> getRoles(@Nullable String database, String group, Boolean isURI);
> 
> It makes more sense to just have a Roles class that store roles, and have the PolicyEngine do the service-specific calculations.
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/Roles.java 39044fd 
>   sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/RolesFactory.java e060ff8 
>   sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimplePolicyParser.java 46acf4a 
>   sentry-provider/sentry-provider-policy-db/src/main/java/org/apache/sentry/provider/db/DBRoles.java fcd946d 
>   sentry-provider/sentry-provider-policy-db/src/main/java/org/apache/sentry/provider/db/SimpleDBPolicyEngine.java 6607d02 
> 
> Diff: https://reviews.apache.org/r/14561/diff/
> 
> 
> Testing
> -------
> 
> Ran the unit tests; didn't run the end-to-end tests yet.
> 
> 
> Thanks,
> 
> Gregory Chanan
> 
>


Re: Review Request 14561: SENTRY-38: Cleanup Roles/DBRoles

Posted by Brock Noland <br...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14561/#review26837
-----------------------------------------------------------

Ship it!


LGTM, can you fix the spacing issues and then upload the new patch to the JIRA?


sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/Roles.java
<https://reviews.apache.org/r/14561/#comment52189>

    Spaces are missing here



sentry-provider/sentry-provider-policy-db/src/main/java/org/apache/sentry/provider/db/SimpleDBPolicyEngine.java
<https://reviews.apache.org/r/14561/#comment52188>

    Missing spaces here


- Brock Noland


On Oct. 9, 2013, 8:12 p.m., Gregory Chanan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14561/
> -----------------------------------------------------------
> 
> (Updated Oct. 9, 2013, 8:12 p.m.)
> 
> 
> Review request for sentry, Brock Noland and Shreepadma Venugopalan.
> 
> 
> Bugs: SENTRY-38
>     https://issues.apache.org/jira/browse/SENTRY-38
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> The Roles interface now is kind of messy, because it has a DB-specific function:
> 
> public ImmutableSet<String> getRoles(@Nullable String database, String group, Boolean isURI);
> 
> It makes more sense to just have a Roles class that store roles, and have the PolicyEngine do the service-specific calculations.
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/Roles.java 39044fd 
>   sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/RolesFactory.java e060ff8 
>   sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimplePolicyParser.java 46acf4a 
>   sentry-provider/sentry-provider-policy-db/src/main/java/org/apache/sentry/provider/db/DBRoles.java fcd946d 
>   sentry-provider/sentry-provider-policy-db/src/main/java/org/apache/sentry/provider/db/SimpleDBPolicyEngine.java 6607d02 
> 
> Diff: https://reviews.apache.org/r/14561/diff/
> 
> 
> Testing
> -------
> 
> Ran the unit tests; didn't run the end-to-end tests yet.
> 
> 
> Thanks,
> 
> Gregory Chanan
> 
>