This document explains ranger 2.1.0 database schema information.It contains list of Tables its column details for databases supported.
MYSQL
x_db_version_h
Description: This table contains entry of java patches and sql patches executed after creation of core schema.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 version varchar 64 NO 3 inst_at timestamp CURRENT_TIMESTAMP NO 4 inst_by varchar 256 NO 5 updated_at timestamp 0000-00-00 00:00:00 NO 6 updated_by varchar 256 NO 7 active enum 1 Y FALSE x_portal_user
Description: This table contains user profile and credentials of Ranger Admin users. It also contains users synced from external sources but credentials are not stored and password field contains garbage value. Important attributes of this table are login_id, password, email, status and user_src. 'user_src' field value ‘0’ represents internal user while ‘1’ represents external user. External users are users synced from external sources i.e (UNIX / LDAP / AD).
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
create_time
datetime
FALSE
MUL
3
update_time
datetime
FALSE
MUL
4
added_by_id
bigint
FALSE
MUL
5
upd_by_id
bigint
FALSE
MUL
6
first_name
varchar
1,022
FALSE
MUL
7
last_name
varchar
1,022
FALSE
8
pub_scr_name
varchar
2,048
FALSE
9
login_id
varchar
767
FALSE
UNI
10
password
varchar
512
NO
11
email
varchar
512
FALSE
UNI
12
status
integer
0
NO
13
user_src
integer
0
NO
14
notes
varchar
4,000
FALSE
15 other_attributes
varchar
4,000
FALSE
x_portal_user_role
Description: This table contains role details of users. User roles may be ‘ROLE_SYS_ADMIN’, ‘ROLE_USER’, ‘ROLE_KEY_ADMIN’, 'ROLE_ADMIN_AUDITOR', 'ROLE_KEY_ADMIN_AUDITOR' user_id of this table is a foreign key of x_portal_user(ID).ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
create_time
datetime
FALSE
MUL
3
update_time
datetime
FALSE
MUL
4
added_by_id
bigint
FALSE
MUL
5
upd_by_id
bigint
FALSE
MUL
6
user_id
bigint
NO
MUL
7
user_role
varchar
128
FALSE
8 status integer 0 NO xa_access_audit
Description: This table contains entries of audit event done by users on resource of configured repositories.
Note: This table has been kept just for backward compatibility. Audit to DB feature has been discontinued.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 audit_type integer 0 NO 7 access_result integer 0 FALSE 8 access_type varchar 255 FALSE 9 acl_enforcer varchar 255 FALSE 10 agent_id varchar 255 FALSE 11 client_ip varchar 255 FALSE 12 client_type varchar 255 FALSE 13 policy_id bigint 0 FALSE 14 repo_name varchar 255 FALSE 15 repo_type integer 0 FALSE 16 result_reason varchar 255 FALSE 17 session_id varchar 255 FALSE 18 event_time datetime FALSE MUL 19 request_user varchar 255 FALSE 20 action varchar 2,000 FALSE 21 request_data varchar 4,000 FALSE 22 resource_path varchar 4,000 FALSE 23 resource_type varchar 255 FALSE 24 seq_num bigint 0 FALSE 25 event_count bigint 1 FALSE 26 event_dur_ms bigint 1 FALSE x_asset
Note: This table is not used anymore. It is available to support upgrade scenarios.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 asset_name varchar 1,024 NO 7 descr varchar 4,000 NO 8 act_status integer 0 NO 9 asset_type integer 0 NO 10 config mediumtext 1,67,77,215 FALSE 11 sup_native tinyint 0 NO x_auth_sess
Description: This table contains event details of authenticated and failed sessions. Important attributes are login_id, ext_sess_id, auth_time, auth_status, auth_type, auth_provider, req_ip. If user has Ranger installed for long duration, this table will get filled with large number of session entries.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 login_id varchar 767 NO 7 user_id bigint FALSE MUL 8 ext_sess_id varchar 512 FALSE 9 auth_time datetime NO 10 auth_status integer 0 NO 11 auth_type integer 0 NO 12 auth_provider integer 0 NO 13 device_type integer 0 NO 14 req_ip varchar 48 NO 15 req_ua varchar 1,024 FALSE x_cred_store
Note: This table is not in use and might not be required in future. It is available to support upgrade scenarios.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 store_name varchar 1,024 NO 7 descr varchar 4,000 NO x_db_base
Note: This table is not in use and might not be required in future.It is available to support upgrade scenarios.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL x_group
Description: This table contains group details. Important attributes of this table are group_name, status, group_type, group_src. Additional column is_visible is added to hide / unhide a group in Ranger UI.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 group_name varchar 767 NO 7 descr varchar 4,000 NO 8 status integer 0 NO 9 group_type integer 0 NO 10 cred_store_id bigint FALSE MUL 11 group_src integer 0 NO 12 is_visible integer 1 NO 13 other_attributes varchar 4000 FALSE x_group_groups
Note: This table is not in use and will not be required in future. It is available to support upgrade scenarios.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 group_name varchar 1,024 NO 7 p_group_id bigint FALSE MUL 8 group_id bigint FALSE MUL x_user
Description: This table contains Ranger Admin users, it also contains users synced from external sources. Important attributes of this table are username, status. Additional column is_visible is added to hide/unhide a user in Ranger UI.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 user_name varchar 767 NO 7 descr varchar 4,000 NO 8 status integer 0 NO 9 cred_store_id bigint FALSE MUL 10 is_visible integer 1 NO 11 other_attributes varchar 4000 FALSE x_group_users
Description: This table contain mapping of users and groups. Important attributes of this table are group_name, p_group_id, user_id. `p_group_id` refers to `x_group.id` and `user_id` refers to `x_user.id`
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
create_time
datetime
FALSE
MUL
3
update_time
datetime
FALSE
MUL
4
added_by_id
bigint
FALSE
MUL
5
upd_by_id
bigint
FALSE
MUL
6
group_name
varchar
740
NO
7
p_group_id
bigint
FALSE
MUL
8
user_id
bigint
FALSE
UL
x_policy_export_audit
Description: This table contains logs of policy export request. Important attributes of this table are client_ip, agent_id, req_epoch, repository_name, exported_json, http_ret_code.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 client_ip varchar 255 NO 7 agent_id varchar 255 FALSE 8 req_epoch bigint NO 9 last_updated datetime FALSE 10 repository_name varchar 1,024 FALSE 11 exported_json text 65,535 FALSE 12 http_ret_code integer 0 NO 13 cluster_name varchar 255 FALSE 14 zone_name varchar 255 FALSE 15 policy_version bigint FALSE x_resource
Description: This table contains policy information of repositories. A policy contains resources, different types of repositories may have resources in different format. Important attributes of this table are res_name, res_type, asset_id, parent_id, parent_path, is_encrypt, is_recursive, res_group, res_dbs, res_tables, res_col_fams, res_cols, res_udfs, res_status, table_type, col_type, policy_name, res_topologies, res_services.
Note: This table is not in use anymore. It is available to support upgrade scenarios.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 res_name varchar 4,000 FALSE 7 descr varchar 4,000 FALSE 8 res_type integer 0 NO 9 asset_id bigint NO MUL 10 parent_id bigint FALSE MUL 11 parent_path varchar 4,000 FALSE 12 is_encrypt integer 0 NO 13 is_recursive integer 0 NO 14 res_group varchar 1,024 FALSE 15 res_dbs text 65,535 FALSE 16 res_tables text 65,535 FALSE 17 res_col_fams text 65,535 FALSE 18 res_cols text 65,535 FALSE 19 res_udfs text 65,535 FALSE 20 res_status integer 1 NO 21 table_type integer 0 NO 22 col_type integer 0 NO 23 policy_name varchar 500 FALSE UNI 24 res_topologies text 65,535 FALSE 25 res_services text 65,535 FALSE x_trx_log
Description: This table contains logs of all CRUD operation done by user. Admin audits are retrieved from this table.
Important attributes of this table are object_name, attr_name, prev_val, new_val, trx_id, action, sess_id.ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
create_time
datetime
FALSE
MUL
3
update_time
datetime
FALSE
MUL
4
added_by_id
bigint
FALSE
MUL
5
upd_by_id
bigint
FALSE
MUL
6
class_type
integer
0
NO
7
object_id
bigint
FALSE
8
parent_object_id
bigint
FALSE
9
parent_object_class_type
integer
0
NO
10
parent_object_name
varchar
1,024
FALSE
11
object_name
varchar
1,024
FALSE
12
attr_name
varchar
255
FALSE
13
prev_val
mediumtext
1,67,77,215
FALSE
14
new_val
mediumtext
1,67,77,215
FALSE
15
trx_id
varchar
1,024
FALSE
16
action
varchar
255
FALSE
17
sess_id
varchar
512
FALSE
18
req_id
varchar
30
FALSE
19
sess_type
varchar
30
FALSE
x_perm_map
Description: This table contains users and groups permission mapping on resources. Important attributes are perm_group, res_id, group_id, user_id, perm_for, perm_type, is_recursive.
Note: It is not used anymore. It is available to support upgrade scenarios.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 perm_group varchar 1,024 FALSE 7 res_id bigint FALSE MUL 8 group_id bigint FALSE MUL 9 user_id bigint FALSE MUL 10 perm_for integer 0 NO 11 perm_type integer 0 NO 12 is_recursive integer 0 NO 13 is_wild_card tinyint 1 NO 14 grant_revoke tinyint 1 NO 15 ip_address text 65,535 FALSE x_audit_map
Description: This table contains users and groups audit rights mapping on resources. Important attributes are res_id, group_id, user_id, audit_type.
Note: It is not used anymore. It is available to support upgrade scenarios.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE MUL 3 update_time datetime FALSE MUL 4 added_by_id bigint FALSE MUL 5 upd_by_id bigint FALSE MUL 6 res_id bigint FALSE MUL 7 group_id bigint FALSE MUL 8 user_id bigint FALSE MUL 9 audit_type integer 0 NO x_service_def
Description: (This table added to Enable Pluggable service model in Ranger). This table contains metadata of services. Service definition of different Hadoop components can be stored as a template for defining services of specific hadoop component. Important attributes of this table are: version, name, impl_class_name, label, is_enabled.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE MUL 4 update_time datetime FALSE MUL 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 version bigint FALSE 8 name varchar 1,024 FALSE 9 display_name varchar 1024 FALSE 10 impl_class_name varchar 1,024 FALSE 11 label varchar 1,024 FALSE 12 description varchar 1,024 FALSE 13 rb_key_label varchar 1,024 FALSE 14 rb_key_description varchar 1,024 FALSE 15 is_enabled tinyint 1 FALSE 16 def_options varchar 1024 FALSE x_service
Description: (Table added to Enable Pluggable service model in Ranger). This table contains services information. Important attributes of this table are: version, type, name, policy_version, is_enabled. 'type' column is reference of 'x_service_def.id' column.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE MUL 4 update_time datetime FALSE MUL 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 version bigint FALSE 8 type bigint FALSE MUL 9 name varchar 255 FALSE UNI 10 display_name varchar 255 FALSE 11 policy_version bigint FALSE 12 policy_update_time datetime FALSE 13 description varchar 1,024 FALSE 14 is_enabled tinyint 0 NO 15 tag_service bigint FALSE 16 tag_version bigint 0 FALSE 17 tag_update_time datetime FALSE x_security_zone
Description: This table contains Ranger security zone details. Important attributes of this table are version, name, jsonData, description.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
20
NO
PRI
2
create_time
datetime
FALSE
3
update_time
datetime
FALSE
4
added_by_id
bigint
20
FALSE
MUL
5
upd_by_id
bigint
20
FALSE
MUL
6
version
bigint
20
FALSE
7
name
varchar
255
NO
UNI
8
jsonData
mediumtext
FALSE
9
description
varchar
1024
FALSE
x_ranger_global_state
Description: This table contains ranger newly added elements ranger state related information like Ranger Role, Ranger User Store, Ranger Security Zone. Important Attributes are : version, state_name, app_data. state_name contains actual elements name, app_data contains version count after addition of new state in ranger.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
20
NO
PRI
2
create_time
datetime
FALSE
3
update_time
datetime
FALSE
4
added_by_id
bigint
20
FALSE
MUL
5
updated_by_id
bigint
20
FALSE
MUL
6
version
bigint
20
FALSE
7
state_name
varchar
255
NO
UNI
8
app_data
varchar
255
FALSE
x_security_zone_ref_service
Description: This table contains entries of service details assigned under Ranger security zone. Important attributes are : zone_id, service_id, service_name. 'zone_id' is foreign key column of 'x_security_zone.id', 'service_id' is foreign key column of 'x_service.id' and the service_name contains the name of the service.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
20
NO
PRI
2
create_time
datetime
FALSE
3
update_time
datetime
FALSE
4
added_by_id
bigint
20
FALSE
MUL
5
upd_by_id
bigint
20
FALSE
MUL
6
zone_id
bigint
20
FALSE
MUL
7
service_id
bigint
20
FALSE
MUL
8
service_name
varchar
255
FALSE
MUL
x_security_zone_ref_tag_srvc
Description: This table contains entries of tag services details assigned under Ranger security zone. Important attributes are : zone_id, tag_srvc_id, tag_srvc_name. 'zone_id' is foreign key column of 'x_security_zone.id', 'tag_srvc_id' is foreign key column of 'x_service.id', 'tag_srvc_name' is foreign key column of 'x_service.name'.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
20
NO
PRI
2
create_time
datetime
FALSE
3
update_time
datetime
FALSE
4
added_by_id
bigint
20
FALSE
MUL
5
upd_by_id
bigint
20
FALSE
MUL
6
zone_id
bigint
20
FALSE
MUL
7
tag_srvc_id
bigint
20
FALSE
MUL
8
tag_srvc_name
varchar
255
FALSE
MUL
x_security_zone_ref_user
Description: This table contains entries of user details assigned under Ranger security zone. Important attributes are : zone_id, user_id, user_name. 'zone_id' is foreign key column of 'x_security_zone.id', 'user_id' is foreign key column of 'x_user.id' and the user_name contains the name of the user.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
20
NO
PRI
2
create_time
datetime
FALSE
3
update_time
datetime
FALSE
4
added_by_id
bigint
20
FALSE
MUL
5
upd_by_id
bigint
20
FALSE
MUL
6
zone_id
bigint
20
FALSE
MUL
7
user_id
bigint
20
FALSE
MUL
8
user_name
varchar
255
FALSE
MUL
9
user_type
tinyint
3
FALSE
x_security_zone_ref_group
Description: This table contains entries of group details assigned under Ranger security zone. Important attributes are : zone_id, group_id, group_name, group_type. 'zone_id' is foreign key column of 'x_security_zone.id', 'group_id' is foreign key column of 'x_group.id' and the group_name contains the name of the group.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
20
NO
PRI
2
create_time
datetime
FALSE
3
update_time
datetime
FALSE
4
added_by_id
bigint
20
FALSE
MUL
5
upd_by_id
bigint
20
FALSE
MUL
6
zone_id
bigint
20
FALSE
MUL
7
group_id
bigint
20
FALSE
MUL
8
group_name
varchar
255
FALSE
9
group_type
tinyint
3
FALSE
x_policy
Description: (Table added to Enable Pluggable service model in Ranger).
This table contains policies details of policies. Important attributes are service, name, policy_type, resource_signature, is_enabled,policy_text. 'service' column is foreign key of 'x_service.id' column.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE MUL 4 update_time datetime FALSE MUL 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 version bigint FALSE 8 service bigint FALSE MUL 9 name varchar 512 FALSE 10 policy_type integer 0 FALSE 11 description varchar 1,024 FALSE 12 resource_signature varchar 128 FALSE MUL 13 is_enabled tinyint 0 NO 14 is_audit_enabled tinyint 0 NO 15 policy_options varchar 4000 FALSE 16 policy_priority int 0 NO 17 policy_text medium_text FALSE 18 zone_id bigint NO x_service_config_def
Description :
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 def_id bigint NO MUL 8 item_id bigint NO 9 name varchar 1,024 FALSE 10 type varchar 1,024 FALSE 11 sub_type varchar 1,024 FALSE 12 is_mandatory tinyint 0 NO 13 default_value varchar 1,024 FALSE 14 validation_reg_ex varchar 1,024 FALSE 15 validation_message varchar 1,024 FALSE 16 ui_hint varchar 1,024 FALSE 17 label varchar 1,024 FALSE 18 description varchar 1,024 FALSE 19 rb_key_label varchar 1,024 FALSE 20 rb_key_description varchar 1,024 FALSE 21 rb_key_validation_message varchar 1,024 FALSE 22 sort_order tinyint 0 FALSE x_resource_def
Description: (Table added to Enable Pluggable service model in Ranger)
This table contains definitions of resources of each type of services. Important attributes are : def_id, item_id, name, type, res_level, parent, mandatory, look_up_supported, recursive_supported, excludes_supported, matcher, matcher_options, validation_reg_ex, validation_message, ui_hint, label, description, sort_order. 'def_id' is foreign key reference of 'x_service_def.id' column, 'item_id' is the sequence number of each items created under each service definitions. 'name' column contains resource def name (i.e path, column, table, topology). 'type' column is data-type of name (i.e path type for path). 'parent' is foreign key of 'id' column i.e if 'name' is of type ‘column’ then its parent would be table. 'matcher' contains matcher class name, 'matcher_options' contains key-value pair for matchers. i.e {"wildCard":"true", "ignoreCase":"false"}. 'label' contains label value to be displayed in UI for name column.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
guid
varchar
1,024
FALSE
3
create_time
datetime
FALSE
4
update_time
datetime
FALSE
5
added_by_id
bigint
FALSE
MUL
6
upd_by_id
bigint
FALSE
MUL
7
def_id
bigint
NO
MUL
8
item_id
bigint
NO
9
name
varchar
1,024
FALSE
10
type
varchar
1,024
FALSE
11
res_level
bigint
FALSE
12
parent
bigint
FALSE
MUL
13
mandatory
tinyint
0
NO
14
look_up_supported
tinyint
0
NO
15
recursive_supported
tinyint
0
NO
16
excludes_supported
tinyint
0
NO
17
matcher
varchar
1,024
FALSE
18
matcher_options
varchar
1,024
FALSE
19
validation_reg_ex
varchar
1,024
FALSE
20
validation_message
varchar
1,024
FALSE
21
ui_hint
varchar
1,024
FALSE
22
label
varchar
1,024
FALSE
23
description
varchar
1,024
FALSE
24
rb_key_label
varchar
1,024
FALSE
25
rb_key_description
varchar
1,024
FALSE
26
rb_key_validation_message
varchar
1,024
FALSE
27
sort_order
tinyint
0
FALSE
28 datamask_options varchar 1024 FALSE 29 rowfilter_options varchar 1024 FALSE x_access_type_def
Description: (Table added to Enable Pluggable service model in Ranger). This table contains definitions of access types(i.e read, write). Important attributes are def_id, item_id, name, label, rb_key_label, sort_order.def_id is foreign key of x_service_def.id table. item_id is sequence number of access_type entries under each service def. name fields denotes access type names(i.e read, write, execute). 'label' field contains label value that needs to be displayed in UI for name column.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
guid
varchar
1,024
FALSE
3
create_time
datetime
FALSE
4
update_time
datetime
FALSE
5
added_by_id
bigint
FALSE
MUL
6
upd_by_id
bigint
FALSE
MUL
7
def_id
bigint
NO
MUL
8
item_id
bigint
NO
9
name
varchar
1,024
FALSE
10
label
varchar
1,024
FALSE
11
rb_key_label
varchar
1,024
FALSE
12
sort_order
tinyint
0
FALSE
13 datamask_options varchar 1024 FALSE 14 rowfilter_options varchar 1024 FALSE x_access_type_def_grants
Description: (Table added to Enable Pluggable service model in Ranger). This table contains entries of access types which can have grants. Important attributes are atd_id, implied_grant. atd_id is foreign key of x_access_type_def.id
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 atd_id bigint NO MUL 8 implied_grant varchar 1,024 FALSE x_policy_condition_def
Description: This table contains conditions which need to be applied in policy (i.e IP address range). Important attributes of this table are def_id, item_id, name, evaluator, evaluator_options, validation_reg_ex, validation_message, ui_hint, label, description, sort_order.'def_id' is foreign key of 'x_service_def.id' column. 'item_id' contains policy condition sequence number under each service def. 'name' denotes condition name. 'evaluator' contains condition evaluator class name.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
guid
varchar
1,024
FALSE
3
create_time
datetime
FALSE
4
update_time
datetime
FALSE
5
added_by_id
bigint
FALSE
MUL
6
upd_by_id
bigint
FALSE
MUL
7
def_id
bigint
NO
MUL
8
item_id
bigint
NO
9
name
varchar
1,024
FALSE
10
evaluator
varchar
1,024
FALSE
11
evaluator_options
varchar
1,024
FALSE
12
validation_reg_ex
varchar
1,024
FALSE
13
validation_message
varchar
1,024
FALSE
14
ui_hint
varchar
1,024
FALSE
15
label
varchar
1,024
FALSE
16
description
varchar
1,024
FALSE
17
rb_key_label
varchar
1,024
FALSE
18
rb_key_description
varchar
1,024
FALSE
19
rb_key_validation_message
varchar
1,024
FALSE
20 sort_order tinyint 0 FALSE x_context_enricher_def
Description: Same as policy-condition but enrichers will enrich policies by taking input from outside the system and user don’t need to provide any condition in policy. Important fields are 'name' and 'enricher'. Name field holds the name of enricher i.e `COUNTRY` and 'enricher' field holds the class name which will be enriching policy for this particular context-enricher.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 def_id bigint NO MUL 8 item_id bigint NO 9 name varchar 1,024 FALSE 10 enricher varchar 1,024 FALSE 11 enricher_options varchar 1,024 FALSE 12 sort_order tinyint 0 FALSE x_enum_def
Description: This table contains enum definitions. Important attributes are def_id, item_id, name. 'def_id' is foreign key of 'x_service_def.id' column. 'name' column denoted the enum name (i.e authnType, rpcProtection).
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 def_id bigint NO MUL 8 item_id bigint NO 9 name varchar 1,024 FALSE 10 default_index bigint FALSE x_enum_element_def
Description: This table contains element details of enum defined in x_enum_def table. Important attributes are enum_def_id, item_id, name, label, sort_order. enum_def_id is foreign key column of x_enum_def.id. 'name' contains enum element name (i.e simple, kerberos).
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 enum_def_id bigint NO MUL 8 item_id bigint NO 9 name varchar 1,024 FALSE 10 label varchar 1,024 FALSE 11 rb_key_label varchar 1,024 FALSE 12 sort_order tinyint 0 FALSE x_service_config_map
Description: This table contains x_service_config_map. Important attributes are service, config_key, config_value. 'service' column is foreign key of 'x_service.id'. 'config_key' contains config attribute name and 'config_value' contains the value of config key field.
ORDINAL_POSITION
COLUMN_NAME
DATA_TYPE
COLUMN_SIZE
COLUMN_DEFAULT
IS_NULLABLE
COLUMN_KEY
1
id
bigint
NO
PRI
2
guid
varchar
1,024
FALSE
3
create_time
datetime
FALSE
4
update_time
datetime
FALSE
5
added_by_id
bigint
FALSE
MUL
6
upd_by_id
bigint
FALSE
MUL
7
service
bigint
NO
MUL
8
config_key
varchar
1,024
FALSE
9
config_value
varchar
4,000
FALSE
x_policy_resource
Description: This table contains entries of resources assigned under policy. Important attributes are : policy_id, res_def_id, is_excludes, is_recursive. 'policy_id' is foreign key column of 'x_policy.id' and 'res_def_id' is foreign key column of 'x_resource_def.id' column. 'is_excludes' flag denotes whether policy should be enforced on the mapped resources or all other resources except mapped one. 'is_recursive' flag denotes whether policy need to be enforced in child resources also or not.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 policy_id bigint NO MUL 8 res_def_id bigint NO MUL 9 is_excludes tinyint 0 NO 10 is_recursive tinyint 0 NO x_policy_resource_map
Description: This table contains entries of resources values assigned under policy. Important attributes are : resource_id, value. 'resource_id' is foreign key column of 'x_policy_resource.id' and value contains resource entries.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 resource_id bigint NO MUL 8 value varchar 1,024 FALSE 9 sort_order tinyint 0 FALSE x_policy_item
Description: This table contains delegated admin flag of a policy. Important attributes are policy_id, delegate_admin, sort_order. 'policy_id' is foreign key column of 'x_policy.id'. delegate_admin contains flag for whether delegated admin rights are given in policy or not.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 policy_id bigint NO MUL 8 delegate_admin tinyint 0 NO 9 sort_order tinyint 0 FALSE 10 item_type int 0 FALSE 11 is_enabled tinyint 1 NO 12 comments varchar 255 FALSE x_policy_item_access
Description: This table contains whether specific access is allowed or not in specific policy item. Important attributes are policy_item_id, type, is_allowed. 'policy_item_id' is foreign key columns of 'x_policy_item.id' and 'type' is foreign key column of 'x_access_type_def.id'
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 policy_item_id bigint NO MUL 8 type bigint NO MUL 9 is_allowed tinyint 0 NO 10 sort_order tinyint 0 FALSE x_policy_item_condition
Description: This table contains whether specific access is allowed or not in specific policy item. Important attributes are policy_item_id, type, is_allowed. 'policy_item_id' is foreign key columns of 'x_policy_item.id' and 'type' is foreign key column of 'x_policy_condition_def.id'
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 policy_item_id bigint NO MUL 8 type bigint NO MUL 9 value varchar 1,024 FALSE 10 sort_order tinyint 0 FALSE x_policy_item_user_perm
Description: This table contains mapping of policy item and user. If any user is having access to any specific policy item then corresponding entry needs to be done in the this table. Important attributes are policy_item_id, user_id. 'policy_item_id' is foreign key columns of 'x_policy_item.id' and 'user_id' is foreign key of 'x_user.id'.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 policy_item_id bigint NO MUL 8 user_id bigint FALSE MUL 9 sort_order tinyint 0 FALSE x_policy_item_group_perm
Description: This table contains mapping of policy item and groups. If any group is given access to any specific policy item then corresponding entry need to be done in this table. Important attributes are policy_item_id, group_id. 'policy_item_id' is foreign key columns of 'x_policy_item.id' and 'group_id' is foreign key of 'x_group.id'
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 guid varchar 1,024 FALSE 3 create_time datetime FALSE 4 update_time datetime FALSE 5 added_by_id bigint FALSE MUL 6 upd_by_id bigint FALSE MUL 7 policy_item_id bigint NO MUL 8 group_id bigint FALSE MUL 9 sort_order tinyint 0 FALSE -------------------------- WIP DOC --------------------------
vx_trx_log
Description: This is a view created from x_trx_log table.
Schema definition of view is:
CREATE VIEW vx_trx_log AS select x_trx_log.id AS id, x_trx_log.create_time AS create_time, x_trx_log.update_time AS update_time, x_trx_log.added_by_id AS added_by_id, x_trx_log.upd_by_id AS upd_by_id, x_trx_log.class_type AS class_type, x_trx_log.object_id AS object_id, x_trx_log.parent_object_id AS parent_object_id, x_trx_log.parent_object_class_type AS parent_object_class_type, x_trx_log.attr_name AS attr_name, x_trx_log.parent_object_name AS parent_object_name, x_trx_log.object_name AS object_name, x_trx_log.prev_val AS prev_val, x_trx_log.new_val AS new_val, x_trx_log.trx_id AS trx_id, x_trx_log.action AS action, x_trx_log.sess_id AS sess_id, x_trx_log.req_id AS req_id, x_trx_log.sess_type AS sess_type from x_trx_log where id in(select min(x_trx_log.id) from x_trx_log group by x_trx_log.trx_id);
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint 0 NO 2 create_time datetime FALSE 3 update_time datetime FALSE 4 added_by_id bigint FALSE 5 upd_by_id bigint FALSE 6 class_type integer 0 NO 7 object_id bigint FALSE 8 parent_object_id bigint FALSE 9 parent_object_class_type integer 0 NO 10 attr_name varchar 255 FALSE 11 parent_object_name varchar 1,024 FALSE 12 object_name varchar 1,024 FALSE 13 prev_val mediumtext 1,67,77,215 FALSE 14 new_val mediumtext 1,67,77,215 FALSE 15 trx_id varchar 1,024 FALSE 16 action varchar 255 FALSE 17 sess_id varchar 512 FALSE 18 req_id varchar 30 FALSE 19 sess_type varchar 30 FALSE x_data_hist
Description: This table contains history of create, update and delete of objects service-defs, services and policies.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE 3 update_time datetime FALSE 4 obj_guid varchar 1,024 NO 5 obj_class_type integer NO 6 obj_id bigint NO 7 obj_name varchar 1,024 NO 8 version bigint FALSE 9 action varchar 512 NO 10 from_time datetime NO 11 to_time datetime FALSE 12 content text 65,535 NO x_modules_master
Description: (Table added to enable Permission model in Ranger).
This table contain all module details available in Ranger Admin. 'module' column contain name of module. Example of modules are 1) Resource Based Policies, 2) Users/Groups, 3) Audits Module.. etc.ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 create_time datetime FALSE 3 update_time datetime FALSE 4 added_by_id bigint FALSE 5 upd_by_id bigint FALSE 6 module varchar 1,024 NO 7 url varchar 1,024 FALSE x_group_module_perm
Description: (Table added to enable Permission model in Ranger).This table contains mapping of group and module. Important attributes are group_id, module_id, is_allowed. 'group_id' is foreign key of 'x_group.id' and 'module_id' is foreign key of 'x_modules_master.id' column. 'is_allowed' flag denotes whether a group has access to mapped group or not.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 group_id bigint FALSE MUL 3 module_id bigint FALSE MUL 4 create_time datetime FALSE 5 update_time datetime FALSE 6 added_by_id bigint FALSE 7 upd_by_id bigint FALSE 8 is_allowed integer 1 NO x_user_module_perm
Description:(Table added to enable Permission model in Ranger). This table contains mapping of user and module. Important attributes are user_id, module_id, is_allowed. 'user_id' is foreign key of 'x_portal_user.id' and 'module_id' is foreign key of 'x_modules_master.id' column. 'is_allowed' column value denotes whether a user has access to mapped user or not.
ORDINAL_POSITION COLUMN_NAME DATA_TYPE COLUMN_SIZE COLUMN_DEFAULT IS_NULLABLE COLUMN_KEY 1 id bigint NO PRI 2 user_id bigint FALSE MUL 3 module_id bigint FALSE MUL 4 create_time datetime FALSE 5 update_time datetime FALSE 6 added_by_id bigint FALSE 7 upd_by_id bigint FALSE 8 is_allowed integer 1 NO