Articles in this section

why are user roles not granted to a user on a mix environment cluster?

Detail

Creating a user and role in a single command from asadm does not grant the expected roles if ran in a mix environment comprised on Aerospike server version 4.9.x and 6.x.
Issue is due to a known bug AER-6615 and has been hotfixed in 5.7.0.30+, 6.0.0.14+, 6.1.0.12+, 6.2.0.7+ server versions.
 

Answer

Grating of a role while creating the user does not work as expected in a mix environemnt.
 
Admin+> manage acl create user app_wiper3 password 'test123' roles app_role                                                                                                                    
Successfully created user app_wiper3.
Admin+> show user                                                                                                                                                                                   
~~Users (2023-02-28 22:33:57 UTC)~~~
      User|        Roles|Connections
admin     |   user-admin|5          
app_wiper |           --|--         
app_wiper2|           --|--         
app_wiper3|           --|--         
test      |app_role|--         
Number of rows: 5

The work around is to grant the roles in a separate command:
 
Admin+> manage acl grant user app_wiper roles app_role                                                                                                                                         
Successfully granted roles to user app_wiper.
Admin+> show user                                                                                                                                                                                   
~~Users (2023-02-28 22:35:09 UTC)~~~
      User|        Roles|Connections
admin     |   user-admin|4          
app_wiper |app_role|--         
app_wiper2|           --|--         
app_wiper3|           --|--         
test      |app_role|--         
Number of rows: 5

Issue does not occur when the cluster is not mixed. (all nodes are version 6.x)
 
Admin+> manage acl create user app_wiper4 password 'test123' roles app_role data-admin                                                                                                         
Successfully created user app_wiper4.
Admin+> show user                                                                                                                                                                                   
~~~~~~~~~~~~~~~Users (2023-02-28 22:52:13 UTC)~~~~~~~~~~~~~~~
      User|                                 Roles|Connections
admin     |                            user-admin|4                
app_wiper4|              app_role,data-admin|--         
test      |                         app_role|--         
Number of rows: 6

 

Notes

Issue is due to bug 
AER-6615 (SMD) A module that is continually retransmitting may block another module's 'set' operations.

Fix versions: 5.7.0.30+, 6.0.0.14+, 6.1.0.12+, 6.2.0.7+


Applies To Earliest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful