[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-13 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Fix Version/s: trunk

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Fix For: trunk
>
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-13 Thread Di Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Di Li updated AMBARI-20697:
---
Resolution: Fixed
Status: Resolved  (was: Patch Available)

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Attachment: AMBARI-20697.PATCH

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Attachment: (was: AMBARI-20697.PATCH)

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Attachment: (was: AMBARI-20697.PATCH)

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Attachment: AMBARI-20697.PATCH

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Component/s: ambari-server

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Labels: stack stackadvisor  (was: )

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>  Labels: stack, stackadvisor
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Attachment: AMBARI-20697.PATCH

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
> Attachments: AMBARI-20697.PATCH
>
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (AMBARI-20697) Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin

2017-04-06 Thread Bharat Viswanadham (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-20697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharat Viswanadham updated AMBARI-20697:

Status: Patch Available  (was: Open)

> Stack advisor code in 2.3 refactor logic for ranger Kafka Plugin
> 
>
> Key: AMBARI-20697
> URL: https://issues.apache.org/jira/browse/AMBARI-20697
> Project: Ambari
>  Issue Type: Bug
>Reporter: Bharat Viswanadham
>Assignee: Bharat Viswanadham
>
>  if ranger_plugin_enabled:
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   if 'ranger-kafka-plugin-properties' in configurations and \
>   'ranger-kafka-plugin-enabled' in 
> configurations['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
>   # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not 
> changed,
>   # determine if the Ranger/Kafka plug-in enabled enabled or not
>   elif 'ranger-kafka-plugin-properties' in services['configurations'] and 
> \
>   'ranger-kafka-plugin-enabled' in 
> services['configurations']['ranger-kafka-plugin-properties']['properties']:
> ranger_plugin_enabled = 
> services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower()
>  == 'yes'
> # Determine the value for kafka-broker/authorizer.class.name
> if ranger_plugin_enabled:
>   # If the Ranger plugin for Kafka is enabled, set authorizer.class.name 
> to
>   # 
> "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" 
> whether Kerberos is
>   # enabled or not.
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
> elif security_enabled:
>   putKafkaBrokerProperty("authorizer.class.name", 
> 'kafka.security.auth.SimpleAclAuthorizer')
> else:
>   putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
> In the above code after ranger_plugin_enabled is true and inside conditions 
> don't match then also we set authorizer.class.name to RangerKafakAuthorizer.  
> So, to avoid this after checking ranger_plugin_enabled set to false and then 
> continue with code checking



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)