Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #6719 (closed)

Opened 13 years ago

Closed 9 years ago

LDAP: Add DN for groups

Reported by: jamoore Owned by: jamoore
Priority: critical Milestone: 5.1.0-m2
Component: Security Version: 5.0.5
Keywords: n.a. Cc: bpindelski, cxallan, atarkowska, sylittlewood
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description (last modified by jmoore)

While working on #6248 (#6702 et al) it was brought up that perhaps we shouldn't remove users from groups that are not present in LDAP. To safely do that, however, we will need to detect which groups were created via LDAP by setting a DN for them. These values may should be exposed via the Hibernate objects (experimenter, experimentergroup) rather than as a hidden column of the permission table. Administrators would need to set the DN for all of their LDAP groups after the upgrade.

See also #2587 which points perhaps to a "SOURCE" column rather than the actual DN. If each experimenter and or experimenter-group could be flagged as "from LDAP" or similar, then we wouldn't need to duplicate and synchronized the DN. Would we need to include the LDAP source URL, though? What happens if it changes? Do we then need an "LDAPSource" in the DB? Etc.

Change History (15)

comment:1 Changed 13 years ago by jmoore

  • Description modified (diff)
  • Milestone changed from Unscheduled to OME-5.0

comment:2 Changed 12 years ago by bpindelski

Referencing ticket #8344 has changed sprint.

comment:3 Changed 12 years ago by jmoore

Referencing ticket #8344 has changed sprint.

comment:4 Changed 12 years ago by jmoore

  • Milestone changed from OMERO-Beta4.4 to OMERO-Beta4.4.1

Pushing.

comment:5 Changed 12 years ago by jmoore

  • Cc bpindelski added
  • Milestone changed from OMERO-4.4.x to OMERO-4.4.2
  • Sprint set to 2012-08-28 (3)
  • Status changed from new to accepted

comment:6 Changed 12 years ago by jmoore

  • Resolution set to fixed
  • Status changed from accepted to closed

Solution taken is the simplest of adding an "ldap" column to the experimentergroup table. The setDN method will be overloaded to allow enabling/disabling this flag on groups.

Work currently pushed to https://github.com/joshmoore/openmicroscopy/tree/8344-ldap-groups for review. That branch will need to be rebased so I haven't yet created a PR. Exposing the values via hibernate and other API changes will be done by #9481 (LDAP API breakages)

comment:7 Changed 12 years ago by jmoore <josh@…>

(In [9156ab7e83fbd1c121af5d6cba2b168efcc714b7/ome.git] on branch develop) Add test for ldap-only group synchronization (See #6719)

The warning under sync_on_login applies since previously
OMERO couldn't tell if a group was created via LDAP or
not. This (currently failing test) shows that the manually
create group is removed on login.

comment:8 Changed 10 years ago by jamoore

  • Milestone changed from OMERO-4.4.4 to 5.1.0-m2
  • Resolution fixed deleted
  • Sprint 2012-08-28 (3) deleted
  • Status changed from closed to reopened
  • Version set to 5.0.5

Re-opening for possible investigation along with #2587.

comment:9 Changed 9 years ago by bpindelski

I've started working on this on https://github.com/bpindelski/openmicroscopy/tree/6719_group_dn. The main issue for the upgrade script is the filling in of the "ldap" column values during upgrade. The SQL script itself won't have access to the LDAP server and I don't think there is a way of using the event log to check which groups were created for an LDAP-sourced user (I might be missing some information; I'll check what is stored in the DB during and LDAP user creation). In such a case, we would need a server-startup script which would at most once update the column values by contacting the LDAP server and querying for groups for a user that has "ldap == true".

Josh: any suggestions?

comment:10 Changed 9 years ago by jamoore

I would start off by making all groups non-LDAP. Depending on how the functionality is modified to make use of that, we can either tell sysadmins to manually modify, or perhaps provide a bin/omero ldap discover like mechanism for activating the groups.

comment:11 Changed 9 years ago by bpindelski

The disabling of the LDAP property for groups initially was indeed something I planned. I do like the idea of a CLI command that would then update the property. Thanks, Josh.

comment:13 Changed 9 years ago by bpindelski

Things left to do:

  • bin/omero ldap discover for groups,
  • setting/resetting of the "ldap" field on a group per CLI and API - the setDN method can certainly be removed, as the "ldap" field can be accessed through the user/group object,
  • group LDAP status display in client (Web first, then Insight if applicable),
  • review impact of sync_on_login on the current state of model/API changes.
Last edited 9 years ago by bpindelski (previous) (diff)

comment:15 Changed 9 years ago by Josh Moore <josh.moore@…>

  • Remaining Time set to 0
  • Resolution set to fixed
  • Status changed from reopened to closed

(In [a374e5c492b1cb3ddb1e588549f02b5e60f44810/ome.git] on branch develop) Merge pull request #3193 from ximenesuk/6719_group_dn

Add DN for groups (fix #6719).

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.96742 sec.)

We're Hiring!