This discussion is archived
3 Replies Latest reply: Nov 9, 2012 1:48 AM by jiri.machotka RSS

RIDC api wit security group consideration

879617 Newbie
Currently Being Moderated
Hi,

I am using RIDC api to fetch folders and documents from the UCM.

I have defined security groups on the folders. I created roles and assigned read and write access to the security group created above.

And I added these roles to the user .

Now I am using the following RIDC code to initialize.
myIdcClient =
myIdcClientManager.createClient("idc://<hostname>:4444");
userContext = new IdcContext(user);

But the api is fetching only the public folders .
I am not sure how to specify to fetch the documents based on the user roles which we have assigned a security group.
  • 1. Re: RIDC api wit security group consideration
    jiri.machotka Guru
    Currently Being Moderated
    I see two potential flaws:

    - either your user from
     userContext = new IdcContext(user); 
    does not authenticate the correct user (there can be a typo, etc.), or
    - you don't use the userContext properly (e.g.
    idcClient.sendRequest(userContext, searchResultBinder);
    )

    It is difficult to guess from provided lines only.
  • 2. Re: RIDC api wit security group consideration
    879617 Newbie
    Currently Being Moderated
    Hi,

    Thanks for the pointers , but they are being used properly.

    I can give more background on the issue.

    I am trying to bring in a list of folders defined in UCM to webcenter Portal

    I have defined a user - user1 in webcenter and I am using the logged in user name to pass it to RIDC to authenticate.

    Then I defined the same user - user1 in the UCM console as global user and added role - folder_access_role , I have a set of folders in UCM on which I have defined Security Group as "SecureGroup1" . I have then assigned the "read , write" permissions on the "securityGroup1"

    Following the is code to fetch the list of folders.

    DataBinder dataBinder = myIdcClient.createBinder();

    dataBinder.putLocal("IdcService", "COLLECTION_GET_COLLECTIONS");
    dataBinder.putLocal("hasCollectionID", "1");
    Long folderID = getFolderIDFromPath(path, user);
    String collectionId = Long.toString(folderID);
    dataBinder.putLocal("dCollectionID", collectionId);
    ServiceResponse response =
    myIdcClient.sendRequest(userContext, dataBinder);
    DataBinder serverBinder = response.getResponseAsBinder();
    Collection<String> names = serverBinder.getResultSetNames();
    Iterator namesIter = names.iterator();

    DataResultSet resultSet = serverBinder.getResultSet("COLLECTIONS");


    List rows = resultSet.getRows();

    Iterator rowIter = rows.iterator();
    List<ContentFolder> folderContents = new ArrayList<ContentFolder>();
    ContentFolder folderInfo = null;
    while(rowIter.hasNext()){
    DataObject dobj = (DataObject)rowIter.next();
    folderInfo = new ContentFolder();
    folderInfo.setName(dobj.get("dDocTitle"));
    folderInfo.setPath(path +"/"+folderInfo.getName());
    System.out.println("doc id:"+dobj.get("dID"));
    folderContents.add(folderInfo);
    }

    Thanks in advance
  • 3. Re: RIDC api wit security group consideration
    jiri.machotka Guru
    Currently Being Moderated
    Then I defined the same user - user1 in the UCM console as global user and added role
    This looks like a problem. Just try to log in with this user to WebCenter Content web gui and you will see what happens.

    Or, follow http://docs.oracle.com/cd/E23943_01/doc.1111/e10792/c05_security.htm#BGBEFEBB

    As of 11g Release 1 (11.1.1), user logins must be edited using the Oracle WebLogic Server Administration Console. Although user logins can be managed in the Content Server system for special purposes, they are not valid for authentication to the Content Server system until they have been created with the Oracle WebLogic Server Administration Console. For information and instructions on editing and managing user logins, see Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points