Security enhacements 785 & 788

We added Security enhacements #785 & #788 to api manager.