Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Changing Grouper ID

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Changing Grouper ID


Chronological Thread 
  • From: Thomas M Goerger <>
  • To: Chris Hyzer <>
  • Cc: "GW Brown, Information Systems and Computing" <>, Tom Barton <>, "" <>
  • Subject: RE: [grouper-users] Changing Grouper ID
  • Date: Tue, 13 May 2008 10:22:10 -0500 (CDT)

Is the sourceId what is coming from the remote source to be pulled in and
the subjectId what Grouper is setting when the user is pulled in? Maybe I
need to be trying to change the sourceId instead, to do what we need.

Our problem is coming in that when we change a user's information on our
test directory, Grouper is choking when we try to list members on any
group that this person is a member of, since it doesn't see that member in
the source anymore. I'm just trying to figure out how to reset that
user's name so that Grouper will recognize them.


On Mon, 12 May 2008, Chris Hyzer wrote:

> Hopefully this will help you out:
>
> 1. To see if the setSubjectId() method has worked, look in the
> grouper_members table. For the uuid / subjectId / subjectSourceId record,
> you should see the same uuid, and same sourceId, but different subjectId.
> 2. That is all that method does, so when you pull up a membership record,
> there could be a couple of things going on:
> 3. Most likely, the subject source has the wrong data. Search for and view
> the entity details for the subject (click on search on left menu, find and
> click on subject for details). Make sure that information is correct, if
> not, then the source system need to be updated (and that is outside of
> grouper, see the sources.xml). If you are using the subject tables that
> grouper shipped with, then you need to update those tables, the
> setSubjectId method will not change them I believe (correct me if wrong).
> Those are shipped generally to get up and running, and should generally be
> replaced with real tables/views/ldap in prod. However, if you use them,
> you might need to put more infrastructure in place like what we are
> discussing.
> 4. Less likely, but still possible, you need to make sure that the
> membership record you think you are looking at is really the one you are
> looking at. I have run into the situation that I have all these test
> sources and overlap and stuff, and the membership lists get confusing.
> Maybe its just me though. :)
>
> Good luck,
> Chris
>
>
> > -----Original Message-----
> > From: Thomas M Goerger
> > [mailto:]
> > Sent: Monday, May 12, 2008 1:31 PM
> > To: GW Brown, Information Systems and Computing
> > Cc: Tom Barton;
> >
> > Subject: Re: [grouper-users] Changing Grouper ID
> >
> > Hi,
> >
> > I've gotten these commands to all run, but it doesn't seem like the
> > change
> > is being reflected in the database. The name associated with the UUID
> > has
> > changed, but not the one that the UI displays when a group membership
> > listing is shown. This still shows the old name information. Is there
> > a
> > refresh that has to be done to make this happen, or do I need to change
> > a
> > different attribute.
> >
> > Thanks,
> >
> > Tom Goerger
> > University of Minnesota
> > Internet Services
> >
> >
> > On Wed, 23 Apr 2008, GW Brown, Information Systems and Computing wrote:
> >
> > > Tom,
> > >
> > > The session has to be a root session:
> > >
> > > root=SubjectFinder.findRootSubject()
> > > session=GrouperSession.start(root)
> > >
> > > subject=findSubject("<id>")
> > > member=MemberFinder.findBySubject(session,subject)
> > > member.setSubjectId("<newid>")
> > >
> > >
> > > Internally an InsufficientPrivilegeException is thrown. Unfortunately
> > that
> > > is not reflected in the error message you got - something we'll need
> > to
> > > work on.
> > >
> > > Gary
> > >
> > > --On 22 April 2008 12:53 -0500 Thomas M Goerger
> > > <>
> > > wrote:
> > >
> > > > I'm having a problem with the setSubjectID() command. I'm hitting
> > my
> > > > subject a little differently than below, which may be making the
> > > > difference? I'd rather not use the uuid, so I'm hitting the
> > subject as
> > > > follows:
> > > >
> > > > subject=findSubject("<id>")
> > > > session=GrouperSession.start(subject)
> > > > member=MemberFinder.findBySubject(session,subject)
> > > >
> > > > When I then try to run:
> > > >
> > > > member.setSubjectId("<newid>")
> > > >
> > > > I'm receiving the error:
> > > >
> > > > // Error: unable to evaluate command: Sourced file: inline
> > evaluation of:
> > > > ``member.setSubjectId("<newid>");'' : Method Invocation
> > > > member.setSubjectId
> > > >
> > > > Seems like its not seeing the setSubjectId subcommand at all. I'm
> > using
> > > > GrouperShell 0.1.1. Is there something off in my sequence that
> > might be
> > > > causing the problem?
> > > >
> > > > Thanks,
> > > >
> > > > Tom Goerger
> > > >
> > > >
> > > > On Thu, 17 Apr 2008, Tom Barton wrote:
> > > >
> > > >> Or you could use Grouper Shell to make the change. Using Gary's
> > code as
> > > >> a model, the corresponding sequence of gsh commands would be
> > > >>
> > > >> s=GrouperSession.start(SubjectFinder.findRootSubject())
> > > >> m=MemberFinder.findByUuid(s, "<uuid>")
> > > >> m.setSubjectId("newId")
> > > >>
> > > >> Tom
> > > >>
> > > >> GW Brown, Information Systems and Computing wrote:
> > > >> > No, you would need to write some code to do it. I'm sure we can
> > come up
> > > >> > with a command line script but we're busy getting 1.3.0 ready
> > just now.
> > > >> >
> > > >> > You could alter the database directly -
> > > >> >
> > > >> > update grouper_members set subject_id=:newId where
> > subject_id=:oldId
> > > >> >
> > > >> > The code would look something like:
> > > >> >
> > > >> > GrouperSession s =
> > > >> > GrouperSession.start(SubjectFinder.findRootSubject(); Member m =
> > > >> > MemberFinder.findByUuid(s, "<uuid>") ; //look up uuid in the db
> > > >> > m.setSubjectId(newId);
> > > >> >
> > > >> > Gary
> > > >> >
> > > >> > --On 17 April 2008 11:31 -0500 Thomas M Goerger
> > > >> > <>
> > wrote:
> > > >> >
> > > >> >> Do I just add that by adding the attribute to the
> > grouper.properties
> > > >> >> file,
> > > >> >> and setting it to true? And then rebuild the API?
> > > >> >>
> > > >> >>
> > > >> >> On Thu, 17 Apr 2008, GW Brown, Information Systems and
> > Computing
> > > >> >> wrote:
> > > >> >>
> > > >> >>> Hi Tom,
> > > >> >>>
> > > >> >>> Grouper does membership mapping against a row in
> > grouper_members. You
> > > >> >>> can
> > > >> >>> change the subject id there and all the group memberships /
> > > >> >>> privileges still work because they map to a group using the
> > member
> > > >> >>> uuid.
> > > >> >>>
> > > >> >>> There is a Member.setSubjectId method which allows
> > GrouperSystem to
> > > >> >>> do this change via the API.
> > > >> >>>
> > > >> >>> Gary
> > > >> >>>
> > > >> >>> --On 17 April 2008 09:56 -0500 Thomas M Goerger
> > > >> >>> <>
> > wrote:
> > > >> >>>
> > > >> >>> > Hi,
> > > >> >>> >
> > > >> >>> > I'm having an issue with changing the underlying name that
> > Grouper
> > > >> >>> > is using to identify a user. We have an attribute called
> > > >> >>> > OfficialName that we want to use as the unique identifier in
> > > >> >>> > Grouper. Changing this value, as might happen if someone
> > has a
> > > >> >>> > legal name change, seems to be problematic for Grouper. It
> > > >> >>> > recognizes the change if you do another search, but if you
> > try to
> > > >> >>> > list members in a group where one of the names has been
> > changed,
> > > >> >>> > Grouper spits back a Runtime Exception.
> > > >> >>> >
> > > >> >>> > Anyone else dealt with this at all? How do you deal with a
> > > >> >>> > changing id in your implementation?
> > > >> >>> >
> > > >> >>> > Thanks,
> > > >> >>> >
> > > >> >>> > Tom Goerger
> > > >> >>> > University of Minnesota - Internet Services
> > > >> >>> >
> > > >> >>>
> > > >> >>>
> > > >> >>>
> > > >> >>> ----------------------
> > > >> >>> GW Brown, Information Systems and Computing
> > > >> >>>
> > > >> >>>
> > > >> >
> > > >> >
> > > >> >
> > > >> > ----------------------
> > > >> > GW Brown, Information Systems and Computing
> > > >> >
> > > >>
> > >
> > >
> > >
> > > ----------------------
> > > GW Brown, Information Systems and Computing
> > >
> > >
>



Archive powered by MHonArc 2.6.16.

Top of Page