Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2.5
-
Component/s: user management
-
Labels:None
-
Environment:Archiva 1.2.2 and Continuum 1.3.4 deployed as war files on a Tomcat 6.0.20.
Operating System Linux 2.6.26-2-amd64 / debian 5.0.3
Shared users database on mysql 5.1.41 (but InnoDB as default-storage-engine)
Sun JDK 1.6.0_12-b04
-
Number of attachments :
Description
Don't know if this is a redback issue or it belongs to archiva/continuum.
My continuum / archive user database is shared on a mysql server.
The problem in my setup is, that the sharing is not working for roles.
If I use the guest account and assing role "Global Repository Observer" (for anonymous download) in Archiva the roles are set, but
all roles previously assigned in Continuum are gone. If I later switch to Continuum and assign role "Continuum Group Project User" (for read-only overview) to "guest"
all roles added by archiva are gone, so it seems a shared user database is only possible for passwords, but not for roles.
mysql> select * from SECURITY_USERASSIGNMENT_ROLENAMES where PRINCIPAL_OID = 'guest';
----------------------------------------------------
| PRINCIPAL_OID | STRING_ELE | INTEGER_IDX |
----------------------------------------------------
| guest | Guest | 0 |
| guest | Global Repository Observer | 1 |
----------------------------------------------------
2 rows in set (0.00 sec)
// assinging roles in continuum
mysql> select * from SECURITY_USERASSIGNMENT_ROLENAMES where PRINCIPAL_OID = 'guest';
------------------------------------------------------
| PRINCIPAL_OID | STRING_ELE | INTEGER_IDX |
------------------------------------------------------
| guest | Guest | 0 |
| guest | Continuum Group Project User | 1 |
------------------------------------------------------
Issue Links
- is depended upon by
-
CONTINUUM-2003
Edit roles deletes all existing roles when sharing a user database
-
-
MRM-1369
Editing user roles in archiva clobbers continuum redback roles
-
- relates to
-
CONTINUUM-2497
Editing user roles in continuum clobbers archiva redback roles
-
The problem is that org.codehaus.plexus.redback.struts2.action.admin.AssignmentsAction in redback-struts2-integration assumes that it can consider all roles in the user database as belonging to the application executing the action. The action assumes that all active roles are selected when the edituser() method is invoked. It assumes all other roles are to be removed.
When using archiva and continuum with the same user database, using the action to save role assignments properly saves the roles for the application executing the action. Unfortunately, it also removes all roles in the database not belonging to the application.
I'm attaching a patch that includes a test for the condition as well as a fix.