Symantec IGA

 View Only
Expand all | Collapse all

Ldap Connector issue calling method with parameters from operation bindings

  • 1.  Ldap Connector issue calling method with parameters from operation bindings

    Posted Jan 15, 2019 05:14 AM

    I'm using an LDAP connector defined on the Connector Xpress.
    I'm trying to call an external method by using operation bindings.
    That's my easy java class with an empty constructor ActiveDirectoryExecutor and a simple method adModifyAssocs with an ObjectInfo object as input:

     

    package com.ingdirect.iam.ActiveDirectoryConnector;
    import com.ca.jcs.ObjectInfo;
    public class ActiveDirectoryExecutor {
        public ActiveDirectoryExecutor(){
        };
        public void adModifyAssocs(ObjectInfo objInfo) {
            String adCorporateKey = objInfo.getName();
            System.out.println("[ActiveDirectoryExecutor] [adModify] In adModify method. User: " + adCorporateKey);
        }
    }

     

    I have generated the jar with my java classes and loaded it on the connector server in the \Connector Server\lib\ext folder.
    In the same folder I've loaded the jcs.jar which contains the class com.ca.jcs.ObjectInfo.

     

    In the connector created by using the Connector Xpress I have defined a script for my operation binding in which I import the package and I defined the insteadOfModifyAssocs function that have to be executed.

     

    importPackage(com.ingdirect.iam.ActiveDirectoryConnector)
    function insteadOfModifyAssocs(objInfo, modItems, context) {
        debug("log","[log] [LDAP] [---------INSTEAD_OF_MODIFY_ASSOCIATIONS---------]");
        debug("log","[log] [LDAP] [modifyAssocs] [objInfo] " + objInfo);
        debug("log","[log] [LDAP] [modifyAssocs] [objInfo] [getName] " + objInfo.getName());
        var adExecutor = new ActiveDirectoryExecutor();
        adExecutor.adModifyAssocs(objInfo);
    }

     


    When I performed a test from the Provisioning Server I received the following error in which is specified that the method com.ingdirect.iam.ActiveDirectoryConnector.ActiveDirectoryExecutor.adModifyAssocs(com.ca.jcs.ObjectInfo) has been not found

     

    :ETA_E_0083<MAC>, Account for Global User 'username' on DYN Endpoint 'endpointname' update failed: Connector Server Modify failed: code 80 (OTHER-LdapConfigurationException): failed to modify entry: eTDYNAccountName=accountname,eTDYNContainerName=Test Accounts,eTDYNContainerName=Accounts,eTDYNDirectoryName=endpointname,eTNamespaceName=LDAPTEST,dc=domainname,dc=etasa: JCS@servername: failed executing script for OpBinding: connector-speak objectClass=organization|organizationalUnit|groupOfNames|groupOfUniqueNames|group|user, operation=MODIFY_ASSOCS, timing=OP [scriptFunction: parentScriptName=GlobalScript, function=insteadOfModifyAssocs]: com.ca.jcs.processor.script.ScriptPool: failed invoking function 'insteadOfModifyAssocs': Can't find method com.ingdirect.iam.ActiveDirectoryConnector.ActiveDirectoryExecutor.adModifyAssocs(com.ca.jcs.ObjectInfo). (line 144 in eTOpBindings value [line 144 into script which starts at line 1]) (ldaps://servername.domain:20411)

     

    After that I tried another test with a little change in my java code: I modified the input for the method, I replaced the ObjectInfo with a String object and it works fine, after that the java method has been executed without problems. I tried again with an AssocModificationItem as input and it didn't work. My conclusion is that the problem is related to the input, with an ObjectInfo or AssocModificationItem object it doesn't work.

     

    CA Support suggests to use the community regarding AssocModificationItem input:

     

    Implementing doModifyAssocs(ObjectInfo objInfo, AssocModificationItem[ ] items, Object context) throws NamingException This method is passed a list of modification items, including additions, deletions and replacements. This method is responsible for calling getModificationOp() on each modification item and then handing off the work to addAttrAssocs() or removeAttrAssocs() as appropriate. Use this method if your modification items are not independent of each other (for example, if ordering is significant).

     

    Could you help me to find a solution for that?

     

    Kind Regards



  • 2.  Re: Ldap Connector issue calling method with parameters from operation bindings
    Best Answer

    Broadcom Employee
    Posted Jan 15, 2019 11:18 AM

    Hello.  I found case 01263538.  It seems to be a problem either with the implementation of the API, Java doc, or your custom code.  Can you create a simple script that can be applied to your case on support.ca.com?  I will reach out to the Engineer assigned as well for case 01263538.  Thank you.



  • 3.  Re: Ldap Connector issue calling method with parameters from operation bindings

    Posted Jan 16, 2019 05:02 AM

    Thank you very much. Sample uploaded to case.