1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Xerces-C++: SecurityManager Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical List</span></a></li>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>SecurityManager Class Reference</h1><!-- doxytag: class="SecurityManager" -->Allow application to force the parser to behave in a security-conscious way.
<a href="#_details">More...</a>
<p>
<p>
<a href="classSecurityManager-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom">{ <a class="el" href="classSecurityManager.html#5925d3ee1f15fb4ef3109541586526a16dad0e3a441fd164f44fabc84a28bd12">ENTITY_EXPANSION_LIMIT</a> = 50000
}</td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">default Constructors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSecurityManager.html#47b3dd1601ff8a02a82c6dd1cd7ac47d">SecurityManager</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#47b3dd1601ff8a02a82c6dd1cd7ac47d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classSecurityManager.html#0ef2e2147bba9659c3b64214b509f208">~SecurityManager</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#0ef2e2147bba9659c3b64214b509f208"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">The Security Manager</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSecurityManager.html#a38733a32fdf624e5538728217d88f09">setEntityExpansionLimit</a> (<a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> newLimit)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An application should call this method when it wishes to specify a particular limit to the number of entity expansions the parser will permit in a particular document. <a href="#a38733a32fdf624e5538728217d88f09"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSecurityManager.html#c59e3ac312b0baea093e0fb29c737df3">getEntityExpansionLimit</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Permits the application or a parser component to query the current limit for entity expansions. <a href="#c59e3ac312b0baea093e0fb29c737df3"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSecurityManager.html#1b3c11aab0d2ffdb7e707d124c91bf2e">fEntityExpansionLimit</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Allow application to force the parser to behave in a security-conscious way.
<p>
There are cases in which an XML- or XmL-schema- conformant processor can be presented with documents the processing of which can involve the consumption of prohibitive amounts of system resources. Applications can attach instances of this class to parsers that they've created, via the <a href="http://apache.org/xml/properties/security-manager">http://apache.org/xml/properties/security-manager</a> property. <p>
Defaults will be provided for all known security holes. Setter methods will be provided on this class to ensure that an application can customize each limit as it chooses. Components that are vulnerable to any given hole need to be written to act appropriately when an instance of this class has been set on the calling parser. <hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="5925d3ee1f15fb4ef3109541586526a1"></a><!-- doxytag: member="SecurityManager::@1" ref="5925d3ee1f15fb4ef3109541586526a1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">anonymous enum </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="5925d3ee1f15fb4ef3109541586526a16dad0e3a441fd164f44fabc84a28bd12"></a><!-- doxytag: member="ENTITY_EXPANSION_LIMIT" ref="5925d3ee1f15fb4ef3109541586526a16dad0e3a441fd164f44fabc84a28bd12" args="" -->ENTITY_EXPANSION_LIMIT</em> </td><td>
</td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="47b3dd1601ff8a02a82c6dd1cd7ac47d"></a><!-- doxytag: member="SecurityManager::SecurityManager" ref="47b3dd1601ff8a02a82c6dd1cd7ac47d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SecurityManager::SecurityManager </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Default constructor.
<p>
</div>
</div><p>
<a class="anchor" name="0ef2e2147bba9659c3b64214b509f208"></a><!-- doxytag: member="SecurityManager::~SecurityManager" ref="0ef2e2147bba9659c3b64214b509f208" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual SecurityManager::~SecurityManager </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destructor.
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a38733a32fdf624e5538728217d88f09"></a><!-- doxytag: member="SecurityManager::setEntityExpansionLimit" ref="a38733a32fdf624e5538728217d88f09" args="(XMLSize_t newLimit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void SecurityManager::setEntityExpansionLimit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> </td>
<td class="paramname"> <em>newLimit</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
An application should call this method when it wishes to specify a particular limit to the number of entity expansions the parser will permit in a particular document.
<p>
The default behaviour should allow the parser to validate nearly all XML non-malicious XML documents; if an application knows that it is operating in a domain where entities are uncommon, for instance, it may wish to provide a limit lower than the parser's default.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>newLimit</em> </td><td>the new entity expansion limit </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="c59e3ac312b0baea093e0fb29c737df3"></a><!-- doxytag: member="SecurityManager::getEntityExpansionLimit" ref="c59e3ac312b0baea093e0fb29c737df3" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> SecurityManager::getEntityExpansionLimit </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Permits the application or a parser component to query the current limit for entity expansions.
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the current setting of the entity expansion limit </dd></dl>
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="1b3c11aab0d2ffdb7e707d124c91bf2e"></a><!-- doxytag: member="SecurityManager::fEntityExpansionLimit" ref="1b3c11aab0d2ffdb7e707d124c91bf2e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="Xerces__autoconf__config_8msvc_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> <a class="el" href="classSecurityManager.html#1b3c11aab0d2ffdb7e707d124c91bf2e">SecurityManager::fEntityExpansionLimit</a><code> [protected]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="SecurityManager_8hpp-source.html">SecurityManager.hpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Apr 21 17:55:50 2010 for Xerces-C++ by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
|