jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Redback
  • REDBACK-253

sharing database not working

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major 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

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

------------------------------------------------------

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    REDBACK-253.patch
    25/Jan/10 9:16 PM
    12 kB
    Brent N Atkinson

Issue Links

is depended upon by

Bug - A problem which impairs or prevents the functions of the product. CONTINUUM-2003 Edit roles deletes all existing roles when sharing a user database

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. MRM-1369 Editing user roles in archiva clobbers continuum redback roles

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. CONTINUUM-2497 Editing user roles in continuum clobbers archiva redback roles

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brent N Atkinson added a comment - 25/Jan/10 9:11 PM

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.

Show
Brent N Atkinson added a comment - 25/Jan/10 9:11 PM 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.
Hide
Permalink
Brett Porter added a comment - 05/Aug/10 6:58 AM

applied, thanks!

Show
Brett Porter added a comment - 05/Aug/10 6:58 AM applied, thanks!

People

  • Assignee:
    Brett Porter
    Reporter:
    Reimer Prochnow
Vote (1)
Watch (2)

Dates

  • Created:
    15/Dec/09 10:18 AM
    Updated:
    25/Nov/10 12:26 AM
    Resolved:
    05/Aug/10 6:58 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.