This discussion is archived
3 Replies Latest reply: Oct 21, 2013 5:06 AM by AbhishekJ RSS

Restrict size of payload for OSB Proxy

Sam Newbie
Currently Being Moderated

Hi,

 

I have a requirement where I need to restrict the size of payload my OSB Proxy should accept. Example anything > 1 MB should not be accepted.

 

I know there we can set the HTTP " Max Post Size"  in weblogic but that would be at Domain level . I would like to set this at individual Proxy level.

 

Appreciate any help or pointers.

 

- Sam.

  • 1. Re: Restrict size of payload for OSB Proxy
    paddys Newbie
    Currently Being Moderated

    Suspect your only option, once the max message size is set at the WLS managed server level so you're protected from DOS attacks, is to get hold of the HTTP Content-Length header as the first action in your proxy service and choose to process the message or return immediately based on that.

     

    Paddy

  • 2. Re: Restrict size of payload for OSB Proxy
    Sam Newbie
    Currently Being Moderated

    Thanks for reply. I am looking at options outside of the proxy code , if that doesnt seems possible I would have to go with WLS level.

     

    -Sam

  • 3. Re: Restrict size of payload for OSB Proxy
    AbhishekJ Expert
    Currently Being Moderated

    You cant change it outside the Proxy code and only at Proxy level. Either change it globally or if you want to do it at Proxy Level then validate it within Proxy Code.

    If you still want to do it outside the Proxy Code and only at proxy level then you can expand HTTP transport using OSB transport SDK to a custom transport which has a limitation on message size as desired, not a valid use case for designing a custom transport but it will fulfill the requirement if that's all what you care about.   

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points