[
https://issues.apache.org/jira/browse/HBASE-6887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497582#comment-13497582
]
Gary Helmling commented on HBASE-6887:
--------------------------------------
[[email protected]] Yeah, not too much to it. We just need to convert the
functions in {{hbase-server/src/main/ruby/hbase/security.rb}} from doing
CoprocessorProtocol based endpoint calls to the PB service calls.
So, for example, for {{grant()}}, where it currently does:
{noformat}
meta_table = org.apache.hadoop.hbase.client.HTable.new(@config,
org.apache.hadoop.hbase.security.access.AccessControlLists::ACL_TABLE_NAME)
protocol = meta_table.coprocessorProxy(
org.apache.hadoop.hbase.security.access.AccessControllerProtocol.java_class,
org.apache.hadoop.hbase.HConstants::EMPTY_START_ROW)
begin
protocol.grant(user_permission)
{noformat}
this would need to become something like:
{noformat}
meta_table = org.apache.hadoop.hbase.client.HTable.new(@config,
org.apache.hadoop.hbase.security.access.AccessControlLists::ACL_TABLE_NAME)
channel =
meta_table.coprocessorService(org.apache.hadoop.hbase.HConstants::EMPTY_START_ROW)
service = AccessControlProtos.AccessControlService.newBlockingStub(channel)
# build the AccessControlProtos.GrantRequest, see
TestAccessController.newGrantRequest()
begin
service.grant(nil, request)
{noformat}
See {{TestAccessController}} for sample usage, especially the {{grant()}} and
{{newGrantRequest()}} methods there. Then curse me for converting endpoints to
PB services :).
> Convert security-related shell commands to use PB-based AccessControlService
> ----------------------------------------------------------------------------
>
> Key: HBASE-6887
> URL: https://issues.apache.org/jira/browse/HBASE-6887
> Project: HBase
> Issue Type: Sub-task
> Components: security
> Affects Versions: 0.96.0
> Reporter: Gary Helmling
>
> The security-related HBase shell commands (grant, revoke, user_permission)
> are still using the old CoprocessorProtocol-based AccessControllerProtocol
> endpoint for dynamic RPC. These need to be converted to use the protocol
> buffer based AccessControlService interface added in HBASE-5448.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira