You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@freestoneinfotech.com> on 2016/04/26 10:57:29 UTC
Review Request 46673: RANGER-951 : Modify ranger-admin to put
stackdef for specified components
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46673/
-----------------------------------------------------------
Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
Bugs: RANGER-951
https://issues.apache.org/jira/browse/RANGER-951
Repository: ranger
Description
-------
**Problem Statement :** Currently Ranger-admin shows all component in UI, Ranger-admin should have option to configure specified component so that only specified component support is enabled from Ranger-admin UI.
**Proposed Solution :**
Added a configuration in ranger-admin-site.xml that would specify:
<property>
<name>ranger.supportedcomponents</name>
<value>storm,kafka,hbase</value>
</property>
When the parameter value is not empty, Ranger Admin bootstrap will load only the specified component's Ranger stack-definitions. If the parameter does not exist or empty, then all stack-definitions of all known components (HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr, KMS) would be loaded during bootstrap.
**Known Issue :** If first time/previous installation was done with more number of components or with all components and later if Ranger-service is started with lesser number of components then Ranger will show all service components.
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java b67c52d
security-admin/scripts/install.properties 3913254
security-admin/scripts/setup.sh 51daf6d
security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 8305f07
security-admin/src/main/resources/conf.dist/ranger-admin-site.xml 7d748c5
Diff: https://reviews.apache.org/r/46673/diff/
Testing
-------
**Steps Performed(with patch)**
---
**Case : 1** Fresh Installation case (with specific components)
1. Configured value of 'policymgr_supportedcomponents' property to 'hdfs,hive,hbase' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for only hdfs, hive and hbase components.
**Actual Behaviour **
1. Only hdfs, hive and hbase components were listed in service manager page.
---
**Case : 2** Fresh Installation case (with all components)
1. Configured value of 'policymgr_supportedcomponents' property to '' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for all components.
**Actual Behaviour **
1. All components(HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr) were listed in service manager page.
2. Tag service was shown after clicking on 'Tag based policies' menu.
3. Was able to see KMS service also from keyadmin user login credentials.
Thanks,
Pradeep Agrawal
Re: Review Request 46673: RANGER-951 : Modify ranger-admin to put
stackdef for specified components
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46673/#review130634
-----------------------------------------------------------
Fix it, then Ship it!
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java (line 119)
<https://reviews.apache.org/r/46673/#comment194446>
Consider the following updates for better readability:
class EmbeddedServiceDefsUtil {
Set<String> supportedServiceDefs;
public void init(ServiceStore store) {
supportedServiceDef = getSupportedServiceDef();
// no other change in this method
// ...
}
public RangerServiceDef getOrCreateServiceDef(ServiceStore store, String serviceDefName) {
// ..
boolean createServiceDef = (CollectionUtils.isEmpty(supportedServiceDefs) || supportedServiceDefs.contains(serviceDefName));
if(ret == null && createEmbeddedServiceDefs && createServiceDef) {
// create
}
}
- Madhan Neethiraj
On April 26, 2016, 8:57 a.m., Pradeep Agrawal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46673/
> -----------------------------------------------------------
>
> (Updated April 26, 2016, 8:57 a.m.)
>
>
> Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-951
> https://issues.apache.org/jira/browse/RANGER-951
>
>
> Repository: ranger
>
>
> Description
> -------
>
> **Problem Statement :** Currently Ranger-admin shows all component in UI, Ranger-admin should have option to configure specified component so that only specified component support is enabled from Ranger-admin UI.
>
> **Proposed Solution :**
>
> Added a configuration in ranger-admin-site.xml that would specify:
> <property>
> <name>ranger.supportedcomponents</name>
> <value>storm,kafka,hbase</value>
> </property>
> When the parameter value is not empty, Ranger Admin bootstrap will load only the specified component's Ranger stack-definitions. If the parameter does not exist or empty, then all stack-definitions of all known components (HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr, KMS) would be loaded during bootstrap.
>
> **Known Issue :** If first time/previous installation was done with more number of components or with all components and later if Ranger-service is started with lesser number of components then Ranger will show all service components.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java b67c52d
> security-admin/scripts/install.properties 3913254
> security-admin/scripts/setup.sh 51daf6d
> security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 8305f07
> security-admin/src/main/resources/conf.dist/ranger-admin-site.xml 7d748c5
>
> Diff: https://reviews.apache.org/r/46673/diff/
>
>
> Testing
> -------
>
> **Steps Performed(with patch)**
> ---
> **Case : 1** Fresh Installation case (with specific components)
> 1. Configured value of 'policymgr_supportedcomponents' property to 'hdfs,hive,hbase' in install.properties file.
> 2. Installed Ranger and started Ranger admin service.
> 3. Logged in to Ranger-admin
>
> **Expected Behaviour :**
> 1. Ranger admin should show services for only hdfs, hive and hbase components.
>
> **Actual Behaviour **
> 1. Only hdfs, hive and hbase components were listed in service manager page.
>
> ---
> **Case : 2** Fresh Installation case (with all components)
> 1. Configured value of 'policymgr_supportedcomponents' property to '' in install.properties file.
> 2. Installed Ranger and started Ranger admin service.
> 3. Logged in to Ranger-admin
>
> **Expected Behaviour :**
> 1. Ranger admin should show services for all components.
>
> **Actual Behaviour **
> 1. All components(HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr) were listed in service manager page.
> 2. Tag service was shown after clicking on 'Tag based policies' menu.
> 3. Was able to see KMS service also from keyadmin user login credentials.
>
>
> Thanks,
>
> Pradeep Agrawal
>
>
Re: Review Request 46673: RANGER-951 : Modify ranger-admin to put
stackdef for specified components
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46673/#review130911
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On April 28, 2016, 10:03 a.m., Pradeep Agrawal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46673/
> -----------------------------------------------------------
>
> (Updated April 28, 2016, 10:03 a.m.)
>
>
> Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-951
> https://issues.apache.org/jira/browse/RANGER-951
>
>
> Repository: ranger
>
>
> Description
> -------
>
> **Problem Statement :** Currently Ranger-admin shows all component in UI, Ranger-admin should have option to configure specified component so that only specified component support is enabled from Ranger-admin UI.
>
> **Proposed Solution :**
>
> Added a configuration in ranger-admin-site.xml that would specify:
> <property>
> <name>ranger.supportedcomponents</name>
> <value>storm,kafka,hbase</value>
> </property>
> When the parameter value is not empty, Ranger Admin bootstrap will load only the specified component's Ranger stack-definitions. If the parameter does not exist or empty, then all stack-definitions of all known components (HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr, KMS) would be loaded during bootstrap.
>
> **Known Issue :** If first time/previous installation was done with more number of components or with all components and later if Ranger-service is started with lesser number of components then Ranger will show all service components.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java b67c52d
> security-admin/scripts/install.properties 3913254
> security-admin/scripts/setup.sh 51daf6d
> security-admin/scripts/update_property.py ba2aec8
> security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 8305f07
> security-admin/src/main/resources/conf.dist/ranger-admin-site.xml 7d748c5
>
> Diff: https://reviews.apache.org/r/46673/diff/
>
>
> Testing
> -------
>
> **Steps Performed(with patch)**
> ---
> **Case : 1** Fresh Installation case (with specific components)
> 1. Configured value of 'policymgr_supportedcomponents' property to 'hdfs,hive,hbase' in install.properties file.
> 2. Installed Ranger and started Ranger admin service.
> 3. Logged in to Ranger-admin
>
> **Expected Behaviour :**
> 1. Ranger admin should show services for only hdfs, hive and hbase components.
>
> **Actual Behaviour **
> 1. Only hdfs, hive and hbase components were listed in service manager page.
>
> ---
> **Case : 2** Fresh Installation case (with all components)
> 1. Configured value of 'policymgr_supportedcomponents' property to '' in install.properties file.
> 2. Installed Ranger and started Ranger admin service.
> 3. Logged in to Ranger-admin
>
> **Expected Behaviour :**
> 1. Ranger admin should show services for all components.
>
> **Actual Behaviour **
> 1. All components(HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr) were listed in service manager page.
> 2. Tag service was shown after clicking on 'Tag based policies' menu.
> 3. Was able to see KMS service also from keyadmin user login credentials.
>
>
> Thanks,
>
> Pradeep Agrawal
>
>
Re: Review Request 46673: RANGER-951 : Modify ranger-admin to put
stackdef for specified components
Posted by Pradeep Agrawal <pr...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46673/
-----------------------------------------------------------
(Updated April 28, 2016, 10:03 a.m.)
Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
Changes
-------
Addressed review comments and tested in local environment.
Bugs: RANGER-951
https://issues.apache.org/jira/browse/RANGER-951
Repository: ranger
Description
-------
**Problem Statement :** Currently Ranger-admin shows all component in UI, Ranger-admin should have option to configure specified component so that only specified component support is enabled from Ranger-admin UI.
**Proposed Solution :**
Added a configuration in ranger-admin-site.xml that would specify:
<property>
<name>ranger.supportedcomponents</name>
<value>storm,kafka,hbase</value>
</property>
When the parameter value is not empty, Ranger Admin bootstrap will load only the specified component's Ranger stack-definitions. If the parameter does not exist or empty, then all stack-definitions of all known components (HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr, KMS) would be loaded during bootstrap.
**Known Issue :** If first time/previous installation was done with more number of components or with all components and later if Ranger-service is started with lesser number of components then Ranger will show all service components.
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java b67c52d
security-admin/scripts/install.properties 3913254
security-admin/scripts/setup.sh 51daf6d
security-admin/scripts/update_property.py ba2aec8
security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 8305f07
security-admin/src/main/resources/conf.dist/ranger-admin-site.xml 7d748c5
Diff: https://reviews.apache.org/r/46673/diff/
Testing
-------
**Steps Performed(with patch)**
---
**Case : 1** Fresh Installation case (with specific components)
1. Configured value of 'policymgr_supportedcomponents' property to 'hdfs,hive,hbase' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for only hdfs, hive and hbase components.
**Actual Behaviour **
1. Only hdfs, hive and hbase components were listed in service manager page.
---
**Case : 2** Fresh Installation case (with all components)
1. Configured value of 'policymgr_supportedcomponents' property to '' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for all components.
**Actual Behaviour **
1. All components(HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr) were listed in service manager page.
2. Tag service was shown after clicking on 'Tag based policies' menu.
3. Was able to see KMS service also from keyadmin user login credentials.
Thanks,
Pradeep Agrawal
Re: Review Request 46673: RANGER-951 : Modify ranger-admin to put
stackdef for specified components
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46673/#review130887
-----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java (line 235)
<https://reviews.apache.org/r/46673/#comment194818>
When the property value is empty (i.e. property is present in the configuration with empty value - which is different from property not present), get() method would return empty string. In such case, set ranger_supportedcomponents to DEFAULT_BOOTSTRAP_SERVICEDEF_LIST and modify the following if/else, so that this value will be processed.
- Madhan Neethiraj
On April 28, 2016, 6:27 a.m., Pradeep Agrawal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46673/
> -----------------------------------------------------------
>
> (Updated April 28, 2016, 6:27 a.m.)
>
>
> Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-951
> https://issues.apache.org/jira/browse/RANGER-951
>
>
> Repository: ranger
>
>
> Description
> -------
>
> **Problem Statement :** Currently Ranger-admin shows all component in UI, Ranger-admin should have option to configure specified component so that only specified component support is enabled from Ranger-admin UI.
>
> **Proposed Solution :**
>
> Added a configuration in ranger-admin-site.xml that would specify:
> <property>
> <name>ranger.supportedcomponents</name>
> <value>storm,kafka,hbase</value>
> </property>
> When the parameter value is not empty, Ranger Admin bootstrap will load only the specified component's Ranger stack-definitions. If the parameter does not exist or empty, then all stack-definitions of all known components (HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr, KMS) would be loaded during bootstrap.
>
> **Known Issue :** If first time/previous installation was done with more number of components or with all components and later if Ranger-service is started with lesser number of components then Ranger will show all service components.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java b67c52d
> security-admin/scripts/install.properties 3913254
> security-admin/scripts/setup.sh 51daf6d
> security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 8305f07
> security-admin/src/main/resources/conf.dist/ranger-admin-site.xml 7d748c5
>
> Diff: https://reviews.apache.org/r/46673/diff/
>
>
> Testing
> -------
>
> **Steps Performed(with patch)**
> ---
> **Case : 1** Fresh Installation case (with specific components)
> 1. Configured value of 'policymgr_supportedcomponents' property to 'hdfs,hive,hbase' in install.properties file.
> 2. Installed Ranger and started Ranger admin service.
> 3. Logged in to Ranger-admin
>
> **Expected Behaviour :**
> 1. Ranger admin should show services for only hdfs, hive and hbase components.
>
> **Actual Behaviour **
> 1. Only hdfs, hive and hbase components were listed in service manager page.
>
> ---
> **Case : 2** Fresh Installation case (with all components)
> 1. Configured value of 'policymgr_supportedcomponents' property to '' in install.properties file.
> 2. Installed Ranger and started Ranger admin service.
> 3. Logged in to Ranger-admin
>
> **Expected Behaviour :**
> 1. Ranger admin should show services for all components.
>
> **Actual Behaviour **
> 1. All components(HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr) were listed in service manager page.
> 2. Tag service was shown after clicking on 'Tag based policies' menu.
> 3. Was able to see KMS service also from keyadmin user login credentials.
>
>
> Thanks,
>
> Pradeep Agrawal
>
>
Re: Review Request 46673: RANGER-951 : Modify ranger-admin to put
stackdef for specified components
Posted by Pradeep Agrawal <pr...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46673/
-----------------------------------------------------------
(Updated April 28, 2016, 6:27 a.m.)
Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
Changes
-------
Updated patch to create/enable default service def if 'ranger.supportedcomponents' property is not provided.
Bugs: RANGER-951
https://issues.apache.org/jira/browse/RANGER-951
Repository: ranger
Description
-------
**Problem Statement :** Currently Ranger-admin shows all component in UI, Ranger-admin should have option to configure specified component so that only specified component support is enabled from Ranger-admin UI.
**Proposed Solution :**
Added a configuration in ranger-admin-site.xml that would specify:
<property>
<name>ranger.supportedcomponents</name>
<value>storm,kafka,hbase</value>
</property>
When the parameter value is not empty, Ranger Admin bootstrap will load only the specified component's Ranger stack-definitions. If the parameter does not exist or empty, then all stack-definitions of all known components (HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr, KMS) would be loaded during bootstrap.
**Known Issue :** If first time/previous installation was done with more number of components or with all components and later if Ranger-service is started with lesser number of components then Ranger will show all service components.
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java b67c52d
security-admin/scripts/install.properties 3913254
security-admin/scripts/setup.sh 51daf6d
security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 8305f07
security-admin/src/main/resources/conf.dist/ranger-admin-site.xml 7d748c5
Diff: https://reviews.apache.org/r/46673/diff/
Testing
-------
**Steps Performed(with patch)**
---
**Case : 1** Fresh Installation case (with specific components)
1. Configured value of 'policymgr_supportedcomponents' property to 'hdfs,hive,hbase' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for only hdfs, hive and hbase components.
**Actual Behaviour **
1. Only hdfs, hive and hbase components were listed in service manager page.
---
**Case : 2** Fresh Installation case (with all components)
1. Configured value of 'policymgr_supportedcomponents' property to '' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for all components.
**Actual Behaviour **
1. All components(HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr) were listed in service manager page.
2. Tag service was shown after clicking on 'Tag based policies' menu.
3. Was able to see KMS service also from keyadmin user login credentials.
Thanks,
Pradeep Agrawal
Re: Review Request 46673: RANGER-951 : Modify ranger-admin to put
stackdef for specified components
Posted by Pradeep Agrawal <pr...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46673/
-----------------------------------------------------------
(Updated April 28, 2016, 4:40 a.m.)
Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
Changes
-------
Addressed review comments and tested in local environment
Bugs: RANGER-951
https://issues.apache.org/jira/browse/RANGER-951
Repository: ranger
Description
-------
**Problem Statement :** Currently Ranger-admin shows all component in UI, Ranger-admin should have option to configure specified component so that only specified component support is enabled from Ranger-admin UI.
**Proposed Solution :**
Added a configuration in ranger-admin-site.xml that would specify:
<property>
<name>ranger.supportedcomponents</name>
<value>storm,kafka,hbase</value>
</property>
When the parameter value is not empty, Ranger Admin bootstrap will load only the specified component's Ranger stack-definitions. If the parameter does not exist or empty, then all stack-definitions of all known components (HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr, KMS) would be loaded during bootstrap.
**Known Issue :** If first time/previous installation was done with more number of components or with all components and later if Ranger-service is started with lesser number of components then Ranger will show all service components.
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java b67c52d
security-admin/scripts/install.properties 3913254
security-admin/scripts/setup.sh 51daf6d
security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 8305f07
security-admin/src/main/resources/conf.dist/ranger-admin-site.xml 7d748c5
Diff: https://reviews.apache.org/r/46673/diff/
Testing
-------
**Steps Performed(with patch)**
---
**Case : 1** Fresh Installation case (with specific components)
1. Configured value of 'policymgr_supportedcomponents' property to 'hdfs,hive,hbase' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for only hdfs, hive and hbase components.
**Actual Behaviour **
1. Only hdfs, hive and hbase components were listed in service manager page.
---
**Case : 2** Fresh Installation case (with all components)
1. Configured value of 'policymgr_supportedcomponents' property to '' in install.properties file.
2. Installed Ranger and started Ranger admin service.
3. Logged in to Ranger-admin
**Expected Behaviour :**
1. Ranger admin should show services for all components.
**Actual Behaviour **
1. All components(HDFS, Hive, HBase, Knox, Storm, YARN, Kafka, Solr) were listed in service manager page.
2. Tag service was shown after clicking on 'Tag based policies' menu.
3. Was able to see KMS service also from keyadmin user login credentials.
Thanks,
Pradeep Agrawal