Server is ignoring my csapi plugin based on sample code

I'm trying to change the functionality of "authlogin" as used in "Logon" based on the code in the samples.
I'm able to compile the example code csAuthenticationLocal.cpp and run a testcase from the command line.
But when I try to add the .so file to the plugins directory and modify the ics.conf file to use my .so file I'm finding that the server ignores my changes.
Is there any documentations that outlines in a step by step manner how to compile/create the .so and generally implement a change made through the csapi?
Thank you.
Eric

Privet Pavel!
See thread
http://forum.java.sun.com/thread.jsp?forum=60&thread=169227
I think the cure there is the same as for your problem.
So use
   Subject.doAsPrivileged(subject,action,null);instead of
   Subject.doAs(subject,action);see documentation of doAsPrivileged.
Happy coding,
Kullervo

Similar Messages

  • Custom plugin based on user role membership

    Hi all,
    I would like to develope a custom plugin that generates account userid (on process form) with different syntax against role membership.
    With "syntax" I mean name.surname.random_number for employee users and surname.company.random_number for example.
    I'll try to explain the scenario more in details:
    1. I create a user identity through a request
    2. After user identity has created successfully, I assign a role to the user. Since roles are associated with access policies, role assignment triggers provisioning on target system.
    3. The custom plugin that I would like to develope shuold be able to generate proper userid against role membership. For example if I assigned the role "Project Manager" the custom plugin should generate the account userid with name.surname.random_number format; viceversa if I assigned the role "External Reseller" the custom plugin should generate the account userid with surname.company.random_number format.
    Looking for custom plugin based on role membership in forum, I found a couple of threads about this subject:
    - Email notifications after role grant
    - Re: OIM 11g Role Membership Event Handlers.
    I tried to implement what explained in the threads, but I would be sure about what I've done.
    Here what I've done:
    1. created plugin.xml file
    2. created EventHandler.xml metadata file
    3. developed a java calss for testing pourpose
    4. copied the custom plugin class to OIM server for example in $MIDDLEWARE_HOME/OIMPlugins/lib
    NOTE: during this operation I have exactly mantained the same directory structure of custom java package.
    For example custom plugin class is under my.custom.plugin java package and I have copied custom java class under $MIDDLEWARE_HOME/OIMPlugins/lib/my/custom/plugin folder
    5. created a zip file containing custom plugin class (always with its directory structure) and plugin.xml file
    6. copied the zip file to $OIM_HOME/server/plugins
    7. edited ant.properties file (under $OIM_HOME/server/plugin_utility) setting wls.home and oim.home variables
    8. built the wlfullclient.jar (only the first time)
    9. registered the custom plugin
    10. created the custom plugin dataset file
    11. imported it in OIM database using "weblogicImportMetadata" utility
    12. purged cache using "PurgeCache" utility
    NOTE: all the steps above was executed using the system user running OIM process
    test java class
    package com.zeropiu.sky.custom.eventhandlers;
    import java.io.Serializable;
    import java.util.HashMap;
    import com.thortech.util.logging.Logger;
    import oracle.iam.platform.kernel.spi.ConditionalEventHandler;
    import oracle.iam.platform.kernel.spi.PostProcessHandler;
    import oracle.iam.platform.kernel.vo.AbstractGenericOrchestration;
    import oracle.iam.platform.kernel.vo.BulkEventResult;
    import oracle.iam.platform.kernel.vo.BulkOrchestration;
    import oracle.iam.platform.kernel.vo.EventResult;
    import oracle.iam.platform.kernel.vo.Orchestration;
    import oracle.iam.platform.context.ContextManager;
    import java.util.Set;
    public class TestUserAnonimi implements PostProcessHandler, ConditionalEventHandler {
         private static final Logger logger = Logger.getLogger("com.zeropiu.sky.custom.eventhandlers");
    private static final String className = "TestUserAnonimi";
         @Override
         public void initialize(HashMap<String, String> arg0) {
              // TODO Auto-generated method stub
              String methodName = "initialize";
              System.out.println("###### " + className + " - " + methodName);
         @Override
         public boolean isApplicable(AbstractGenericOrchestration abstractGenericOrchestration) {
              // TODO Auto-generated method stub
              String methodName = "isApplicable";
    System.out.println("###### " + className + " - " + methodName + " - STARTED");
    System.out.println("###### " + className + " - " + methodName + " - ContextManager.getContextType(): " + ContextManager.getContextType());
    System.out.println("###### " + className + " - " + methodName + " - ContextManager.getContextSubType(): " + ContextManager.getContextSubType());
    System.out.println("###### " + className + " - " + methodName + " - abstractGenericOrchestration.getOperation(): " + abstractGenericOrchestration.getOperation());
    System.out.println("###### " + className + " - " + methodName + " - Printing ContextManager parameters");
    HashMap allContextManagerPairs = ContextManager.getAllValuesFromCurrentContext();
    Set<String> allContextManagerParams = allContextManagerPairs.keySet();
    String[] parameters = allContextManagerParams.toArray(new String[allContextManagerParams.size()]);
    for (int i = 0; i < parameters.length; i++) {
              System.out.println("###### " + className + " - " + methodName + " - Context parameter " + i + ": " + parameters[i] + " - Object type is: " + Utils.getObjectType(ContextManager.getValue(parameters)));
    System.out.println("###### " + className + " - " + methodName + " - ENDED");
    return true;
         @Override
         public boolean cancel(long arg0, long arg1,     AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
              String methodName = "cancel";
              System.out.println("###### " + className + " - " + methodName);
              return false;
         @Override
         public void compensate(long arg0, long arg1, AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
              String methodName = "compensate";
              System.out.println("###### " + className + " - " + methodName);
         @Override
         public EventResult execute(long arg0, long arg1, Orchestration orchestration) {
              // TODO Auto-generated method stub
              String methodName = "Eventresult execute";
              System.out.println("###### " + className + " - " + methodName);
              return null;
         @Override
         public BulkEventResult execute(long arg0, long arg1, BulkOrchestration arg2) {
              // TODO Auto-generated method stub
              String methodName = "BulkEventResult execute";
              System.out.println("###### " + className + " - " + methodName);
              return null;
    plugin.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="com.zeropiu.sky.custom.eventhandlers.TestUserAnonimi" version="1.0" name="TestUserAnonimi">
    </plugin>
    </plugins>
    </oimplugins>
    EventHandler.xml metadata file
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <action-handler class="com.zeropiu.sky.custom.eventhandlers.TestUserAnonimi" entity-type="RoleUser" operation="CREATE" name="TestUserAnonimi" stage="preprocess" order="1007" sync="FALSE" />
    </eventhandlers>When I assign a role to a user through OIM web interface, I can see in OIM log file all System.out.println contained in initialize(), isApplicable() and BulkEventResult execute() methods. Is it correct? Can I implement my custom plugin logic now, or my starting point is wrong?
    ###### TestUserAnonimi - initialize
    ###### TestUserAnonimi - isApplicable - STARTED
    ###### TestUserAnonimi - isApplicable - ContextManager.getContextType(): ADMIN
    ###### TestUserAnonimi - isApplicable - ContextManager.getContextSubType():
    ###### TestUserAnonimi - isApplicable - abstractGenericOrchestration.getOperation(): CREATE
    ###### TestUserAnonimi - isApplicable - Printing ContextManager parameters
    ###### TestUserAnonimi - isApplicable - Context parameter 0: origuser - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 1: oimuser - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 2: RESOLVED_LOCALE - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 3: counter - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 4: TIME_ZONE - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - Context parameter 5: ipaddress - Object type is: java.lang.String
    ###### TestUserAnonimi - isApplicable - ENDED
    ##### TestUserAnonimi - BulkEventResult execute
    Thanks,
    Daniele
    Edited by: 886636 on Jan 24, 2012 2:53 AM
    Edited by: 886636 on Jan 24, 2012 2:53 AM

    Probably I don't explain myself clearly....sorry for that!
    Anyway you are right, the role of the user can change after the user is initially provisioned.
    I'll try to summarize to be sure to have understood your answer and to explain my scenario more in details:
    1. After user identity creation, I'll assign the role "Project Manager". Before role assignment the user has not any role. So using a pre-populate adapter I can retrieve the assigned role and compose the right userid.
    2. After step 1, I need to assign another role to the user, the new role should be "External Reseller" for example. In this case the user has a role already. What I would is: basing on the role that I'm assigning (External Reseller), the pre-populate should compose the right userid. Obviously this second userid will be different from the first one and this means a new account will be created for the user. At the moment I don't care to deprovisioning the first userid.
    Is it possible with pre-populate adapter?
    Sorry again for my not very clear explanations.
    Daniele
    Edited by: 886636 on Jan 24, 2012 4:10 AM

  • Does the web server of weblogic support any plugins

    Does the web server of weblogic support any plugins similar to the ISAPI plugins for IIS or apache plugins?

    i can't seem to get it to work either AND I can't seem to find an answer here or any search that I do.  It seems that you can only view your calendar and not delegate calendars via the web view

  • Hi, I am a beginner. Can anyone tell me how to detemine the servant area size of a message based controlle

    r. I am trying to use viOut16 to the data low register with 0xCEFF, 'Read Servant Area'command. I am waiting on the read ready/write ready bits of the response register but the write ready bit is never 1! The device I am writing to is an E8491B. Thank you.code section (variables left out!, no error handling incl.):
    #define MSG_DESCR "VXI0::0::INSTR"
    #define RESPONSE 0x0a
    #define DATA_LOW 0x0e
    #define READREADY 0x0400
    #define WRITEREADY 0x0200
    #define TIMEOUT 300
    int main( void )
    status = viOpenDefaultRM(&defaultRM);
    if(status < VI_SUCCESS)
    printf("viOpenDefaultRM error : 0x%04x\n", status);
    return -1;
    status = viOpen(defaultRM, MSG
    _DESCR, VI_NULL, VI_NULL, &instr);
    if(status < VI_SUCCESS)
    printf("viOpen error : 0x%04x\n", status);
    return -1;
    status = viSetAttribute(instr, VI_ATTR_TMO_VALUE, 1000);
    viIn16(instr, VI_A16_SPACE, RESPONSE, ®);
    while((reg != WRITEREADY) && (timeoutCnt < TIMEOUT))
    viIn16(instr, VI_A16_SPACE, RESPONSE, ®);
    reg = (WRITEREADY & reg);
    timeoutCnt++;
    if(timeoutCnt >= TIMEOUT)
    status = viClose(instr);
    status = viClose(defaultRM);
    return 0;
    printf("'Read Servant Area' command\n");
    viOut16(instr, VI_A16_SPACE, DATA_LOW, 0xceff);
    viIn16(instr, VI_A16_SPACE, RESPONSE, ®);
    timeoutCnt = 0;
    while((reg != READREADY) && (timeoutCnt < TIMEOUT))
    viIn16(instr, VI_A16_SPACE, RESPONSE, ®);
    reg = (READREADY & reg);
    timeoutCnt++;
    if(timeoutCnt >= TIMEOUT)
    status = viClose(instr);
    status = viClose(defaultRM);
    return 0;
    viIn16(instr, VI_A16_SPACE, DATA_LOW, ®);
    printf("'Read Servant Area' command contents : 0x%04x\n", reg);
    return 0;

    r. I am trying to use viOut16 to the data low register with 0xCEFF, 'Read Servant Area'command. I am waiting on the read ready/write ready bits of the response register but the write ready bit is never 1! The device I am writing to is an E8491B. Thank you.Here are a couple of ideas that we can try.
    1.Try some sample code of simpler ways of communicating with the board. There are some good example that you can search for on the NI webpage. Here are some links for examples in LabVIEW and C for performing message based reads and writes using viIn and viOut. It's not exactly the same, but it is very very similar.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/A69FB1619075695886256BDD0068C1CE?opendocument
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CBAC4111EE034080020E74861&p_node=DZ52409&p_source=External
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DE3556A4E034080020E74861&p_node=DZ52409&p_source=external
    2. Another option is to use NI-Spy to troubleshoo
    t your VXI module. See the following link for more info. http://www.ni.com/support/vxi/spy/spy.htm
    3. I think the best place to find support on this module would be with Agilent, the manufacturer of this board.
    Hope this helps!!

  • Need to download the data from BSEG based on company code and fiscal year

    Hi All,
              Please suggest me the solution to download the data from BSEG based on company code and fiscal year. As data in BSEG for the fiscal year2009  is 27 lakhs (= 2.7 million) for the specified company code.
    <removed>
    Thanks & Regards,
    Koti
    Edited by: Thomas Zloch on Mar 26, 2010 4:28 PM - please use English metrics only!

    May I ask what you mean by solution?  You can download from SE11, but where are you going to store 2.7 million rows and what tool are you going to use to store it?
    You probably need a (small) program that extracts what you want, then opens a dataset in an appropiate server-system folder, and transfers the data rows to the dataset as fixed-length or tab-delimited file.  It's been done many times, so suggest that you search.

  • Automatic assignment of Partner Function (Dealer) based on Postal Code?

    Hi Experts,
    We are realizing a project in the Bathroom-Product Industry. Responsible for the service to the end-clients are authorized dealer. When creating a service ticket the responsible dealer has to be assigned automatically to the ticket on the basis of the postal code where the IBase (the product) is installed.
    The process is:
    1. The client is calling the Interaction Centre and first the IC Agent has to identify the account and the Installed Base (The     installed base contains the postal code where the product of the client is installed) of this account.
    2. An Interaction Record is created to record this inbound call.
    3. Afterwards a Service Ticket is created as a follow-up Document of the Interaction Record. In the moment of the creation of the Service Ticket the correct dealer has to be assigned automatically to the Service Ticket (as a Partner Function not as a Service Organization) on the basis of the postal code of the installed base.
    I have the following question! Which are the steps to assign automatically a Business Partner Function to a Service Ticket? We also need to create a Z-Table with the postal codes for which every dealer is responsible.
    Example:
    Dealer 1 is responsible for the postal codes: 08040 - 08045 and 08056 - 08059. If a client is calling and his product (Installed Base) is installed in Postal Code 08042 or 08054 the dealer 1 has to be assigned to the service ticket.
    I hope I could make myself clear ;-)? Anybody can give me a hint how to do that? What are the basic steps?

    Slightly similiar, originally being an R/3 customer before implementing CRM our dealer equated to sales office.
    In the CRM Org model (PPOMA_CRM) in the attributes of the sales office we entered the Regions & Postal codes for that dealer (pain in the arse to do) and in CRM the sales office in the org creates a BP.
    We used a org rule for the IR record based on country, region, postal code to determine the appropriate sales org, DC, div, and sales office based onthe zip code.  We created a custom partner function to represent the partner number of the  BP from the org model.  Then we configured a custom relationship "ZORG" "Is partner of sales office" and went into the BP master and assigned the actual dealer number as a partner to BP from the org model that = sales office.  From that we configured a custom access sequence to pull the actual dealer number from the org model office relationships.
    We looked at territory management, but our dealer is an "org BP" and territory management appeared to want to drive to a person BP number.

  • OB52 based on Company Code

    Dear All,
           As we are having several company codes and want users only to be able to open and close periods from transaction code OB52 belonging to their posting period with respect to company codes how can I restrict and allow them open & close periods based on company code repectively. Is there any process this be done.
    I tried with the notes I got from one sap-img link. But it did not work & there something is missing. Kindly if anyone have done this before send be step by step process. Awaiting for you reply...
    regards,
    Raj B...

    How about trying it this way?
    1. Remove access to OB52
    2. Create a maintenance view similar to V_T001B specific for each company.
    3. Create a TCODE for each of these views.
    4. Use this TCODE for authorization assignment.
    This should be simple but your number of views would be increasing with respect to the number of companies.
    ~Eswar

  • Gl a/c short and long text based on company code

    Hello Friends,
    In table skat the gl account description is given based on chart of accounts but what if i want the description based on company code.
    I want the table where i can get the gl account description based on company code??
    Pls suggest.
    Regards,
    Sunny

    Hi,
    you can look at the database view for requirement
    GL_ACCT_CC_TEXT
    regards\
    Mahesh

  • Table for finding rate based on part code and material

    Hi Experts
         I am an ABAP consultant with ltd knowledge on SD . Please tell me in which table  I can find the rate based on party code and material .

    Hi
    The standard table is A305. But usually these tables can be customized based on the requirement. So if you are aware about the Condition type for which this Price/Rate is maintained you can find the same in VK13.
    In transaction code VK13, maintain the condition type and click on "Condition information" icon. Now dont maintain any input date. Just click on Execute icon or F8. System will give the list of all the tables and data maintained based on the combination.
    Select the required table.In SE11, maintain this table with prefix as A. You can get all the required information.
    Regards
    Vamsi

  • Can I get multiple sums in a single column based on a "code" I place.

    After importing a file of check/debit card activity from my bank, can I 'code' the line items based on tax categories ie Utilities, Medical expenses, Auto expenses, etc. and then get sums for each based on that code I placed in a single column? That would mean multiple sums in a single column based on the code used for each tax related expense. For instance, I would put UT in the column for utilities expenses and MED in the same column if it were a medical expense. I would then want the sum for all items in that column for each item code. Is this possible or do I need to use a different approach to get this information.

    My guess is that the SUMIF function may be your friend.
    It's well described in the *iWork Formulas and Functions User Guid*e which every user may download from the Help menu.
    Yvan KOENIG (VALLAURIS, France) samedi 2 janvier 2010 21:56:39

  • SKF transactional values based on company code

    Can anybody let me know the logic how we can seggregate transactional value passed to statistical key figure based on company code or is there anytable where we can direclty find SKF transactions involved based on company code ?
    Need to upload SKF transactional figures from one SAP system to another.Hence require process for extraction and uploading of the same

    Hi Amogh
    Hope you are looking for actual SKF quantities posted. kindly check s_alr_87013611 CC report, I think on the lower part this comes. This time I am not in front of system so you please check.
    Regards
    Rajneesh

  • Decimal places adjustment based on company code or currency

    Hi experts,
        my requirement is i have to adjust the decimal places in amount fields of internal table based on company code or currency given by user.
    suppose for example in my internal tables having 5 amount fields like 1.50 1.234 1.45 1.34, 1.67  for  company code is in01
    the same values for VN01 should be like this
    150 1234 145 134  167  ....
    can any body plz tell me any functional module is there to covert or abapcode?
    Thanks in advance,
    veena.

    That code is a bad idea.  Why would you hard-code that type of action for currency/amount handling?
    @poster: If the output is based on the local currency defined for the specified company code or one specified by the user, then use it.  SAP handles amount output automatically with a currency specification because the currency definition identifies where/how the decimal is output. 
    Just use WRITE as Florian indicated but  use the CURRENCY extension instead of DECIMALS.  You can do this dynamically based on the company code easily...
    A simple 3 line program shows you how this works:
    PARAMETERS: p_wrbtr type wrbtr.
    write:/ p_wrbtr CURRENCY 'USD'.
    write:/ p_wrbtr CURRENCY 'JPY'.
    Edited by: Brad Bohn on May 12, 2011 1:07 PM

  • Restriction of Tcode SQ01 based on Company code

    We are running one customized query using Tcode SQ01.  We need to restrict Tcode SQ01 in company code level.  We have checked about authorization object in st01. But there is no check of authorization object. Can anybody help to restrict SQ01 based on company code level?
    Regards
    Auroshikha

    Hi Auroshikha,
    Itu2019s very easy to maintain authorization in your Infoset Query report. I got and implemented similar requirement i.e. restriction /authorization as per company code.
    You need to use authority check for authorization object  P_ORGIN in your infoset.
    Please follow the bellow steps:
    -->Go to SQ02, Enter your Infoset name and click on Change button.
    -->Click on 'Code' (Shift+F8) icon dispalyed on application toolbar, you will be moved to Code Section of Infoset that lists different events.
    -->Choose Record Processing event from code section.
    -->Write the following code in 'Record processing' event of your Infoset.
    AUTHORITY-CHECK OBJECT 'P_ORGIN'
    *ID 'INFTY' FIELD '*'
    *ID 'SUBTY' FIELD '*'
    ID 'AUTHC' FIELD 'R' "read
    ID 'PERSA' FIELD P0001-WERKS
    *ID 'PERSG' FIELD DUMMY
    *ID 'PERSK' FIELD DUMMY
    *ID 'VDSK1' FIELD DUMMY.
    CHECK Sy-SUBRC EQ 0.
    Note: PERSA field used in this Authorization object plays an importan role , if you are in different module other that HR , then pass here table_name-companycode_field
    -->Genetare Infoset
    -->Go to SQ01 (in a new session) , Click on exeute or 'Test button' to check authorization is working for report
    Let me know if you need any more details.
    Thank you.
    Regards,
    Dinesh Tiwari

  • Any option to restrict SE16 record level access based on company code?

    Hi All,
    I have a requirement to restrict record level access in SE16 based on company code.
    Our SAP system has two company codes. The requirement is that users of one company code should not be able to see records of other company code in SE16.
    Is it possible through some exits/badis/other methods?
    Thanks in advance.
    Regards,
    Arun Mohan

    You could write a small front end that accepts the company code, applies custom authorization code for each value and retains or removes, then calls the transaction and enters the selections the user requested and that your authorization check resulting in "passing"....  Of course, you'd have to block those users from "pure" SE16...   I once worked in situation similar, users in one country couldn't see USA data, etc. I think someone wrote an entire new program, called by ZSE16, for that.

  • Sample code to connect LDAP server using jndi

    Hi,
    can any one help me with sample code to connect LDAP server using jndi,
    like i want to make use of Ldap server for serching Active directoty.
    Thanks in advance,
    Regards
    Muthu

    You can set ldap_auth=none for anonymous user.
    User/password is mandatory otherwise. Please refer to http://docs.oracle.com/cd/E21764_01/integrate.1111/e12644/appendix_ldap_driver.htm#CHDHCABH
    Thansk,

Maybe you are looking for

  • How to Delete the dimension from the cube ?

    Hi , how to Delete the dimension from the cube ? i have added the new dimension by assiging one characteristic to that dimension . now i  want to delete it , but system saying that   Dimension ZXXX  contains InfoObjects; deletion not possible . how t

  • Charge iPod with the USB cable

    When I connect my iPod to a computer whithout iTunes installed, I get a new drive in windows. But on my iPod I get symbol in the display that says that I should not remove the cable before I disconnect the iPod in windows. In this case the iPod charg

  • How do I know if my G4 is Airport or Airport Extreme-ready?

    Hi all, I have a few G4 (Grey and White). I don't remember their code names. I am trying to figure out if they accept Airport Extreme cards so I can network them. I don't see any info in the "System Profiler" (since there is no card installed). Can y

  • Why do I have to pay for a app on my iPhone when I have it already on my Ipad

    Why do I have to pay for a app on my iPhone when I have it already on my Ipad

  • Programs quiting unexpectedly

    Hi guys, I've been experiencing program shutdowns unexpectedly after the update. For one, I'm not sure if the update was the culprit or things just happened. Before the update my MBP can be left on (no reboot) for 7 days without any of such incidents