security context (isUserInRole problem (role))

Hello

I use jdeveloper 11.1.2.4

Any mention of help with the below code does

I try to use the user role to access two different pages.

Roles applied is that I defined in the application role (jazn-"Data.xml")

My roles are ADMIN_COURSE_APP_ROLE,FINANCE_APP_ROLE, ADMIN_APP_ROLE, ADMIN_APP_ROLE

public String doLogin() throw LoginException, ServletException, IOException {}

String _username =;

Byte [] pw = _password.getBytes ();

String aclevel = _accesslevel;

FacesContext ctx = FacesContext.getCurrentInstance ();

HttpServletRequest request = (HttpServletRequest) () .getRequest () ctx.getExternalContext;

try {}

Topic topic = Authentication.login (new URLCallbackHandler (UN, pw));

weblogic.servlet.security.ServletAuthentication.runAs (object, request);

Dry SecurityContext is ADFContext.getCurrent () .getSecurityContext ();.

If (getAccesslevel () .equals ("S")) {}

If (sec.isUserInRole ("ADMIN_APP_ROLE"): sec.isUserInRole ("ADMIN_COURSE_APP_ROLE") |)

sec.isUserInRole ("CLERK_APP_ROLE"). sec.isUserInRole ("FINANCE_APP_ROLE"))

{

FacesMessage msg =

new FacesMessage (FacesMessage.SEVERITY_ERROR, "username and password was correct,

"Please select the option used");

ctx.addMessage (null, msg);

}

else {}

LoginUrl = string ' / adfAuthentication? "success_url = / faces/student_records."

HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext (m:System.NET.FtpWebRequest.GetResponse ());

sendForward (request, response, loginUrl);

}

} else {}

If (sec.isUserInRole ("ADMIN_APP_ROLE"): sec.isUserInRole ("ADMIN_COURSE_APP_ROLE") |)

sec.isUserInRole ("CLERK_APP_ROLE"). sec.isUserInRole ("FINANCE_APP_ROLE"))

{

LoginUrl = string ' / adfAuthentication? "success_url = / faces/Newapplication";

HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext (m:System.NET.FtpWebRequest.GetResponse ());

sendForward (request, response, loginUrl);

}

else {}

FacesMessage msg =

new FacesMessage (FacesMessage.SEVERITY_ERROR, "no grouping is assigned to this user name",

"Please consult the system administrator');

ctx.addMessage (null, msg);

}

}

} catch (FailedLoginException fle) {}

FacesMessage msg =

new FacesMessage (FacesMessage.SEVERITY_ERROR, "Incorrect Username or Password", "a bad user name or password was specified");

ctx.addMessage (null, msg);

} catch {} (the LoginException)

reportUnexpectedLoginError ("LoginException", the);

}

Returns a null value.

}

Kind regards

Steve Kalenga

You need the role of the valid users in the web.xml file, other subsidies must be configured in jazn-"Data.xml"

And you need to change your code example for using SecurityContext:

// check roles and determine url
String url = null;
SecurityContext sc = ADFContext.getCurrent().getSecurityContext();
if(sc.isUserInRole("ROLE1")){
  url = "url1";
}else{
  url = "url2";
}

// redirect to page
...

As I have already said, provided the sample is version 10g, so you must check what url looks like 11g: "/ page.jspx" or "/ page" or "/ faces/page" or "/ faces/page.jspx '...

Or you can try with the example of https://blogs.oracle.com/jdeveloperpm/entry/how-to_efficiently_redirect_to_an_adf_faces_view_using_adf_controller and transmit viewId defined in adf - config.xml for framework will build a real url rather than to you.

Dario

Tags: Java

Similar Questions

  • License problem of security context for Cisco ASA 5585

    Hello

    Can someone help me in license number for the ASA 5585 security environment,

    We recently purchased a box ASA (5585) which has 2 default security context and we had like to have context for this ASA 25 permit and we got two codes PAK of Cisco for 20 licenses and 5 respectively.

    When we generate the license key by combining the two codes Portal Cisco PAK and apply the same on ASA, do not see the 25; Instead, it shows only 20.

    Is it really possible to stack context like 20 + 5 licenses or to buy a PAK code for any license 25 context?

    Please advise me on this.

    Thanks in advance!

    Kind regards

    Kam

    Hello

    This should probably not be handled with Cisco directly or through the company that got you the license.

    To my knowledge, there is a possibility that the you have everything first to install a license key and the other licence could be upgraded from the previous license until the following limit of function under license.

    I had several occasions where I was provided with the wrong license and had to communicate with Cisco/provider to get licenses appropriate for my device.

    While I was announcing this response I checked the document of licensing for ASA models. It seems to me that there is no security content license 25 for the SAA. The deadline is 20 and license of SC 50 SC

    Check this document:

    http://www.Cisco.com/en/us/docs/security/ASA/asa84/configuration/guide/intro_license.html#wp1230400

    -Jouni

  • ASA 5510 w / license more lost security contexts

    I have an ASA 5510 with license more than security and when I looked the devices a few days ago, I had 2 contexts, however after you have configured the port of Mgm as a regular port contexts show 0, why?  I can't find anywhere on the internet where this problem occurred: this is the result of show worm:

    Cisco Adaptive Security Appliance Software Version 7.0 (8)

    Updated Sunday, 31 May 08 23:48 by manufacturers

    System image file is "disk0: / asa708 - k8.bin.

    The configuration file to the startup was "startup-config '.

    SHIELDASA01 up to 21 hours 16 minutes

    Material: ASA5510, 256 MB of RAM, processor Pentium 4 Celeron 1600 MHz

    Internal ATA Compact Flash, 256 MB

    BIOS Flash M50FW080 @ 0xffe00000, 1024 KB

    Hardware encryption device: edge Cisco ASA - 55 x 0 Accelerator (revision 0 x 0)

    Start firmware: CNlite-MC-Boot-Cisco - 1.2

    SSL/IKE firmware: CNlite-MC-IPSEC-Admin - 3.03

    Microcode IPSec:-CNlite-MC-IPSECm-HAND - 2.05

    0: Ext: Ethernet0/0: the address is 0021.a025.2d3c, irq 9

    1: Ext: Ethernet0/1: the address is 0021.a025.2d3d, irq 9

    2: Ext: Ethernet0/2: the address is 0021.a025.2d3e, irq 9

    3: Ext: Ethernet0/3: the address is 0021.a025.2d3f, irq 9

    4: Ext: Management0/0: the address is 0021.a025.2d3b, irq 11

    5: Int: not used: irq 11

    6: Int: not used: irq 5

    The devices allowed for this platform:

    The maximum physical Interfaces: unlimited

    VLAN maximum: 25

    Internal hosts: unlimited

    Failover: Active / standby

    VPN - A: enabled

    VPN-3DES-AES: enabled

    Security contexts: 0

    GTP/GPRS: disabled

    VPN peers: 150

    This platform includes an ASA 5510 Security Plus license.

    I'm not showing the serial number and keys licese for obivious reasons.  Any help? Thanks in advance.

    You might want to try upgrading your IOS on the SAA, see if it can help, can you check the firewall mode (single or multiple) you're currently on? is your asa transparant or routed?

  • SecurityError: Error #2000: no security context is active.

    I get this intermittent error when I test a web project locally:

    SecurityError: Error #2000: no security context is active.

    I - think - it's a problem loading of an image but the trace statements clearly show its loading, point out the right dimensions, etc.. I looking for two Event.COMPLETE and IOErrorEvent.IO_ERROR sniff and Event.COMPLETE loads very well. However, the image is never displayed.

    Could certainly be part of the code, but the error seems very general. Anyone have any idea what it really means? I thought that I tested that the choice that a local sandbox would choose a security context.

    Thanks for the tips

    I saw that if there is an incorrect path/name in a file to be load.

  • ASA fire services and security context

    Hello.

    We have an old asa 5510, and we would like to change with a new x 5525 asa with services of firepower, using the fueatures IPS.

    In the firewall of the production, we organize 6 security contexts; so the question is: If buy us this product, we can use IPS FirePower feauters in any security context or do we not have limits?

    Thank you

    Daniele

    The only restriction is that one set of politics of power must be applied for all contexts will share policy.

  • Loader: Nan.jpg + SecurityError: Error #2000: no security context is active.

    Hello.

    By using the code below, I get the 2035 error, informing me that my jpg is not a number.

    Same code with the ioErrorHandler bits comments, outputs SecurityError: Error #2000: no security context is active.

    Same code without the NombrAl and with the right way to the jpgs in the string, works fine (charges 16.jpg), as such - var req:URLRequest = new URLRequest("..) (' / images/16.jpg ");

    Any ideas?

    import flash.display. *;

    import flash.net.URLRequest;

    import flash.display.Loader;

    import flash.events. *;

    import flash.utils.setTimeout;

    var req:URLRequest = new URLRequest("..) /images/"+randomNumber+".jpg");

    var loader: Loader = new Loader();

    var randomNumber:Number = Math.ceil (Math.random () * 16);

    function imageLoaded(event:Event):void

    {

    addChild (loader);

    }

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    Loader.Load (req);

    loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);

    function ioErrorHandler(e:IOErrorEvent):void {}

    trace (e.Text);

    }

    use:

    import flash.display. *;

    import flash.net.URLRequest;

    import flash.display.Loader;

    import flash.events. *;

    import flash.utils.setTimeout;

    var randomNumber:Number = Math.ceil (Math.random () * 16);

    var req:URLRequest = new URLRequest("..) /images/"+randomNumber+".jpg");

    var loader: Loader = new Loader();

    function imageLoaded(event:Event):void

    {

    addChild (loader);

    }

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    Loader.Load (req);

    loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);

    function ioErrorHandler(e:IOErrorEvent):void {}

    trace (e.Text);

    }

  • ADF security with identification details & role of database table

    Dear experts,

    I have developed web applications by ADF with JDeveloper 12.1.3.0.0

    I want to apply the ADF security for authentication and authorization process.

    I mentioned several blogs that associated with example ADF security with the database table, but unfortunately I couldn't reach my task of them because all the blogs that make reference to the roles of username, passwords, and user to hardcode.

    In my web application, there are 3 database table (users, roles, User_Role).

    A user can have one or more roles.

    I was able to accomplish this task using spring-mvc + Hibernate + sprig security. Its code of even below.

    <>Authentication Manager

    <>authentication provider

    < jdbc-user-service data-source-ref = "dataSource".

    users by name of user-query =

    "username, password, enabled users to select where username =?"

    authorities-by-name of user-query =

    "" Select username, role of user_roles where username =? ". / >

    < / authentication provider >

    < / authentication manager >

    Pls guide me to solve this problem.

    Thank you

    Mauricette

    User, your question is not clear. You have implemented the safety with the spring? So, what's your question?

    The ADF security can be combined with a sql authentificator that reads users and roles of the DB tables. See Java / Oracle SOA blog: the use of tables of database as in WebLogic authentication provider and anything on the Fusion Middleware: Tables of database user to implement authentication in ADF and http://soadev.blogspot.de/2010/04/sqlauthenticator-simply-best.html.

    All of these solutions do not use users coded hard and rolls.

    Timo

  • September 1, El Capitan security update caused problems for everyone?

    Ghost security update (Wednesday) since the restart I can not save pictures from the web... Help?

    Yesterday (Wednesday 8 September), I checked my desktop App Store for updates. There were three updates ' Collage 3 3.6.0, GIPHY capture version 2.4 version and an update of security of El Capitan.  I've updated. The day applications. The computer is restarted.

    Since this restart

    • I can't pull images from the Internet on the desktop.

    • When I try to type in a browser's address bar, TextEdit, twitter Notes when you press the SPACEBAR, the cursor jumps to the application. to another folder in a window to open files by clicking on the new space bar opens a dialog box containing the details of the case. After that clicking on open and closed space bar folder (if there is no file open window, hit the space bar when typing does not she jumps off the typed text box.

    • Security and privacy / general when I click the lock to make changes. It opens and the user name / password permissions I clique (blue) sounds a release button click, the security and the confidentiality of the dialog box flickers then without effect, the lock is not unlock.

    Tonight, I checked App Store: updates in the last 30 days there is no security updates listed.

    How can I solve my problems?

    Anyone who has met by a ghost security patch in the App Store?

    System: OS El Capitan

    10.11.6 version

    Macintosh: MacPro (early 2009)

    Processor Xeon 3.33 GHz 6-CoreIntel

    Keyboard: Keyboard with numeric keypad - English International wired Apple matching the magic trackpad.

    * With the help of a Mac in isolation. Assistance mac, near Wexford, in Ireland. I am my COMPUTER service. Hoping someone can shed some light on my problems. I have found no mention of anyone else having similar problems when I google my problems. I use Mac since the end of the 1980s (obviously not the one above although I have a Macintosh SE working group.)

    Thanks in advance for your help.

    A few moments ago, I found this on the apple [dot] com/en - that is to say/HT207130 :

    The content of security Security Update 2016-001 El Capitan and security update 2016-005 Yosemite

    This document describes the security content Security Update 2016-001 El Capitan and security update 2016-005

    Released September 1, 2016

    Kernel

    Available for: v10.10.5 OS X Yosemite and OS X El Capitan v10.11.6

    Impact: An application may be able to reveal the kernel memory

    Description: A validation problem was addressed through better disinfection of entry.

    CVE-2016-4655: Citizen Lab and Lookout

    Kernel

    Available for: v10.10.5 OS X Yosemite and OS X El Capitan v10.11.6

    Impact: An application may be able to execute arbitrary code with the privileges of the kernel

    Description: A problem of corruption memory was sent by the improved memory handling.

    CVE-2016-4656: Citizen Lab and Lookout

    2016-001 El Capitan's Security Update and security update 2016-005 Yosemite include security of safari content .

    PS: Safari did not work properly on the Mac since we last updates of Yosemite.

    Thank you for using communities of Apple support, Deirdre-2D!

    It seems that you encounter several different questions since Wednesday last on your Mac Pro. Let's see if we can get these cleared up for you. Test questions you mentioned having tried every troubleshooting step. Don't hesitate to jump steps you have already tried, but let me know?

    1. your Mac hard drive backup - before you start troubleshooting procedures, I always recommend a fresh backup. It is preferable "to have" one the "need."

    2 try safe mode if your Mac does not start -even if your Mac starts, which makes sure it starts successfully.

    3. How to test one question in another user on your Mac account - this will help determine if the questions are found in all your user account or if they are systemic.

    4. on the recovery of OS X - if you're still with these problems, reinstall the operating system on your Mac.

    Have a great day!

  • Certificate of security (https) YouTube problem

    Hello

    I use the latest version of firefox with and recently I am facing strange problem... whenever I try to visit youtube, to be more precise, if not connected all google accounts... Can I visit http://www.youtube.com , but when I try to log in, in which case it redirects to https:// and it displays the following error (the check image url):

    https://ImageShack.com/i/ezbe0c53j

    And if I try to add the exception, it shows this screen (the check image url):

    https://ImageShack.com/i/hj41802cj

    (PS: could not find the download here option so I had to use otherimage guests)

    Also, I tried to change windows, adding automatic site windows time synchronization time and also tried to change the profile, deactivation of add on stable and also tried remove cache/cookies from Google.com and youtube.com and so far nothing work... I can't access youtube while logged in (https)

    His only youtube, no other Web site shows also this security certificate error!

    Please provide a solution to this as soon as possible, thank you!


  • KB967723 security update installation problem

    My operating system is Vista Business SP2 32 bit on my Dell Latitude D830. I was not able to successfully install the security update.  I have run the System Update reinforced tool rebooted and tried 2 times without success. Any ideas?

    Andrei,
    Yes I also tried to download the update manually. Thanks for providing the link. However it was not to be.
    There was an error log that says that Windows installed Modules stopped working, then a pop-up window will ask if I wanted to send information about the problem to Microsoft.

    Hello

    Suggest you manually download KB967723 for Vista 32-bit editions and
    * save * it:

    Security Update for Windows Vista (KB967723) x 86/32 bit
    http://www.Microsoft.com/downloads/d...displaylang=en

    If the system is Vista x 64 [64-bit]:
    http://www.Microsoft.com/downloads/d...a-9fb76dd8da63

    Once the download complete almost * all * open programs and browsers (including antivirus).
    Now try to install KB967723 (. Windows6 0-KB967723-x 86.msu for Vista x 86;)
    Windows6.0 - KB967723 - x64.MSU for Vista x 64)

    If she still manages not to install toll-free support is available:
    http://support.Microsoft.com/default.aspx/KB/967723

    Andrei Andrade TFC, TCSP, including, MCTS70-620 MCP70-290

  • network security IP address problem

    I have a home secure wireless network, lately I get an error message that my IP address has been used by another computer on my network even when my other computer is not in use, it seems as if someone logging on my network and sharing my IP without knowing me is there any software for network access Protection that would allow me to monitor my network also how do you secure my IP address I use a vista software and my firewall is always turned on.  Essentials windows also display the State of my computer is protected.

    I see that sometimes on my wireless network.  I think it unlikely that someone breaks in your network.  It is more likely that your wireless router is getting confused.

    If this happens again, restart your router by unplugging the power supply for a few seconds, then in him plugging wireless.  This should solve the problem.  You can see the list of the router DHCP clients to see what computers are connected. Owner, Boulder computer Maven

  • Security Smartphones blackBerry problem

    Hello please help me on this point.

    My BB 8520,

    There is a problem with the security code when I tried to enter the code, it says wrong code and one morething when I tried enetring the code in the password box, is to show the letters instead of numbers. I almost enterd 9 times still it says wrong password, if I come home once more all my data will be lost. can someone help me on this

    Hi krisjack23

    Suppose you want to keep the 320988 password as you mention on your old post and never entered alt for the password key leaves the initial configuration will be:

    e r 0 c x x you must enter r > e > 0 > c > x > x (0 = zero)

    But if you press alt once before entering the password for the first time, so I think that your password will be it will be:

    3 e 0 c x x you enter Alt > 3 > e > 0 > c > x > x (0 = zero)

    But don't forget it's only you who only know how you set up the password for the first time and how you can enter regularly.

  • Fonts for the context menu problems

    Photoshop CS5 12.0.2 x 32

    How can I reset the police in the context menu? Mine seems to be everywhere. For now, the boxes are empty, but in the past, it was very large and crossed, or angled at 45 degrees. I want to just be what it is supposed to be (that is to say, readable). I am including a screenshot. I tried to delete the preferences already.

    Untitled-1.jpg

    Search the Forum, it is a known problem with the 12.0.2 update and its been reviewed by at least 5 other threads.

    Mylenium

  • stolen iPhone - no email rescue. forget my security questions. big problem

    Hello

    I really need a big help here... a real mess

    Yesterday my iphone 6 has been stolen.

    IMEI - **************

    Serial number. F1 * 5MP

    I did not "Find my iphone" so I can't switch to lost or erase it remotely

    I changed my password but don't remember what my security questions and can't change them (hear no email rescue)

    The thief entered my account and im getting all these types of emails saying -.

    Your identifier (< My ID >) Apple has been used to connect to iCloud via a web browser.

    Date and time: Thursday, July 29, 2016, 7:05 AM PDT

    Browser: Chrome

    Operating system: Windows

    What can I do?

    I want to report my stolen iPhone and prevents him from doing things on my account and see my personal data

    Help, please

    Thanks in advance

    Sarit

    < personal information under the direction of the host >

    If your iDevice is lost or stolen

    If enable you find my phone before it was lost or stolen, you can track only when connected to the Internet by Wi - Fi or cellular. What you can't do, is follow your device using a serial number or other identification number. Neither Apple nor anyone else may find your device. You cannot recover your loss unless you make sure your device for the loss. It is not covered by your warranty.

    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen, what do you do? There are things you should have done in advance - until you have lost it or it has been stolen - and things to do after the fact. Here are a few suggestions:

    1. declaration of a lost or stolen Apple product

    2 find my lost iPod Touch

    3. AT & t. Sprint and Verizon can block phones stolen/tablets

    4. What-To-Do-When-Iphone-Is-Stolen

    5. use ICloud Mode lost

    6. what to do if your iOS device is lost or stolen

    7 6 ways to track and recover your lost/stolen iPhone

    8. find my iPhone

    9 report Stolen iPad | Stolen lost found online

    It pays to be proactive in following the advice on the use of find my phone before you lose your device:

    1. find my iPhone

    2 set up your iDevice oniCloud

    3. OS X Lion/Mountain Lion - in regard to my Mac

    4 the free configuration find your iPhone (even on unsupporteddevices)

  • Windows live sign security for family problems

    Today, I installed Windows Live parental controls on my Windows 7 computer.  Whenever I tried to connect I not was able to do. I tried connecting to my "Hotmail" account and was able to do it without any difficulty. Whenever I am try to connect, I get this error message. "We cannot connect because the network is not available. Make sure that your computer is connected to the internet and try again. "It also gives the error code is

    80048848. I checked several times and I'm definitely connected to the internet. Someone please help with this?

    Hi MaryBright,

    Thanks for posting. I understand that you are having problems with parental controls. I want to clarify if the error you receive is through the Family Safety Web site or in the client of parental control. If the Web site, have you tried using another browser or computer? In the case on the client, I would like to fix parental control as an initial diagnosis. Here's how:

    1. press Windows + R, type AppWiz.cpl, and click OK.

    2. Select Windows Essentials 2012/Windows Live Essentials, click Uninstall/change.

    3. click on fix all Windows Essentials programs.

    We will wait for your answer.

    Kind regards

    Richard

Maybe you are looking for

  • 15 af000ur: 15 - af000ur what operating system?

    Good day! on this laptop model has been replaced a hard drive on the SSD. I installed the 8.1 OEMWindowsoperating system. but it does not come to this laptop (the activation key was not) let it please . ISO (or something like that) with the operating

  • Firmware Update-KDL-52V5100

    I was experiencing intermittent drop audio turned off when you watch satellite TV which is connected via HDMI. I updated the firmware with the version of the 20/04/11 and followed the instructions as stated. I reset all the components according to th

  • Entry update Windows registry corrupt. cannot start or update windows update. Help?

    Windows XP Professional SP3.  Update worked very well.  Caught a virus.  virus to close the security services.  and corrupt it and a few other registry entries.   When I try to reinstall Windows update, it says that I have the current version.    Can

  • Interrupt code 0 x 00000050 after update

    Have restarted the laptop on 10 times - no change. Have tried to start in all modes in the boot advanced options options. Still get the same blue screen that says: "a problem has been detected and Windows has shut down to prevent damage to your compu

  • get this error code when I use windows backup or set a date to restore 0x8007007B

    get the error 0x8007007B when I try to set the resrore or back up files is because I have given dell safe? Inspiron windows 7 64 bit