IRM / web services / check user rights to the document by login

Hellow,
How to check if user can read sealed document?
Sealing Server can be used to get Classification (Peeking http://download.oracle.com/docs/cd/E21764_01/user.1111/e12326/isvsealedcontent001.htm#DAFHIHIH)
"The classification is used by the Oracle IRM Desktop to determine whether the *authenticated user* can access the sealed content".
How can I do the same if i know the login user name?

Thanks!
My example
// get document context id
var sealedDoc = File.ReadAllBytes(_SealedFileName);
string contextId;
using (var srv = new SealingServicesClient())
srv.ClientCredentials.UserName.UserName = _ContextAdminName;
srv.ClientCredentials.UserName.Password = _ContextAdminPass;
var data = srv.Peek(sealedDoc);
contextId = data.classification.id;
// get user rights
string userName = "BillGates";
AccountRef account = new AccountRef();
account.uuid = string.Format("urn:user:{0}", userName);
DocumentRight[] rights;
using (var srv = new DocumentRightOperationsClient())
srv.ClientCredentials.UserName.UserName = _ContextAdminName;
srv.ClientCredentials.UserName.Password = _ContextAdminPass;
rights = srv.ListRightsByAccount(account);
// check if user can read
bool canRead;
var right = rights.FirstOrDefault(rr => rr.context.uuid == contextId);
if (right == null)
return;
canRead = (right.role.features.FirstOrDefault(ff => ff.id == "oracle.irm.generic.Open") != null);

Similar Messages

  • Web service check error

    Hi,
    Is this a bug?
    A web service (C#) runs well, but the System Health Monitor is showing error 500 for it. It looks like a strange space appears in the link on position 27, when the monitor is checking the web service. Any clue?
    error example:
    Portlet request failed, the remote server returned HTTP error '500'. Portlet ID=557, User ID=1, URL='http://xxxxxx.xxxxxxxxxx.edu/xxxxxxxxxxxxx/portlet/xxxy zxxxxxFirstForm.aspx'
    (the space appears between y xnd x in several cases-I've checked the webservice and no space is there. I've rewrite the webservice link, without success)

    Have you tried the try catch block ?
    See the error codes it responds with.
    Then look through the properties of the Exception
    try
        doInit();
    } catch(err)
        var vDebug = "";
        for (var prop in err)
           vDebug += "property: "+ prop+ " value: ["+ err[prop]+ "]\n";
        vDebug += "toString(): " + " value: [" + err.toString() + "]";
        status.rawValue = vDebug;
    function doInit()
        doWebServiceCallThatFails();
    Have fun with these articles
    http://blogs.adobe.com/formfeed/2009/06/collected_form_development_and.html
    http://blogs.adobe.com/formfeed/2009/03/handling_javascript_exceptions.html

  • IRM Web Services Adding a New Role to a Context

    We are in the process of using the IRM web services to create a system that will automatically create users/contexts and seal documents over the web.
    So far I can successfully create users and groups and assign permissions properly as well as create context.
    I am having trouble adding roles to the context.
    The error I'm getting is "The attribute 'Features' is mandatory".
    The problem is that there is no function to add features to the ContextRole object.
    How do I set up the features so that I can save then new ContextRole?
    Tom

    Hi Tom
    Response from engineering on your latest questions:
    Depending on which web service code generator is used, collection typed properties may or may not be provided with set operation. If the code generator does provide a set method for collections, then you can just specify the set of features you require as so:
    // Java
    Collection<Feature> features = new ArrayList<Feature>();
    features.add(feature);
    ContextRole role = new ContextRole();
    role.setFeatures(features);
    However if the set method is NOT provided, then you need to manipulate the collection directly, by using the get method and then using the standard collection methods to alter the contents.
    // Java
    ContextRole role = new ContextRole();
    role.getFeatures().add(feature);
    These two examples are functionally the same, they both create a context role object with one feature.
    Kind regards
    Andrew

  • Accessing IRM Web Services with Coldfsuion

    We are looking to use the IRM web services with Coldfusion. Coldfusion abstracts Web Services calls through Java calls to the point of just setting up structures and calling the functions.
    My question is about the process for building the correct parameters for the IRM services. I have the JDeveloper examples working but I can't make enough sense of what is goin on through all the calls to build the proper information.
    What I don't understand yet are things like where do I get the server key and at what point do I authenticate? Do I need to do separate calls for these things.
    I've captured a soap transaction for the update user example in JDeveloper and see there is a serverKey but no other authentication. Is this all I need?
    The web services documentation mentions authentication needs to be basic authentication. Other than that there is not more info. Is there any other source of info?

    Hi
    Sorry, things are a bit confused when it comes to Web Services (WS) documentation. At the moment (in 10g), it's mixed up with the older stuff in the Component API Help file. Also, apart from a few snippets and the JDeveloper examples, there is no WS sample code. We hope to address this in 11g.
    The web services required HTTP basic authentication details to be set before the call is invoked. This will be the username and password of the sealing user, so that user will need to be configured to use Standard Auth, rather than NT Auth. How to set this depends on the web service stack used on the client, but with JAX-RPC there are APIs that allow the user name and password to be specified. e.g.
    +// User name for authentication purposes+
    contextServices._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,args[1]);
    +// Password for authentication purposes+
    contextServices._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,args[2]);
    This snippet is in the Help file under the header "Authentication", or directly via:
    mk:@MSITStore:C:\Program%20Files\SealedMedia\Enterprise%20APIs%20SDK\Components%20SDK\Docs\smcomponents.chm::/ws_documentation_authentication.htm
    As for the Server Key, each IRM Server has a unique UUID value. The easiest way to get this is to call the following web service method on the “ServerServices” web service port.
    LicenseServer_ref reference = serverServices.getLicenseServerReference();
    System.out.println(reference.getServerKey());
    One you’ve obtained this it will never change (for the server you are using) and can be cached or stored for all future web service calls.
    I think you need to have the auth properties set, and the Server Key handy, for most WS methods to work, but I don't think it matters in which order you get them.
    Hope this helps,
    David

  • Web Service Tester works perfectly but the Web service is not.

    I have a web service developed in EDQ that works as expected when I check using Web Service tester.
    However when the upstream server sends the request to this web service, the response it gets is not as expected. "
    This difference is only for a particular rule.(if Street Address Line 1 is 'Holiday', then the Customer Status should become 'C')
    All the other rules are working s expected.
    What can this difference be due to?
    Thanks and Regards.
    Ravi

    The only logical explanation is that the client sending the request is sending different data. Perhaps it may be something subtle such as trailing whitespace (with the process you have constructed not coping with this)?
    Mike

  • How configure a primavera web service to return data from the second database?

    Hi everyone,
    We have P6 with first WS deployed on a single server weblogic domain. The first WS return data from the first database instance.
    Then deployed advanced second WS on a separate weblogic domain server with a different port. Configured second WS with <WS2_INSTALL_HOME>/bin/dbconfig.sh, creating a new branch of a configuration that specifies a different second instance of the database. However, this configuration is ignored and second web services return data from the first database.
    We have one domain, which including next servers:
    Name / Host / Port / Deployments
    P6 / localhost / 0001 / P6(v8.3), p6ws1(v8.3)
    p6ws2 / localhost / 0002 / p6ws2(v8.3)
    Now we have two different file BREBootstrap.xml.
    P6 BREBootstrap.xml:
    <Database>
    <URL>jdbc:oracle:thin:@db1:1521:db1</URL>
    <UserName>pubuser</UserName>
    <Password>anycriptopass1</Password>
    <Driver>oracle.jdbc.OracleDriver</Driver>
    <PublicGroupId>1</PublicGroupId>
    </Database>
    <CfgVersion>8.330</CfgVersion>
    <Configurations>
    <BRE name="P6 Config_DB1" instances="1" logDir="anydir/P6EPPM/p6/PrimaveraLogs"/>
    </Configurations>
    p6ws2 BREBootstrap.xml:
    <Database>
    <URL>jdbc:oracle:thin:@db2:1521:db2</URL>
    <UserName>pubuser</UserName>
    <Password>anycriptopass2</Password>
    <Driver>oracle.jdbc.OracleDriver</Driver>
    <PublicGroupId>1</PublicGroupId>
    </Database>
    <CfgVersion>8.330</CfgVersion>
    <Configurations>
    <BRE name="P6 Config_DB2" instances="1" logDir="anydir/P6EPPM/ws2/PrimaveraLogs"/>
    </Configurations>
    ‘P6 Config_DB1’ and ‘P6 Config_DB2’ including Database property for 1 and 2 database respectively.
    How to configure a second web service to return data from the second database?
    Thanks in advance!
    Regards,
    Dmitry

    OK, so I got this to work this morning with Username Token Profile (with little help from Oracle Support).
    I followed your steps 1-4 but in step 2 I didn't add the -Ddatabase.instance=2 because I want to check to see if my code could swap between different instances.
    It appears for Username Token Profile to use Database Instance, you need to set it in the soap header.
    So my soap request looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <s:Header>
            <DatabaseInstanceId xmlns="http://xmlns.oracle.com/Primavera/P6/WS/Authentication/V1">2</DatabaseInstanceId>
            <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                <u:Timestamp xmlns:u='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' u:Id='uuid-327b6ed1-b26d-4a61-81d5-e326174c1961-3'>
                    <u:Created>2014-10-23T04:28:01.152Z</u:Created>
                    <u:Expires>2014-10-23T04:29:01.152Z</u:Expires>
                </u:Timestamp>
                <o:UsernameToken u:Id='uuid-327b6ed1-b26d-4a61-81d5-e326174c1961-3' xmlns:u='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
                    <o:Username>admin</o:Username>
                    <o:Password Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'>password</o:Password>
                    <o:Nonce EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'>vJBQhCc28bAeszej7gOaiC2tVCQ=</o:Nonce>
                    <u:Created>2014-10-23T04:28:01.152Z</u:Created>
                </o:UsernameToken>
            </o:Security>
        </s:Header>
        <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <ReadProjects xmlns="http://xmlns.oracle.com/Primavera/P6/WS/Project/V2">
                <Field>ObjectId</Field>
                <Field>Id</Field>
                <Field>Name</Field>
                <Field>Status</Field>
                <Field>StartDate</Field>
                <Field>FinishDate</Field>
                <Field>DataDate</Field>
                <Filter>Id = 'EC00515'</Filter>
            </ReadProjects>
        </s:Body>
    </s:Envelope>
    This request pulled the project from the second instance.
    V/r,
    Gene

  • IOException from EP web service checker

    Hi  ,
    I have created a web service from a portal service and deployed to my portal, when I try to access via EP web services checker by url:
    http://server:50100/irj/servlet/prt/soap/com.sap.portal.prt.soap.TestService
    I got the java.io.IOException:http://server:50100/irj/servlet/prt/soap/com.sap.portal.prt.soap.TestService
    in the panel "WSDL Descriptor".
    Does any body have a idea how to fix this issue?
    Thanks,
    narendra

    hi
    Thanx for ur reply.
    i checked but it is not useful for my problem.
    I got a Exception in EP Web Services Checker like this:
    java.io.IOException:Server returned HTTP response code:503 for url:http://server:50100/irj/servlet/prt/soap/com.sap.portal.prt.soap.TestWebService

  • Check User Can Access the site collection Are Not?

    Hi All 
    I have some requirement to check user can access site are not through powershell?
    Recently we done migration from 2010 to 2013 SP after that i got some problem some users can not access site  but this user have permission in sp 2010 site .
    Regarding this i need to check specific user can loing or Access  the site collection are not. using powershell
    Some one said impersonate user we can check user can open the web are not but i don't know this impersonate.
    Please help me guys.... 

    Hi,
    You can check the permission for specific user with powershell. Here is the link. Hope this will help.

  • DRM-61026: Unable to create user session for the following reason: Login failed. Invalid user name or password.

    All Im very new to Oracle DRM and Im trying to get the app setup on Windows server running SQL Server 2008.  When I try to login to the Web Client I keep getting this error.
    DRM-61026: Unable to create user session for the following reason: Login failed. Invalid user name or password.
    Can you please help

    This might be due to The 'Oracle Instance' path may not have been set to a path relative to the 'CSS Bridge Host' (i.e. the Foundation Services machine) on the Configuration > Host Machines > CSS > General tab of the DRM Configuration Utility.
    if this is the case then
    1. Open the DRM Configuration Console.
    2. Go to the Configuration > Host Machines > CSS > General tab of the DRM Configuration Utility.
    3. Ensure that the path in 'Oracle Instance' has been set relative to the 'CSS Bridge Host' (i.e. the Foundation Services machine defined in 'CSS Bridge Host').
    4. If corrections are made to 'Oracle Instance' then restart the DRM services to pick up the change.
    Thanks,
    ~KKT~

  • Restrict user to print the document

    Dear Friends,
    I have uploaded and linked a scanned document to SAP FI Document by transaction code OAWD  by SAP Archive Link.
    Say 1700000145,
    Co.Co. BP01
    Fis Yr. 2011.
    Object BKPF
    User is able to see the linked document in FB03 from Services for Object>Attachment List.
    I want to restrict the user from printing the document.
    I checked with Authorization Object "S_WFAR_KPR" & "S_WFAR_OBJ". But this did not help.
    Can you please guide me how to handle this scenario.
    With Warm Regards
    Mangesh Pande

    Hi Mangesh,
    Have you seen in roles , object for activities like create,change,display. Kindly check if you have a option for print in activity. from there you can restrict. But if don't find such a option then you can't control printing otherwise you have to restrict the user for displaying also.
    Hope this will help.
    Regards,
    Ravindra

  • How to rename content type on web site level and underneath all the document libraries using powershell?

    Hello
    I wantto rename content type on web site level and underneath all the document libraries using powershell, please let me know how can do this?
    I saw this url
    http://suryapulipati.blogspot.in/2011/08/rename-content-type-name-in-list-using.html, but I want to change everything from Web Site, subsite and underneath document libraries. Because if you try to change on any on document library, it will be applicable
    for that document library, if you change on web level then underneath document libraries content type names not updated automatically.
    Please advise
    Avi

    Not sure with powershell.
    I could help you out with Server Side or Web Services though.
    Brandon James SharePoint Developer/Administrator

  • How to show asterisk * effect once the user starts editing the document??

    I wrote a java text editor. I creat a new internal frame and allows to open a document.
    How to have an effect (an asterisk * follows the filename in title bar) once
    the user starts editing the document? And once I save that file, that asterisk * will
    disappear. It seems to me we need to add a listener, but not sure how to change
    the title bar of internal frame??

    just use DocumentListener like
    myTextArea.getDocument().addDocumentListener(new DocumentListenet(){
    public void changedUpdate(DocumentEvent e){
    frame.setTitle( frame.getTitle() + "*" );
    implements two other methods too

  • How to config the user cannot post the document which he parked .

    Hello , SAP gurus .
    Did SAP contain this configuration and would you please show me some details .
    We need that the user who parked the document will now have the authorization to post it.
    Thanks

    Hi,
    I am using transaction FV50,
    In this transaction SAVE button and SAVE AS COMPLETE both parks the document and will be posted by clicking on POST,
    but I need to just save the document when I click SAVE button, and when I click on SAVE AS COMLPETE then only it should be ready for posting while posting will be done using FBV0.
    Please let me know the best way to acheive this.
    Thanks,
    Rtech.

  • PL/SQL web service--all users share the same database session

    Hi, Is anyone else running into this? If I set a package variable in a pl/sql package through the web service from one client and then connect with another client, I can see the value of the package variable set by the first client. So it appears that instead of being 'stateless', as the documentation claims, that all users are actually connecting to the very same session--and sharing the same memory and variable values.
    When I test my application by myself, I don't run into any problems. But the application I'm working on allows over 1000 students to select dorm rooms concurrently. The timing for that large a group is fine enough that I do have more than one person executing the same section of code simultaneously. This is a serious problem! I'm going to try using pragma serially reuseable on my packages to see if that will take care of it.
    Has anyone else run into this problem? What do you do about it? Is this an issue with the web service? Or the application server?

    Hello!
    I have a question. You seem to be getting somewhere. In the reference (in your post) there is no mention of web.xml Is it a generated file or a file created by you? I am getting IOException error when generating EAR file. What could be wrong? Please help
    TAI
    habeeb

  • Help: consuming an external web service with user name token

    Hello Together!
    I need to consume an external web service secured with WS-UserNameToken. The way, how did I do it:
    1. I generated a web service consumer (proxy) in SE80 from the wsdl file
    2. I created logical port for the consumer in SOAMANAGER
    3. I created security profile in WSSPROFILE with telpmate SET_USERNAME and assigned it to consumer operation in LPCONFIG  (I use LPCONFIG, because I didn't find any way to do it in SOAMANAGER)
    3. I called the web service and got the error back:  session token is missing or invalid or has inspired
    My questions are:
    1. is this possible to consume an external webservice in SAP, which is secured with WS-Usernametoken?
    2. do I need therefore any settings in java stack? do I need java stack in general?
    3. Is this any way to configure the consumer without writing programs, which set header parameter manually?
    4. if the answer on the third question is no, do you have any examples, how to implement session management in report? (I mean sending session id and checking the validaty of id)
    I appriciate any help of you!
    best regards Anna

    Hi,
    it should be possible to use WS-UserNameToken for consuming web service. It should be available on AS BAP 7.0 and higher. This profile should be under category Document authentication. You can try to dump a message send from SAP to see what is going out of SAP. This should be supported in ABAP so you don't need a Java stack. What exactly do you want to configure? Do you want to just set user name and password for that service which will be used for any calls of that proxy?
    Cheers

Maybe you are looking for

  • MS Flight Simulator 2004 on a Satellite A100-451 & external monitor

    Hello, I have a A100-451 running Vista plus an external 19" 1280*1024 monitor. I have loaded FS 2004 OK. Has anyone here any experience of using FS on a laptop with an external monitor ?, and what is the best way of setting up the 2 screens ? Thanks

  • Create spool in a program and read spool in same program

    hi all, i have a requirement like i have to create a spool in a program and should read that spool and send a email in same program. i m done with creating spool and sending email but the problem is when i execute a program the spool is created only

  • Help packaging a PDF with links

    Hey everyone, I'm sorry if this has been asked and answered already but I couldn't find it using the search. I have a PDF file that I have embedded a bunch of links to other local files in. Both the PDF and the files that are linked to are in one com

  • Add a new tab in IW31/IW32

    Hi, I have a requirement where in I need to add a new tab in IW331, IW32. Also, how do I add fields on to that tab? I know there is one enhancement IWO10018, but I have never worked on enhancement before. So can someone please tell me how to use this

  • Cannot Business Component for Jdev9040

    I cannot fined Cannot Business Component for Jdev9040 as it was present in jdev9010.? When i install bibeans9032 into the jdevhome (jdev9040) it gives message that jdevloper903 or higher should be installed... Although i have instaled jdev9040??? Is