ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB9: Schema Validation XMLNSC Parser

Post new topic  Reply to topic
 IIB9: Schema Validation XMLNSC Parser « View previous topic :: View next topic » 
Author Message
akil
PostPosted: Mon Jun 15, 2015 6:54 am    Post subject: IIB9: Schema Validation XMLNSC Parser Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

Hi

The documentation on the validation properties states
Quote:

If you enable message validation, and you select On Demand or Immediate for Parse Timing, validation errors might not be detected until later in the processing of a message by a message flow, or might never be detected if a portion of the message is never parsed. To make sure that all fields in a message are validated, either select Complete or, if the message domain is MRM, select Immediate and make sure that you resolve all unresolved types with a Composition of Choice or Message at the start of your message flow.


I understand from the above that, to completely parse the input (of a publicly available API), we'll use the setting as 'complete'.

But when this is set to 'complete' , is the service now susceptible to XML Denial of Service ? http://www.ws-attacks.org/index.php/XML_Document_Size_Attack ?
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Mon Jun 15, 2015 6:56 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Shouldn't that depend entirely on the transport you're using to receive the XML document?

Shouldn't you consider how you are exposing that transport to inputs from somewhere that could generate a denial of service attack?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jun 15, 2015 11:24 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

There is more than one way to attack a system using an XML document. Not all of them will be prevented by using Parse Timing='On demand'.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
akil
PostPosted: Mon Jun 15, 2015 8:26 pm    Post subject: Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

Hi

The transport is HTTP.

Agree, there are many possible attacks, and not all of them would have a single solution. Validating the incoming XML against a schema is some thing that should be in place would be one of the things to do , isn't it ? https://www.owasp.org/index.php/Data_Validation.

I understand that one should do the following to complete data validation:
1. Completely validate the document (& not only parts that are referenced), by using parse timing = 'complete'
2. Use Exception instead of ExceptionList to stop validation on the first error

Are there any other parameters that could be of relevance here?

While the documentation says XMLNSC is a streaming parser, does parse timing = 'complete' result in the full document getting loaded in memory (which would make it susceptible to large size XML document attacks) ?


[/list]
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Tue Jun 16, 2015 4:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So HTTP documents get very messy to send and use as they get larger than about 10 meg.

Again, you should probably have either configuration at your webserver or configuration at your firewall/web proxies to detect and limit the size of incoming documents. Ideally, both.

Yes, the point of a streaming parser is that it limits the amount of memory that is used - at least up front. If your code accesses the full document, or even the last element in the document, then it will still all get loaded into memory.

Yes, if you ask it to parse the complete document, then the complete document will get loaded into memory. Because it does indeed have to access the last element in the document.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB9: Schema Validation XMLNSC Parser
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.