You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Konstantin Tsypin (JIRA)" <ji...@apache.org> on 2019/06/26 11:54:00 UTC

[jira] [Created] (RANGER-2486) ranger-tagsync tags.json file multi-service-rules

Konstantin Tsypin created RANGER-2486:
-----------------------------------------

             Summary: ranger-tagsync tags.json file multi-service-rules
                 Key: RANGER-2486
                 URL: https://issues.apache.org/jira/browse/RANGER-2486
             Project: Ranger
          Issue Type: Wish
          Components: tagsync
            Reporter: Konstantin Tsypin


Hi there!

I'd try to made the ranger-tagsync file with multiple rules.

For example, at the one hand, next case is work correct for HIVE-service at practice:

{code}

{
 "op": "add_or_update",
 "serviceName": "AUTH_HIVE",
 "tagVersion": 3,
 "tagDefinitions": {
 "1":\{"id":1, "guid":"tagdef-1", "name":"PAD", "attributeDefs":[], "owner":0},
 "2":\{"id":2, "guid":"tagdef-2", "name":"PII", "attributeDefs":[], "owner":0}
 },
 "tags": {
 "1": {
 "type": "PAD",
 "attributes": {},
 "id": 1,
 "guid": "tag-pad-1-guid"
 },
 "2": {
 "type": "PII",
 "attributes": {},
 "id": 2,
 "guid": "tag-pii-2-guid"
 }
 },
 "serviceResources": [
 {
 "serviceName": "AUTH_HIVE",
 "resourceElements": {
 "database": \{ "values": [ "default" ] },
 "table": \{ "values": [ "personal_data" ] },
 "column": \{ "values": [ "address" ] }
 },
 "id": 1,
 "guid": "employee.personal.address-guid"
 },
 {
 "serviceName": "AUTH_HIVE",
 "resourceElements": {
 "database": \{ "values": [ "default" ] },
 "table": \{ "values": [ "personal_data" ] },
 "column": \{ "values": [ "phone" ] }
 },
 "id": 2,
 "guid": "employee.personal.phone-guid"
 }
 ],
 "resourceToTagIds": {
 "1": [ 1 ],
 "2": [ 2 ]
 }
 }

{code}

 

on the other hand, next case work correct for HBASE-service:

{code}

{
 "op": "add_or_update",
 "serviceName": "AUTH_HBASE",
 "tagVersion": 3,
 "tagDefinitions": {
 "1":\{"id":1, "guid":"tagdef-hb1", "name":"PII", "attributeDefs":[], "owner":0}
 },
 "tags": {
 "1": {
 "type": "PII",
 "attributes": {},
 "id": 1,
 "guid": "tag-pii-hb1-guid"
 }
 },
 "serviceResources": [
 {
 "serviceName": "AUTH_HBASE",
 "resourceElements": {
 "table": \{ "values": [ "default:weblog" ] },
 "column-family": \{ "values": [ "user_profile" ] }
 },
 "id": 1,
 "guid": "weblog.user.profile-guid"
 }
 ],
 "resourceToTagIds": {
 "1": [ 1 ]
 }
 }

{code}

 

anyway, i'm prefer to concatenate this json-strings to independent tagsync.json file, and cant understand union-rules.

The:

[\{hive},\{hbase}] scheme does not work.

Does it work? Do you have any expirience, advices, or documentation to resolve this?

l'll be pretty gratitude.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)