[ 
https://issues.apache.org/jira/browse/ARTEMIS-3474?focusedWorklogId=649862&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-649862
 ]

ASF GitHub Bot logged work on ARTEMIS-3474:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Sep/21 08:07
            Start Date: 13/Sep/21 08:07
    Worklog Time Spent: 10m 
      Work Description: brusdev commented on a change in pull request #3741:
URL: https://github.com/apache/activemq-artemis/pull/3741#discussion_r707089490



##########
File path: 
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/factory/jmx/ManagementFactory.java
##########
@@ -67,9 +69,19 @@ public static ManagementContext create(ManagementContextDTO 
config, ActiveMQSecu
       if (config.getAuthorisation() != null) {
          AuthorisationDTO authorisation = config.getAuthorisation();
          JMXAccessControlList accessControlList = new JMXAccessControlList();
-         List<EntryDTO> entries = authorisation.getWhiteList().getEntries();
-         for (EntryDTO entry : entries) {
-            accessControlList.addToWhiteList(entry.domain, entry.key);
+         //deprecated but here for backward compatibility
+         WhiteListDTO whiteList = authorisation.getWhiteList();
+         if (whiteList != null) {
+            for (EntryDTO entry : whiteList.getEntries()) {
+               accessControlList.addToAllowList(entry.domain, entry.key);

Review comment:
       A warning could help soft migration to allowList before the removal

##########
File path: 
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/factory/jmx/ManagementFactory.java
##########
@@ -67,9 +69,19 @@ public static ManagementContext create(ManagementContextDTO 
config, ActiveMQSecu
       if (config.getAuthorisation() != null) {
          AuthorisationDTO authorisation = config.getAuthorisation();
          JMXAccessControlList accessControlList = new JMXAccessControlList();
-         List<EntryDTO> entries = authorisation.getWhiteList().getEntries();
-         for (EntryDTO entry : entries) {
-            accessControlList.addToWhiteList(entry.domain, entry.key);
+         //deprecated but here for backward compatibility
+         WhiteListDTO whiteList = authorisation.getWhiteList();
+         if (whiteList != null) {
+            for (EntryDTO entry : whiteList.getEntries()) {
+               accessControlList.addToAllowList(entry.domain, entry.key);
+            }
+         }
+
+         AllowListDTO allowList = authorisation.getAllowList();
+         if (allowList != null) {

Review comment:
       An error if both whiteList and allowList are not null could help to 
detect wrong configs

##########
File path: docs/user-manual/en/management.md
##########
@@ -305,26 +305,26 @@ the broker's JAAS plugin support.  This is configured via 
the `authorisation`
 element in the `management.xml` configuration file and can be used to restrict
 access to attributes and methods on MBeans.
 
-There are 3 elements within the `authorisation` element, `whitelist`,
+There are 3 elements within the `authorisation` element, `allowlist`,

Review comment:
       Maybe, a comment on the deprecation could help to manage previous configs




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 649862)
    Time Spent: 20m  (was: 10m)

> Replace use of non-inclusive terms throughout source code, comments and 
> documentation
> -------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3474
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3474
>             Project: ActiveMQ Artemis
>          Issue Type: Task
>            Reporter: Andy Taylor
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> this follows up on the ActiveMQ  Jira at 
> https://issues.apache.org/jira/browse/AMQ-7514 but for Artemis . The 
> conversation is on this Jira and in the forum



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to