Manage memberships in Activities with WSadmin

From my blog @ e-office

One of my colleagues Talitha came with a question to become
owner of an activity. Currently she is replacing Pauline. She allso
needed owner rights on a few activities owned by Pauline.

For now Pauline wasn’t around, so she couldn’t delegate owner access
to Talitha, so I gave the wsadmin commands to administer Activities a go.

con10:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin # !782
./wsadmin.sh -lang jython -username wasadmin -password jibbajabbapassword -port 8880

talitha=MemberService.fetchMemberByName(“Talitha Hiemstra” )
// Fetch the new owner of the activity
pauline=MemberService.fetchMemberByName(“Pauline Huijzer” )
// Fetch the current owner of the activity

ActivityService.fetchActivitiesOwnedByMember(pauline)
// Fetch all the activities owned by Pauline

You will get them in a nice “list” of all the activities owned by Pauline.

[{createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=9DEG0A6482142BD5A1BAFB3AE4BF75000313, modifiedBy=Eline Roelfsema, isCompleted=false, modifiedDate=February 9, 2009 8:25:21 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=December 9, 2008 3:38:07 PM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=CB2G0A6482148C6D604016D9755895000142, modifiedBy=Talitha Hiemstra, isCompleted=false, modifiedDate=February 11, 2009 8:52:36 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=October 6, 2008 12:11:08 PM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=C03G0A6482142378A24E533036432B000267, modifiedBy=Talitha Hiemstra, isCompleted=false, modifiedDate=February 11, 2009 9:02:53 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=November 13, 2008 3:52:55 PM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=240G0A6482142378A24E533036432B0000B9, modifiedBy=Gerard van Reeken, isCompleted=false, modifiedDate=February 11, 2009 8:52:36 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=November 6, 2008 4:44:25 PM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=058G0A6482148F1FEB81155CB380B20000A2, modifiedBy=Pauline Huijzer, isCompleted=false, modifiedDate=January 12, 2009 1:36:13 PM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=January 12, 2009 10:17:04 AM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=D0DG0A648214CF481D90E02427DC65000900, modifiedBy=Talitha Hiemstra, isCompleted=false, modifiedDate=February 11, 2009 8:52:37 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=September 4, 2008 2:18:12 PM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=B18G0A648214CE3163832B3B422AEA000672, modifiedBy=Activities Administrator, isCompleted=true, modifiedDate=October 2, 2008 9:52:07 AM CEST, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=September 26, 2008 2:36:37 PM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=A25G0A6482143B97A487BBAF07E352000148, modifiedBy=Pauline Huijzer, isCompleted=false, modifiedDate=January 21, 2009 5:51:40 PM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=December 12, 2008 5:23:37 PM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=E8CG0A6482143B97A487BBAF07E352000101, modifiedBy=Pauline Huijzer, isCompleted=false, modifiedDate=February 11, 2009 9:02:54 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=December 12, 2008 12:00:44 PM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=543G0A648214CF481D90E02427DC650005D0, modifiedBy=Pauline Huijzer, isCompleted=true, modifiedDate=September 23, 2008 12:37:03 PM CEST, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=August 27, 2008 4:20:50 PM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=69CG0A6482142AADA75E25B841F0E0000017, modifiedBy=Pauline Huijzer, isCompleted=true, modifiedDate=October 14, 2008 1:41:18 PM CEST, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=September 29, 2008 3:36:52 PM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=AA8G0A648214A61C9FE9A72CA297C90000BE, modifiedBy=Pauline Huijzer, isCompleted=true, modifiedDate=October 24, 2008 1:14:53 PM CEST, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=October 20, 2008 1:31:46 PM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=C14G0A648214CF481D90E02427DC65000746, modifiedBy=Pauline Huijzer, isCompleted=true, modifiedDate=September 3, 2008 3:16:33 PM CEST, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=September 1, 2008 8:48:44 AM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=ABFG0A6482A6FF86E5C11300DD88470003E0, modifiedBy=Activities Administrator, isCompleted=true, modifiedDate=March 10, 2008 4:11:27 PM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=December 13, 2007 2:45:03 PM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=07AG0A6482A694F8CACC7E280F49EA0001F8, modifiedBy=Activities Administrator, isCompleted=true, modifiedDate=December 17, 2007 10:07:20 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=October 12, 2007 11:00:20 AM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=EC2G0A6482A6145F970ACC379CCF7A0001CD, modifiedBy=Activities Administrator, isCompleted=true, modifiedDate=December 17, 2007 11:15:36 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=November 12, 2007 1:02:25 PM CET}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=5C9G0A6482A694F8CACC7E280F49EA00093F, modifiedBy=Activities Administrator, isCompleted=true, modifiedDate=December 5, 2007 9:19:16 AM CET, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=October 25, 2007 8:43:46 AM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=446G0A6482A62A1E9EFC1AFB961F960004E4, modifiedBy=Pauline Huijzer, isCompleted=true, modifiedDate=August 17, 2007 7:48:29 AM CEST, isTunedOut=true, isTemplate=false, isDeleted=false, createdDate=August 7, 2007 1:50:51 PM CEST}, {createdBy=Pauline Huijzer, name=bladdiebladdieproject, activityId=85FG0A6482A62A1E9EFC1AFB961F960002DD, modifiedBy=Pauline Huijzer, isCompleted=true, modifiedDate=August 7, 2007 9:26:25 AM CEST, isTunedOut=false, isTemplate=false, isDeleted=false, createdDate=August 7, 2007 9:26:25 AM CEST}]

myactivity=ActivityService.fetchActivityById(“C03G0A6482142378A24E533036432B000267″)
// Save the activity where it is about in the var myactivity

From the LC 2.0 info center

AccessControlService.setOwnerAccess( java.util.Vector activities, java.util.Hashtable owner)

from java.util import Vector
// The command to set access of an activity excepts an Vector
newActivities=Vector()
// the var myactivity is an HashMap, so we have to create a
// vector ourselfs
newActivities.add(myactivity)

AccessControlService.setOwnerAccess(newActivities,talitha)
// Make Talitha owner of the activity

AccessControlService.fetchAccess(myactivity)
// Check if all memberships are now ok

Talitha allready had access to this activity but only as a member. Setting
the access to owner will replace her previous access rules, you don’t have
to delete any rights and then apply the new ones.

Previous output of AccessControlService.fetchAccess(myactivity)

SNAP
{memberId=7DBG0A6482142378A24E533036432B000409, displayName=Talitha Hiemstra, loginNames=[talitha hiemstra, talitha.hiemstra@e-office.com], !staticProfile=false, externalId=0DC81DBF-0623-6B29-C125-74E90044E67C, email=Talitha.Hiemstra@e-office.com, memberType=person, role=member}]
!SNAP

Current output of AccessControlService.fetchAccess(myactivity)

SNAP
{memberId=7DBG0A6482142378A24E533036432B000409, displayName=Talitha Hiemstra, loginNames=[talitha hiemstra, talitha.hiemstra@e-office.com], staticProfile=false, externalId=0DC81DBF-0623-6B29-C125-74E90044E67C, email=Talitha.Hiemstra@e-office.com, memberType=person, role=owner}]
!SNAP

SPNEGO Single Sign On

Currently I am digging myself a way into the concept of SPNEGO in
combination with WebSphere servers. With SPNEGO you can create a SSO
config with your clients and WebSphere enabled websites.

The basis is that you have to use an Active Directory server ( W2K or higher ).
In order to make use of the SPNEGO function you have to logon to an AD domain.

When logged in to the AD domain you will receive a kerberos ticket and this is
what is nessecary to make this whole thing rolling.

Besides this requirement you will have to take the following things in consideration.

- AD domain ( W2K or higher )
- WebSphere Application Server 6.1 ( any OS )
- Security enabled for WAS
- A configured User Repository, stand-alone or federared both can be used.
- Type of User Repository can be any of the supported ones by WAS.
( NOTE:
There has to be a link between the login names in the
AD LDAP and the ones in the User Repository used by WAS.

Example: Login attribute in AD is samAccountName, the login attribute
of our WAS Domino User Repo is CN.

samAccountName = MEn
cn = Marco Ensing

Because Domino can use multple CN’s you will have to take care that the
name “MEn” needs to become a CN value in the domino LDAP.
)

For me of course enabling SSO with Lotus Connections is what I’am
looking for but this feature can be used with any Portal or
WebSphere Application server app. running on WAS version 6.1.

Found a two links that were very helpfull for me understanding the
whole concept of SNPEGO in combination with WebSphere.

Step-by-step guide enabling SPNEGO

SPNEGO TAI: Using single sign-on from Windows to WebSphere Application Server

Theory how-it-works

WebSphere with a side of SPNEGO

One handy tool that I found on the web is kerbtray.exe, I was
configuring SPNEGO for a customer running Portal 6.1 in a
Windows 2000 Domain.

When following the documentation mentioned above I
should use the encryption type of DES-MD5 for the keytab file.

Configuring everything to make use of this encryption type I
dug myself in trying serveral variations of the keytab file and
the non-stoppable reboots for the portal server.

But when I ran this tool, kerbtray.exe on one of the client
stations I saw that the encryption type used was RC4-HMAC,
one that only should be used in a Windows 2003 AD domain.

Had now clue why this was happening, but I created a new
keytab file with the encryption type RC4-HMAC thing
that then came above was that everything started working :-) .

( Domain was formed by two Windows 2000 Domain Controlers
and a number of 10 Windows 2003 Domain Controllers.
The forest was Windows 2000 in mixed mode )

Think I have to find a explanation for this behaviour from
the Windows administrators corner.

Windows 2000 Resource Kit Tool: Kerbtray.exe

Mission successful

A while ago I posted my subscription for the LC 2.0 Administering exam.

As can be seen on the screenshot below this mission was completed successful :-) .

About the questions of the exam itself, it was not to hard, there were a lot
of questions about the user registry used by WAS and population of the profiles database.

My thoughts are that if you work daily with Connections you can go through
this exam in a breeze.