Using wwctx_api.get_user in dbms_rls policy

We have not been able to succesfully use a call to wwctx_api.get_user in the function we use as a policy for row level security. The package compiles fine. The policy adds fine. When we try to select from the table where the policy is on from portal (LOV, REPORT, DYNAMIC PAGE) we get Ora-28112.
Help?

The error code maps to the following message:
ORA-28112 failed to execute policy function
Cause: The policy function has one or more error during execution.
Action: Check the trace file and correct the errors.
Could you try returning a static value from the security policy and do your select and see if that works.

Similar Messages

  • Help: Portal calendar error when using wwctx_api.get_user

    Hi,
    I am trying to create a calendar based on some table data and results should be specific to portal user logged in. So I have created following query but it does not filter the data based on the user logged in. I have checked and there are no issues on data side.
    select
    a.EVENT_START_DT the_date,
    a.EVENT_NAME the_name,
    ( ) the_name_link,
    null the_date_link,
    null the_target,
    null the_intermedia
    from TBL_EVENTS a
    where a.Event_Status = 0
    and a.event_personal = 1
    and a.event_recorded_by = (select entryid FROM ods.CT_UID where upper(ATTRVALUE) = upper(wwctx_api.get_user))
    order by a.event_id desc
    Failing above I also tried other way using bind variable and then passing the page paramater (selecting system variables USER_NAME) to the bind variable
    Select a.EVENT_START_DT the_date,
    a.EVENT_NAME the_name,
    ( ) the_name_link,
    null the_date_link,
    null the_target,
    null the_intermedia
    from TBL_EVENTS a
    where a.Event_Status = 0
    and a.event_personal = 1
    and a.event_recorded_by = (select entryid FROM ods.CT_UID where upper(ATTRVALUE) = upper(:username))
    order by a.event_id desc
    However it still dont work.
    Can anyone please give me any suggestion or way to resolve this.
    Any help much appriciated.
    Thanks
    Ganesh

    Hi,
    I am storing OID user id but I am comparing as follows
    select
    a.EVENT_START_DT the_date,
    a.EVENT_NAME the_name,
    ('' ) the_name_link,
    null the_date_link,
    null the_target,
    null the_intermedia
    from TBL_EVENTS a
    where a.Event_Status = 0
    and a.event_personal = 1
    and a.event_recorded_by = (select entryid FROM ods.CT_UID where upper(ATTRVALUE) = upper(portal.wwctx_api.get_user)
    order by a.event_id desc
    but this comes with following error
    Unable to describe SQL statement. Please correct it (WWV-13010)
    Took exception (WWV-13005)
    ORA-01001: invalid cursor (WWV-11230)
    ORA-00921: unexpected end of SQL command (WWV-11230)
    Failed to parse as CCMPORTAL - select a.EVENT_START_DT the_date, a.EVENT_NAME the_name, ('http://portal.ccm.ac.uk/portal/page/portal/TMC/STAFFPORTAL/COLLEGE_SERVICES/COLLEGE_CALENDAR/Event%20Manager/Tab_Update?meventid=##A.EVENT_NAME##' ) the_name_link, null the_date_link, null the_target, null the_intermedia from TBL_EVENTS a where a.Event_Status = 0 and a.event_personal = 1 and a.event_recorded_by = (select entryid FROM ods.CT_UID where upper(ATTRVALUE) = upper(portal.wwctx_api.get_user) order by a.event_id desc
    I then tried creating bind variable as follows
    select
    a.EVENT_START_DT the_date,
    a.EVENT_NAME the_name,
    ('' ) the_name_link,
    null the_date_link,
    null the_target,
    null the_intermedia
    from TBL_EVENTS a
    where a.Event_Status = 0
    and a.event_personal = 1
    and a.event_recorded_by = (select entryid FROM ods.CT_UID where upper(ATTRVALUE) = upper(:musername)
    order by a.event_id desc
    and then passing system variable USER_NAME to musername in page parameter settings to the portlet.
    Please advise help
    Thanks
    Ganesh

  • Lack of performance using portal30.wwctx_api.get_user to limitrecords in portlets

    Hi,
    I have a portal page using 5 reports as portlets each of them use
    "where personid = portal30.wwctx_api.get_user"
    to limit the amout of data retrieve for each user.
    I have 250 users registred in login server whose can use this page.
    The 5 portlets fall in timeout every time, except if I replace "portal30.wwctx_api.get_user" by a constant,
    which is not very useful but works.
    Any idea to avoid usage of this API.
    Thanks in advance
    Didier Dubois
    mail : [email protected]
    mobile : +33 (0)6 74 68 54 78

    Hi,
    Instead of using the api in the query, use a bind variable and then customize the report to pick up the value from the api. Here is an example
    1) Create a sql report
    select * from usertab
    where user_id = :userid
    2) Publish this report on a page
    3) Now edit the page and go to the edit defaults of the report.
    4) You will have a textbox against userid. Here you enter #<portalschema>.wwctx_api.get_user
    Please replace the portalschema with the name of your portal schema.
    Thanks,
    Sharmila

  • How do you use PORTAL .WWCTX_API.GET_USER

    Hi. I'm a newbie at Portal and Oracle and am having a problem extracting the userID for the logged user. I have
    a form that needs to be populated with the login ID for that session. What exactly do I need so that the field will
    auto-populate with the user's ID. Do I enter the api in the "Default Value" box of the form for that field? What do I need
    to select from the "Default Value Type" dropdown?
    Also, because I'm populating the form with data from the database (it's an update record form), I'd like to "blank" the
    comment field rather than populate it with the info from the DB record. Is that possible?
    Finally, is there any recommendations on manuals or other books to purchase that would answer these types of
    questions. I feel that this is a pretty basic task and should be in a manual somewhere.
    Thanks,
    Ron

    Hi,
    In the default value column specify <portalschema>.wwctx_api.get_user. In the default return type make it "function returns varchar".
    This should help.
    Thanks,
    Sharmila

  • WWCTX_API.GET_USER

    I created a custom folder and typed following sql in that:
    SELECT WWCTX_API.GET_USER from dual
    there was no problem in creating this folder.
    When i create a worksheet in plus and while running a query, its giving following errors
    ORA-14551: cannot perform a DML operation inside a query.
    ORA-06512: at "PORTAL.WWCTX_SSO",line 2954
    ORA-06512: at "PORTAL.WWCTX_SSO",line 3483
    ORA-06512: at "PORTAL.WWCTX_SSO",line 1735
    ORA-06512: at "PORTAL.WWCTX_SSO",line 2954
    ORA-06510: at PL/SQL: unhandeled user-defined exception
    ORA-06512: at
    Actually one of my query is based on SSO user id.
    When i use this "SELECT WWCTX_API.GET_USER from dual;" on SQL prompt. Its doesn't give any error.
    I need to use this WWCTX_API.GET_USER in my query. Any idea why its giving error in discoverer plus?
    Thanks

    Questions similar to yours have been answered earlier in the forum in these threads:
    http://forums.oracle.com/forums/message.jsp?id=456180
    http://forums.oracle.com/forums/message.jsp?id=628583
    You can search the forums by entering your search criteria in the text field in the upper right corner of the OTN Discussion Forum Page.

  • HELP!!! wwctx_api.get_user

    I created a PL/SQL Server Page just to show the login information from a login portlet.
    The code follows:
    <%@ page language="PL/SQL" %>
    <%@ plsql procedure="logininfo" %>
    <HTML>
    <HEAD><TITLE>This is a PSP Page!</TITLE></HEAD>
    <BODY>
    <%
    declare
    myname varchar2(50) := portal30.wwctx_api.get_user;
    begin
    htp.print(myname);
    end;
    %>
    </BODY>
    </HTML>
    My Login portlet on success "P_request_url" calls for the above procedure.
    My problem was no matter what user I logged on with, it always dispays "PUBLIC" as the login user. What I need is to get oracle portal user who is curently using the session. WHY? Please Help!
    Thanks!

    there is a diffence between portal.wwctx_api.get_user and portal_sso.wwctx_api.get_user. Check and make sure you are using the api from the right context. You're probably getting the sso user and not the portal user.

  • PORTAL.WWCTX_API.get_user  how can i get the group?

    I'm using Oracle AP 10g
    I know the PORTAL.WWCTX_API.get_user will give you the user id , but anyone knows which one do i need to use to come out with the group name .
    P.S : the group name contains a list of certain employees
    also where can i get a list of all the API's that i can use
    Thank you
    Nedal Seyam

    Nedal Seyam wrote:
    I'm using Oracle AP 10g
    I know the PORTAL.WWCTX_API.get_user will give you the user id , but anyone knows which one do i need to use to come out with the group name .
    P.S : the group name contains a list of certain employees
    also where can i get a list of all the API's that i can useI dont know what is Oracle AP 10g.
    However, you are probably looking for the default group name for a given user. Please see wwsec_api.get_defaultgroup.
    look into wwsec_api.get_list_members for a list of members in a group.
    The links to APIs that Opportalist presented should lead you to the descriptions of both functions.
    hope that helps!
    AMN

  • PORTAL.WWCTX_API.get_user

    I'm using Oracle AP 10g
    I know the PORTAL.WWCTX_API.get_user will give you the user id , but anyone knows which one do i need to use to come out with the group name .
    P.S : the group name contains a list of certain employees
    also where can i get a list of all the API's that i can use
    Thank you
    Nedal Seyam
    Edited by: Nedal Seyam on May 14, 2009 8:26 AM

    Sory, but you're in the wrong forum ;-)

  • ACS 5.3 Authorization problem with using Identity Groups in Access Policy Rule

    Hello guys, I am found a problem which I can't solve regarding authorization with using Identity Groups in Access Policy rule.
    ACS version: 5.3.0.40.6 (internal build B.839)
    I have very simple RADIUS Authorization rule which authorize user on behalf of right Identity Group.
    Requested Identity Group exist
    Testing user is created in Internal Users and has assigned requested Identity Group
    Radius Access Policy: 
    Authentication against Identity Store Sequence, where authorization server is external RSA SecurID device and additional attributes retrieval is configured from Internal Users.
    Authorization is very simple – One Rule with only one Condition which is: Identity Group - in - Requested_Testing_Rule. Then Default rule is set to Deny.
    When I will try login with my testing user then authentication against RSA SecurID is OK, but authorization will be denied by Default rule – It looks like my Rule with Identity Group is totally omitted.
    I am managing several other ACS servers (version 5.3 but with older patches) where similar rules are working without problem.
    What I am tested:
    Remove testing user and create his account again.
    Rename Identity Group
    Use another Identity Group
    Remove Access Policy rule and create it again
    Use Compound Condition: System:Identity Group
    Use Compound Condition: System:UserID instead of Identity Group in Rule (it is working without problem)
    Do you have any idea where problem can be?

    OK guys, it started working yesterday without any configuration change. Maybe it was some database inconsistence wich was solved by ACS itself.

  • Wwctx_api.get_user in Dynamic Page?

    Can API calls be made from select statements within the <ORACLE></ORACLE> tags in Dynamic Pages? The following query should list courses that someone has signed up for but the query cannot be saved within the Dynamic Page:
    <ORACLE>
    select course_name
    from course
    where user_id = wwctx_api.get_user
    </ORACLE>
    Regards,
    Jay
    Jay Mason
    Director, Oracle Web Applications Development
    Effective Shareholder Solutions, Inc.

    Jay,
    Just prefix the function with "PORTAL30" (or the name of the schema where Portal is installed, if not PORTAL30).
    <ORACLE>
    select course_name
    from course
    where user_id = PORTAL30.wwctx_api.get_user
    </ORACLE>
    null

  • Lov populated with wwctx_api.get_user

    Hi Friends ,
    I am trying to pull the records in to LOV based on the user login .."select dist from sometable where sname ='wwctx_api.get_user' ,,,But it is not returning any records ..Any help ..thanks in advance ..
    Vi

    Hi,
    I think the single quotes is the problem. It is trying to find a record with the sname = 'wwctx_api.get_user'. It should be
    select dist from sometable where sname = wwctx_api.get_user
    Thanks,
    Sharmila

  • Looking for way to use certificate attributes in Authorization policy

    does any one know how to use certificate attributes in authorization policy when I authenticate with PEAP ??
    is it only working when I authenticate with EAP-TLS ??
    is there any way to use these attributes with peap ??
    Also, what are ways to distinguish corp asset as priavate asset without using certificate ??
    Thank you.
    P/S I'm using wired network !     

    Hi,
    Peap authentication is a password based authentication protocol, eap-tls is when a client uses a certificate for authentication. So there is not a way to validate cert attributes since the client doesnt send one for PEAP.
    You can use machine authentication to validate the corporate asset and rely on the microsoft login process to validate the user account. You can also consider NAM supplicant to perform eap chaining (sends both machine and user authentication and is only supported by ISE as your radius server at this point).
    Thanks,
    Tarik Admani
    *Please rate helpful posts*

  • VS, ODT and using "Oracle Project"-template requires Policy Management

    HI,
    I installed the ODT 11.1.0.6.20 and tried to create a new project using the "Oracle Project" but received the following error message: "The project <ProjectName> requires Policy Management. Open this project in Visual Studio.NET Enterprise Developer or Visual Studio.NET Enterprise Architect."
    I have tried this using VS 2008 Professional and Team Edition. The operating systems is Vista x64 Ultimate.
    Oracle documentation doesn't mention any specific VS version so this is perhaps something else. Is there a workaround or fix to get around this?
    TIA,
    Kari

    OK, I'll give it a try. This suggestion makes perfect sense. I have used that template to create a project before, but noticed that it doesn't contain a windows form by default and so I assumed that it was a build for a n-tier application database access class, which is not necessarily what I want, and so I abandoned the effort. I know I can add a window form. I appreciate the response and will post back my results.
    Is there an example project somewhere that I could download and have a look at?
    Thanks again for your reply, even though you didn't reply to me. I think you resolved my problem! :-)
    Bruce
    Edited by: Bruce Davis on Oct 19, 2009 11:07 AM
    Edited by: Bruce Davis on Oct 19, 2009 11:11 AM
    I replied to the wrong post!

  • SOA BPEL 11g (11.1.1.3.0) - Using encapsulated retries in fault-policy file

    Hi,
    We are using oracle SOA suite 11g (11.1.1.3.0)
    I'm trying to configure a fault-policy file so that it first retries 20 times every 20 secs, then reties 20 times every 10 minutes, then retries 23 times every hour, then retries 24 times every 6 hours and if the fault persists call a java action to send an email and then go to human-intervention. It seems however that only the first retry is executed. The rest ones are ignored and the action following the first retry failure is the Java Action. The fault-policy is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="0.0.1" id="TransferResponsibilityRequestProcessFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:freeze="http://rom/cosmote/bpel/webservice/util" name="freeze:BpelWSFault">
    <condition>
    <action ref="ora-human-intervention"/>
    </condition>
    </faultName>
    <faultName xmlns:retry="http://rom/cosmote/bpel/webservice" name="retry:PendingRequestsFault">
    <condition>
    <action ref="ora-retry-20sec"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry-20sec">
    <retry>
    <retryCount>10</retryCount>
    <retryInterval>20</retryInterval>
    <retryFailureAction ref="ora-retry-10min"/>
    </retry>
    </Action>
         <Action id="ora-retry-10min">
    <retry>
    <retryCount>10</retryCount>
    <retryInterval>600</retryInterval>
    <retryFailureAction ref="ora-retry-1hour"/>
    </retry>
    </Action>
    <Action id="ora-retry-1hour">
    <retry>
    <retryCount>23</retryCount>
    <retryInterval>3600</retryInterval>
    <retryFailureAction ref="ora-retry-6hour"/>
    </retry>
    </Action>
         <Action id="ora-retry-6hour">
    <retry>
    <retryCount>24</retryCount>
    <retryInterval>21600</retryInterval>
    <retryFailureAction ref="ora-java"/>
    </retry>
    </Action>
    <Action id="ora-java">
    <javaAction className="gr.cosmote.bpel.util.JavaActionInCaseOfRetryFails"
    defaultAction="ora-human-intervention">
    <returnValue value="RETURNED" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    Is retrying with various intervals only done by using the tag <exponentialBackoff/>?
    Thanks for any response.

    I had a similar requirement, although not as elaborate as yours. After I failed to figure it out myself I filed a SR. Basically, you cannot restart a retry block after the first execution to avoid an infinite loop.
    If you need to send the e-mail after the 23rd hour, why not just retry until the 23rd hour and send an e-mail?

  • How to use Java Action in fault policy

    Hi ,
    I want to execute custom java Action as fault handler in fault-policy implemntation. I have done but it is not working. I am putting code for fault-policies.xml and also java Action class.
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <faultPolicy version="0.0.1" id="FusionMidFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
         <test>$fault.code="MYCODE"</test>
    <action ref="ora-java"/>
    </condition>
    </faultName>
    * <faultName>
    <condition>
    <action ref="ora-java"/>
    </condition>
    </faultName>
    </Conditions>
    <Action id="ora-java">
    <JavaAction ClassName="JavaPolicy.TestJavaAction"
    defaultAction="ora-human-intervention" >
    <ReturnValue value="ABORT" ref="ora-terminate"/>
    <ReturnValue value="MANUAL" ref="ora-human-intervention"/>
    </JavaAction> *
    </Action>
    <Actions>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    2. Java class in JavaPolicy package
    package JavaPolicy;
    import com.collaxa.cube.engine.fp.BPELFaultRecoveryContextImpl;
    import oracle.integration.platform.faultpolicy.IFaultRecoveryContext;
    import oracle.integration.platform.faultpolicy.IFaultRecoveryJavaClass;
    public class TestJavaAction implements IFaultRecoveryJavaClass {
    public void handleRetrySuccess(IFaultRecoveryContext ctx) {
    System.out.println("This is for retry success");
    handleFault(ctx);
    public String handleFault(IFaultRecoveryContext ctx) {
    System.out.println("-----Inside handleFault-----\n" +
    ctx.toString());
    BPELFaultRecoveryContextImpl bpelCtx =
    (BPELFaultRecoveryContextImpl)ctx;
    bpelCtx.addAuditTrailEntry("hi there");
    System.out.println("Policy Id" + ctx.getPolicyId());
    return "MANUAL";
    I have kept the java file in 'AExpPrj\src\JavaPolicy' where AExpPrj is my project Name.
    Where I am doing mistake, I could not find. Is there any link including complete example of Java Action in fault policies.
    Thanks & Regards
    Yogendra Rishishwar
    9867927087

    A bean is obtain by <jsp:useBean> tag nd once bean is obtained we can get its property by using getProperty tag.

Maybe you are looking for

  • Ad that won't go away

    every time i open safari i get another window that opens for myvdrive. I tried going into safari preferences but couldn't find it. How do I remove this Ad/ virus from my mac? I am also new to MacBooks so if you could go step by step if appreciate it!

  • ORACLE_HOME Directory Structure and Content description

    Can anyone show me the Oracle document or website which lists the ORACLE_HOME Directory Structure and Content description for windows platform. Oracle 10g R2. Thank you, Smith

  • CT Loader : Problem

    I tried to get the Old Safari Tool bar loading ( the blue bar going across instead of the loading showing in the corner) I tried to do this by doing the following command. Below is the screen shot of the command http://emberapp.com/nimish/images/pict

  • Mac Mail crashes on program start-up

    I updated to Snow Leopard 10.6.7 last night and unfortunately since then I've not been able to use Mac Mail. Whenever I start the program which pics up my mobile me and a pop account it hangs after about 10-15 seconds. I can get round it by using web

  • I am trying to download ITune and keep getting message Apple application not found. Error 2

    I am trying to Download ITunes to my PC and keep receiving a message " Apple Application Support not found. Error 2.  The installation will not complete.