Transcript

Other Session State Protection

9. Securing Oracle APEX – Other Session State Protection

 

>> Dan:  What else do you need to worry about when it comes to session state protection? 

 

One of the most important things are service side validations which prevent of course DOM manipulation. You may give somebody a particular type of control like a select list with a subset of all available options such as departments. You may say, “Well, department 10 is no longer being used.” We’ll use a predicate in the WHERE clause in your item and then they can’t select department 10. 

 

[pause]

 

But using tools like you’ve seen me use today like Firebug – and every browser has them now, you can manipulate the DOM and insert values that weren’t there when the page loaded. Your protection against that is to use validations to validate what you need. 

 

[pause]

 

There are also hidden items and these can be made protected. There’s this protected option with hidden items. A lot of folks don’t quite understand what it means. It doesn’t work like session state protection does. It works a little bit differently and that when the hidden item renders on the page, the value cannot be changed from the time the page loads to the time that it’s submitted. If it is you’ll get another error. So the user won’t see it but even if they did find it, a hacker type was to find it they would not be able to manipulate its value. Read-only is also protected. 

 

[pause]

 

Let’s take a look at some of these. 

 

[pause]

 

Here you have a state select list. And this is a silly example. You probably wouldn’t need to validate this but you see very easily I can see the values. If I want to change these values here, I can certainly do that. 

 

[pause]

 

So selecting Alabama would in fact map Florida to session state and push that into the database. Watch out for that user validations. 

 

Another one I’ll show you is hidden and protected. Now, this is used all over APEX already. When you go into hidden item like this customer ID, you’ll see that this is value protected. Interestingly enough this is set to no, it should be a yes. So let’s move that to a yes and we’ll run this page. 

 

[pause]

 

And what you’ll see now is – you don’t see the item but it is in fact in the page. 

 

[pause]

 

Here it is. It’s hidden. It has a value of 7. If I would’ve changed this to say 8, what would happen when I submit the page I would actually be pushing all of the data we see here into a completely different user, so to prevent this use hidden and protected. Now I’ve changed the 7 to an 8 and because we said it’s protected, when I hit “Apply Changes” here we get an error. That’s what hidden and protected is. Make sure you’re using that appropriately for the right items.

 

Copyright SkillBuilders.com 2017

×
Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!

 

×