Extract principal on server side from outToken/KRB_AP_REQ

Hey,
I have a Kerberos SSO application with JAAS/JGSSAPI according to the tutorial which can be found here: http://java.sun.com/j2se/1.4.2/docs/guide/security/jgss/single-signon.html
Mutual authentication with initSecContext() and acceptSecContext() works fine. Now, on the server side, I would like to extract the principal from the outToken. In Kerberos terms this means the KRB_AP_REQ message which is generated by initSecContext() and send to the server.
Is there any possibility to get the principal's name from this byte array?

Don't you have to use GSSUtil.createSubject on the server side to obtain a Subject, from which the principal name of the client can be obtained?
Alec

Similar Messages

  • How to use Ajax Web method in v4.master page to pass value to server side from JavaScript?

    Hi,
    I am customizing my v4.master page. Just adding jquery "Multiselect" dropdown .
    I want to pass selected value to code behind to perform some database activities.
    Here no code behind for me. Just i have added "Server side script" as a code behind.
    How to pass the value?
    Anyone give me the idea on it.
    Thanks & Regards
    Poomani Sankaran

    try using asp.net variables as per below links:
    http://sharepoint.stackexchange.com/questions/88777/how-to-use-a-variable-in-the-masterpage
    http://sharepoint.stackexchange.com/questions/80074/how-can-i-use-the-current-language-as-a-variable-in-my-masterpage
    https://msdn.microsoft.com/en-us/library/ms476046%28v=office.12%29.aspx
    http://www.dotnetfunda.com/articles/show/1507/how-to-access-master-page-variableproperty-from-the-content-page
    Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointing

  • How to make html file on server side from the data entered in text area

    Hi!
    I want to know how to make .html file on server side. Like if i enter the data in text area ( or like we normaly see when we write mail that editor) and we can use html tages in it and when user submit form all the data in that field will be saved on server side as an html formate. Is it possible to do so??? or any ruff idea how to design it???

    Erm ...
    Whats the problem with that?!
    Ok, here the code ...
    String myparameter = request.getParameter("paramname");
    String htmltemplate = "<html>\n"
                         +"<head><title>demo</title></head>\n";
                         +"<body>@parametertag@</body>\n";
                         +"<html>";
    String htmlpage = htmltemplate.replaceAll("@parametertag@",myparameter);
    File yourHTMLfile = new File("wheredoyouwannagotoday.html");
    FileOutputStream fos = new FileOutputStream(yourHTMLfile);
    fos.write(htmlpage.getBytes());
    fos.close();You're done.
    Happy Coding! :-) &copy;

  • Adobe Reader XI (11.0.08) doesn't create thumbnail (bitmap) using Microsoft Interface IExtractImage -- Extract on Windows Server 2008 R2, when exe to generate thumbnail is launched from Windows service.

    Adobe Reader XI (11.0.08) doesn't create thumbnail (bitmap) using Microsoft Interface IExtractImage --> Extract on Windows Server 2008 R2, when exe to generate thumbnail is launched from Windows service.
    But if exe is launched as standalone, then interface IExtractImage --> Extract, gives Bitmap to generate thumbnail of PDF document.
    Above problem occurs only for PDF documents, if we tried same with other software like CAD -CATIA it works without any problem.
    Is there any security concerns form PDF side, which doesn't allow to generate Bitmaps, if exe to generate it is launched form Windows service.

    It might be deliberate, Acrobat and Reader software is not intended to run in a service environment.

  • How can i load file into database from client-side to server-side

    i want to upload file from client-side to server-side, i use the following code to load blob into database.
    if the file is in the server-side, it can work, but if it in the client-side, it said that the system cannot find the file. i think it only will search the file is in the server-side or not, it will not search the client-side.
    how can i solve it without upload the file to the server first, then load it into database??
    try
    ResultSet rset = null;
    PreparedStatement pstmt =
    conn.prepareStatement ("insert into docs values (? , EMPTY_BLOB())");
    pstmt.setInt (1, docId);
    pstmt.execute ();
    // Open the destination blob:
    pstmt.setInt (1, docId);
    rset = pstmt.executeQuery (
    "SELECT content FROM docs WHERE id = ? FOR UPDATE");
    BLOB dest_lob = null;
    if (rset.next()) {
    dest_lob = ((OracleResultSet)rset).getBLOB (1);
    // Declare a file handler for the input file
    File binaryFile = new File (fileName);
    FileInputStream istream = new FileInputStream (binaryFile);
    // Create an OutputStram object to write the BLOB as a stream
    OutputStream ostream = dest_lob.getBinaryOutputStream();
    // Create a tempory buffer
    byte[] buffer = new byte[1024];
    int length = 0;
    // Use the read() method to read the file to the byte
    // array buffer, then use the write() method to write it to
    // the BLOB.
    while ((length = istream.read(buffer)) != -1)
    ostream.write(buffer, 0, length);
    pstmt.close();
    // Close all streams and file handles:
    istream.close();
    ostream.flush();
    ostream.close();
    //dest_lob.close();
    // Commit the transaction:
    conn.commit();
    conn.close();
    } catch (SQLException e) {

    Hi,
    Without some more details of the configuration, its difficult to know
    what's happening here. For example, what do you mean by client side
    and server side, and where are you running the upload Java application?
    If you always run the application on the database server system, but can't
    open the file on a different machine, then it sounds like a file protection
    problem that isn't really connected with the database at all. That is to
    say, if the new FileInputStream (binaryFile) statement fails, then its not
    really a database problem, but a file protection issue. On the other hand,
    I can't explain what's happening if you run the program on the same machine
    as the document file (client machine), but you can't write the data to the
    server, assuming the JDBC connection string is set correctly to connect to
    the appropriate database server.
    If you can provide some more information, we'll try to help.
    Simon
    null

  • Scheduling web intelligence reports from SAP EP Portal : Server Side Trust

    Hello,
    We have set-up SSO between SAP EP 701, SAP BI 701 and Business Object XI 3.1  to allow users to access reports without having to sign-on again as explained here :
    /people/ingo.hilgefort/blog/2008/09/19/businessobjects-and-sap--configure-sap-authentication
    But, we have recently been contacted by some users because when scheduling Webi Report from a link within the portal they have the following errors :
    u201CA database error occured. The database error text is: Unable to connect to SAP BW server System received an expired SSO ticket. (WIS 10901) u201D
    The user told us that he doesn't encounter the error when :
    Login in directly to the BO Infoview (without SSO from the SAP Enterprise Portal.)
    The first Webi scheduling is succesful from the portal (I suppose because the portal token is still valid)
    I understand that we also have to configure the Server Side Trust between BO Enterprise server and the SAP BI7 backend as explained here , but I do not really understand its purpose
    https://websmp106.sap-ag.de/~sapidb/011000358700001646962008E/XI3-1_BIP_SAP_INSTALL_EN.pdf
    I've found a similar discussions here ;
    Issue with SAP Single Sign-On and Scheduling Reports
    I still have some questions :
    If we configure the Server Side Trust between BO Enterprise server and the SAP BI7 backend .
    The Portal Logon ticket will remain an issue at some point of time , does it mean tha the WeBi report job sheduling should not be perfromed from the SAP EP Portal ?
    We haven't configured the Server Side Trust , yet the users told us that they are able to schedule webi report directly from the BO Infoview ? How is it posible ?
    Thank you in advance for your help.
    Regards.

    Thank you Mr Hilgefort for your detailled explanations.
    I now have to provide some explanations to my managers, and to be honest , there are still some points that
    are unclear to me, and it would be extremely helpful if could confirm (or not) the follwoing points.
    When scheduing Webi report from the sap portal, we're getting SSO errors.
    SAP provide the follwoing note explaining how to extend the validity of the J2EE token (Portal token), but this is not a long term solution, at certain point of time the ticket will expire. Webi shceduling should not be perfromed from the Portal.
    Sap note 1352127 - Scheduled Webi report fails with: A database error occurred. The database error text is: Unable to connect to SAP BW server System received an expired SSO ticket
    Webi Scheduling should be performed from BO Infoview. SNC should be configured between BO server and SAP BI7.0 backend.
    We should Configure Server SNC as explained in the BusinessObjects XI Integration for SAP Solutions Installation and Administration Guide at Chapter "Configuring SAP for server-side trust". (1341043)
    The SAP Portal is not involved here and is not an option even with the configuration of SNC/Server side trust.
    thank you for your patience.
    Best Regards.

  • How to get path of image from server side in form of URL

    Hello,
    I want to access images stored on server side local folder. How do I create a URL for that. Images in the folder changes dynamically, so I should be able to display the new modified images. Please help me.
    Thanks in advance

    Are you asking from client side to access server (local folder) images...
    if yes
    where the security goes....
    please be in detail...

  • RUN SERVER SIDE OS COMMAND OR ANY EXECUTABLE FILE FROM CLIENT

    Would you provide a complete example regarding execution Server side OS command or program from ORACLE SQL CLIENT OR FORM. This client may be a remote client.

    instead of just copying jvm.dll, I would recommend installing Java through the installer as there are most likely other files that jvm.dll is dependent on, etc.
    It's been a while since I have worked with HAL integrations (Vignette), but I believe you will need HFM client installed on the end user machine.
    If you have a lot of machines, this could be a bit annoying. Because of that when we used HAL, we made a custom web front-end that ran on a server with the HAL programs. It was more work to build the web U/I; however, from a management perspective, it was a lot easier to control/maintain.
    $.02

  • Create image from byte[]array on server side

    Hello everyone..
    I'm developing an application which will take snapshots from a mobile device, and send it to my pc via bluetooth. I have my own midlet which uses the phone camera to take the snapshot, i want to transfer that snapshot to my pc.
    The snapshot is taken is stored in an array byte.
    The image can be created on the phone itself with no problem using : image.createImage(byte[])
    my problem is that when i send the array byte via bluetooth, and receive it on the server, i cannot create the image using the :image.createImage() code
    The connection is good since i have tested by writing the content of the array in a text file.
    Piece of midlet code:
                try{
                     stream = (StreamConnection)Connector.open(url);
                     OutputStream ggt = stream.openOutputStream();
                     ggt.write(str);
                     ggt.close();
                }catch(Exception e){
                     err1  = e.getMessage();
                }where str is my array byte containing the snapshot
    And on my server side:
    Thread th = new Thread(){
                   public void run(){
                        try{
                             while(true){
                                  byte[] b = new byte[in.read()];
                                  int x=0;
                                  System.out.println("reading");
                                  r = in.read(b,0,b.length);
                                  if (r!=0){
                                       System.out.println(r);     
                                       img = Image.createImage(b, 0, r);
                                                            //other codes
                                       i get this error message:
    Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: javax.microedition.lcdui.ImmutableImage.decodeImage([BII)V
         at javax.microedition.lcdui.ImmutableImage.decodeImage(Native Method)
         at javax.microedition.lcdui.ImmutableImage.<init>(Image.java:906)
         at javax.microedition.lcdui.Image.createImage(Image.java:367)
         at picserv2$1.run(picserv2.java:70)
    Please anyone can help me here? is this the way to create the image on the server side? thx a lot

    here is exactly how i did it :
    while(true){
                                  byte[] b = new byte[in.read()];
                                  System.out.println("reading");
                                  r = in.read(b, 0, b.length);
                                  if (r!=0){
                                       Toolkit toolkit = Toolkit.getDefaultToolkit();
                                       Image img = toolkit.createImage(b, 0, b.length);
                                       JLabel label = new JLabel(new ImageIcon(img) );
                                       BufferedImage bImage = new BufferedImage(img.getWidth(label),img.getHeight(label),BufferedImage.TYPE_INT_RGB);
                                       bImage.createGraphics().drawImage(img, 0,0,null);
                                       File xd = new File("D:/file.jpg");
                                       ImageIO.write(bImage, "jpg", xd);
                                       System.out.println("image sent");
                             }Edited by: jin_a on Mar 22, 2008 9:58 AM

  • Server-side includes from a table

    The instructions are very basic and do not include instructions on how to use server-side includes from a table.
    I can find nothing on Google or at Adobe on this subject, not even on the old InterAKT site.
    Has anyone got a demo, tutorial etc. or just some advice please.
    I have created a table in the database, embedded the script in the page but what now?
    I find the server-side includes from a list easy to use but it has limitations that I hope server-side includes from a table will overcome.

    I found the answer, all on my own. Go to http://www.interaktonline.com/Documentation/MXKollection/108000_sever_side_includes.htm
    Its a video demo and all is revealed.

  • How to trigger navigation to a portal iView from server side event handler

    Hi,
    I am modifying the workset map application. I have created custom URL links under each iView which should navigate to different iViews depending on some business logic. So I had to provide a custom event handler for these iVIew links and the path to the next iview is dynamically created by the code in the event handler. Once the new PCD path is generated, the event handler should trigger a navigation to that PCD object. Which APIs can I use to trigger this navigation from the server side event handler? I have done this before in webdynpro where we used WDPortalNavigation (.absoluteNavigation or .relativeNavigation). Is there something similar that i can use in this case (i.e. when developing a simple Portal Application from an AbstractPortalComponent)?

    Hi,
    On my understanding of your requirement.
    the best solution what i think is use Object Based Navigation(OBN).
    Is much suitable to your requirement.
    Moreover you can use
    1.Relative navigation
    2.Absolute navigation.
    In the same way how you used in web dynpro.
    Same thing can be done in abstract portal component also.
    Try using that.
    Thanks & Regards,
    Lokesh
    Edited by: lokesh kamana on Aug 11, 2008 7:23 AM

  • How to get the client identity from the certificate at server side

    hi, this is ravi kiran,
    I am working on a project which requires, receiving a signed file from the client side and verify whether the file is signed by a valid certificate that is there in the servers keystore.
    How can i get the client certificate at server side and check with the certificates already present in the servers keystore.
    i have no idea how to do this
    can any one help me
    thanx in advance

    Hi Ravi, did you get any answer to your question ?
    I'm also after a similar problem, please share your solution, if you have any.

  • How to use mathscript node in server side with the parameter from the client side

    I tried to develop a server/client system with some algorithms written in matlab. So I included a mathscript node on the server side. The client will send the parameter to the server. According to these parameters, the sever will call the matlab functions to do some computings and then send the results back to the client. The server has to wait for all parameters received before the computings. How do I know this since I only connect the parameter variables to the inputs of mathscript node on the server. The sever cannot know whethere these parameters are the new ones or old ones since the client may send parameters multiple times?

    It seems to me you have two perfectly good options to start with. You could send all possible parameters in a single packet from the client to the server. This could be in the form of a cluster or an array of values. If by server/client you mean you are sending data over the network, then you could flatten this data to string before sending and unflatten it on the other side. Since all parameters come in one packet, you know all the data is valid every time you send data.
    The other option is to send the parameters individually, but include some extra information such as a timestamp or iteration count. The server keeps reading and storing parameter values until a packet arrives with the next timestamp. Alternatively, you could include some information such as an end-of-parameter-list boolean that is sent with every parameter. It would be false until the last parameter packet.
    Give it a thought. There are lots of solutions.
    Jarrod S.
    National Instruments

  • Calling PL/SQL from Server Side Rule

    Hi there,
    I'm wanting to call a PL/SQL procedure from a server side rule created within collaboration suite using the oesrl command line utility. I have seen examples of the XML rule which should do this together with the appropriate PL/SQL
    &lt;account qualifiedName="UM_SYSTEM" ownerType="system"&gt;
    &lt;rulelist event="relay"&gt;
    &lt;rule description="Retention Rule" active="yes"&gt;
    &lt;condition negation="no" junction="and"&gt;
    &lt;condition&gt;
    &lt;attribute tag="rfc822to"/&gt;
    &lt;operator caseSensitive="no" op="contains"/&gt;
    &lt;operand&gt;instigate.com&lt;/operand&gt;
    &lt;/condition&gt;
    &lt;/condition&gt;
    &lt;action&gt;
    &lt;command tag="call"/&gt;
    &lt;parameter&gt;RulesPackage.archive_message&lt;/parameter&gt;
    &lt;parameter&gt;test1&lt;/parameter&gt;
    &lt;parameter&gt;Archive&lt;/parameter&gt;
    &lt;/action&gt;
    &lt;/rule&gt;
    &lt;/rulelist&gt;
    &lt;/account&gt;
    The above should call the Procedure RulesPackage.archive_message when an email to anyone at instigate.com arrives in OCS. I have written and tested an appropriate package. However, I have been unable to get the rule to execute and call my PL/SQL when I send an email to trigger it.
    I have written rules which do not invoke external packages without any trouble.
    I believe the problem is that I need to register the PL/SQL package with the rules engine somehow, before the rule can find it, but I am uncertain how to do this, or even if that is indeed what I need to do.
    Any help would be most appreciated as the documentation doesn't go into too much detail.
    I am using OCS R2.
    Regards
    Oliver

    Could you please check the structure of the procedure "RulesPackage.archive_message" ? It may fail due to procedure structure.
    The structure should be similar to the below example
    PROCEDURE archive_message
    (p_event IN NUMBER,
    p_sessionid IN NUMBER,
    p_msgobj IN es_mail.mail_message_obj,
    p_param1 IN VARCHAR2,
    p_param2 IN VARCHAR2,
    p_status OUT NUMBER) AS
    BEGIN
    /* Code for Archving */
    END;
    Relevant URL:
    http://download-west.oracle.com/docs/cd/B25553_01/mail.1012/b25459/ad_email_custact.htm#sthref677 (Please check Step 2 of "A Custom Action Written in Java")

  • How to send Subtopic Message From Server-Side to Client ?

    I’m new at flex and i have a new question about Flex
    Message Service.
    How to send messages from Server-Side Java Code with
    Subtopic?
    For example.
    I customed a Flex Message Adapter in Tomcat Server , with
    this Adapter , i can send message to Client with following code .
    ---------------------Send message to Client------------
    MessageBroker msgBroker =
    MessageBroker.getMessageBroker(null);
    String clientID = UUIDUtils.createUUID(false);
    AsyncMessage msg = new AsyncMessage();
    msg.setDestination("CustomMsgServiceDes");
    msg.setClientId(clientID);
    msg.setMessageId(UUIDUtils.createUUID(false));
    msg.setTimestamp(System.currentTimeMillis());
    msg.setBody(clientID + "this is my message from server! \n");
    msgBroker.routeMessageToService(msg, null);
    ---------------------Send message to Client------------
    But i want send a message that have Subtopic to the Client ,
    How to do ?
    Thank you for reply.

    There's a white paper that talks about this subject -
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=8f1eb6ea

Maybe you are looking for

  • Automatic goods movement at the time of confirmation in IW42

    Hey gurus, In a maintenance order i ve reserved some materials to be issued from the stores. Now i am not issuing the reserved materials from the stores and going to iw42 for confirming the operations of the order. If i select the item overview of th

  • Multiple characters in one slot of an ArrayList?

    I am writing a method that extracts words from a string and returns an ArrayList with the given extracted words. I am not allowed to use the method split. I have managed to get the characters of the input string into an array list, but I can't seem t

  • Macpro with a Samsung Syncmaster 930B... Any Problems?

    Greets, I want to buy a macpro. I will be using it with a samsung syncmaster 930b. Anyone running the macpro with a samsung lcd? any problems? Any input or information is appreciated. Ibook G4   Mac OS X (10.4.8)  

  • 30 minutes to set artwork?

    Ok this is bugging me REALLY bad now. Whenever I want to add any artwork or change the info of a file in iTunes, be it music, movie or TV Show etc. It takes absolutely ages to do so. For instance I have added 3 new TV episodes to my library. Adding t

  • Sqlplus script output

    I understand I can re-direct the query result to an output file using the SPOOL command in sqlplus. However, is there any way in sqlplus such that I can manipulate the data return from the query before spooling to the output file? Thanks in advance f