"Fossies" - the Fresh Open Source Software Archive

Member "user/rest/api/accesscontrol.html" (22 Nov 2019, 14934 Bytes) of package /linux/www/geoserver-2.16.1-htmldoc.zip:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
    4 <head>
    5   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    6   
    7   <title>Access Control &mdash; GeoServer 2.16.1 User Manual</title>
    8   <link rel="stylesheet" href="../../_static/blueprint/screen.css" type="text/css" media="screen, projection" />
    9   <link rel="stylesheet" href="../../_static/blueprint/print.css" type="text/css" media="print" /> 
   10   <!--[if IE]>
   11   <link rel="stylesheet" href="../../_static/blueprint/ie.css" type="text/css" media="screen, projection" />
   12   <![endif]-->
   13   <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
   14   <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
   15   <script type="text/javascript">
   16     var DOCUMENTATION_OPTIONS = {
   17         URL_ROOT:    '../../',
   18         VERSION:     '2.16.1',
   19         COLLAPSE_MODINDEX: false,
   20         FILE_SUFFIX: '.html'
   21     };
   22   </script>
   23   <script type="text/javascript" src="../../_static/jquery.js"></script>
   24   <script type="text/javascript" src="../../_static/doctools.js"></script>
   25   <script type="text/javascript" src="../../_static/searchtools.js"></script>
   26   <script type="text/javascript" src="../../searchindex.js"></script>
   27   <link rel="shortcut icon" href="../../_static/geoserver.ico"/>
   28       <link rel="search" title="Search" href="../../search.html" />
   29       <link rel="top" title="GeoServer 2.16.1 User Manual" href="../../index.html" />
   30       <link rel="up" title="REST configuration API reference" href="index.html" />
   31       <link rel="next" title="Users/Groups and Roles" href="userrole.html" />
   32       <link rel="prev" title="Self admin" href="selfadmin.html" />
   33 </head>
   34 <body class="rest/api/accesscontrol">
   35   <div id="header" class="selfclear">
   36     <div class="wrap selfclear">
   37       <div id="logo"><a href="../../index.html">GeoServer 2.16.1 User Manual</a></div>
   38       <ul id="top-nav">
   39         <li class="first"><a href="http://geoserver.org/about">About</a></li>
   40         <li><a href="http://blog.geoserver.org/">Blog</a></li>
   41         <li><a href="http://geoserver.org/download">Download</a></li>
   42         <!--<li><a href="../../index.html">Documentation</a></li>-->
   43       </ul>
   44         <form id="quick-search" action="../../search.html" method="get">
   45           <fieldset>
   46             <input type="hidden" name="check_keywords" value="yes" />
   47             <input type="hidden" name="area" value="default" />
   48             <input id="quick-search-query" type="text" name="q" accessKey="q" name="searchQuery.queryString" size="25" value="Search Documentation&hellip;" size="20" tabindex="3" onblur="if(this.value=='') this.value='Search Documentation&hellip;';" onfocus="if(this.value=='Search Documentation&hellip;') this.value='';" />
   49             <input id="quick-search-submit" type="image" value="Search" src="../../_static/chrome/search_icon_green.png" />
   50           </fieldset>
   51         </form>
   52     </div><!-- /.wrap -->
   53   </div><!-- /#header -->
   54   <div id="main">
   55     <div class="wrap selfclear">
   56       <div id="content-left" class="content-border"></div>
   57       <div id="content">
   58 <ul id="breadcrumbs">
   59   
   60   <li><a href="../../index.html">GeoServer 2.16.1 User Manual</a> &raquo;</li>
   61   <li><a href="../index.html" accesskey="U">REST</a> &raquo;</li>
   62   <li><a href="index.html" accesskey="U">REST configuration API reference</a> &raquo;</li>
   63   <li>Access Control</li>
   64 </ul>
   65 <ul id="relatedlinks" class="selfclear">
   66   <li class="first">
   67     <a href="../../py-modindex.html" title="Python Module Index"
   68        accesskey="">modules</a></li>
   69   <li>
   70     <a href="userrole.html" title="Users/Groups and Roles"
   71        accesskey="N">next</a>|</li>
   72   <li>
   73     <a href="selfadmin.html" title="Self admin"
   74        accesskey="P">previous</a>|</li>
   75 </ul>
   76         
   77   <div class="section" id="access-control">
   78 <span id="rest-api-accesscontrol"></span><h1>Access Control<a class="headerlink" href="#access-control" title="Permalink to this headline"></a></h1>
   79 <div class="section" id="security-acl-catalog-format">
   80 <h2><code class="docutils literal notranslate"><span class="pre">/security/acl/catalog.&lt;format&gt;</span></code><a class="headerlink" href="#security-acl-catalog-format" title="Permalink to this headline"></a></h2>
   81 <p>Fetches the catalog mode and allows to change the catalog mode. The mode must be one of</p>
   82 <blockquote>
   83 <div><ul class="simple">
   84 <li>HIDE</li>
   85 <li>MIXED</li>
   86 <li>CHALLENGE</li>
   87 </ul>
   88 </div></blockquote>
   89 <table border="1" class="docutils">
   90 <colgroup>
   91 <col width="20%" />
   92 <col width="20%" />
   93 <col width="20%" />
   94 <col width="20%" />
   95 <col width="20%" />
   96 </colgroup>
   97 <thead valign="bottom">
   98 <tr class="row-odd"><th class="head">Method</th>
   99 <th class="head">Action</th>
  100 <th class="head">Status code</th>
  101 <th class="head">Formats</th>
  102 <th class="head">Default Format</th>
  103 </tr>
  104 </thead>
  105 <tbody valign="top">
  106 <tr class="row-even"><td>GET</td>
  107 <td>Fetch the catalog mode</td>
  108 <td>200,403</td>
  109 <td>XML, JSON</td>
  110 <td>&#160;</td>
  111 </tr>
  112 <tr class="row-odd"><td>PUT</td>
  113 <td>Set the catalog mode</td>
  114 <td>200,403,404,422</td>
  115 <td>XML, JSON</td>
  116 <td>&#160;</td>
  117 </tr>
  118 </tbody>
  119 </table>
  120 <p>Formats:</p>
  121 <p><strong>XML</strong></p>
  122 <div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;catalog&gt;</span>
  123   <span class="nt">&lt;mode&gt;</span>HIDE<span class="nt">&lt;/mode&gt;</span>
  124 <span class="nt">&lt;/catalog&gt;</span>
  125 </pre></div>
  126 </div>
  127 <p><strong>JSON</strong></p>
  128 <div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">&quot;mode&quot;</span><span class="p">:</span><span class="s2">&quot;HIDE&quot;</span> <span class="p">}</span>
  129 </pre></div>
  130 </div>
  131 <div class="section" id="exceptions">
  132 <h3>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline"></a></h3>
  133 <table border="1" class="docutils">
  134 <colgroup>
  135 <col width="50%" />
  136 <col width="50%" />
  137 </colgroup>
  138 <thead valign="bottom">
  139 <tr class="row-odd"><th class="head">Exception</th>
  140 <th class="head">Status code</th>
  141 </tr>
  142 </thead>
  143 <tbody valign="top">
  144 <tr class="row-even"><td>No administrative privileges</td>
  145 <td>403</td>
  146 </tr>
  147 <tr class="row-odd"><td>Malformed request</td>
  148 <td>404</td>
  149 </tr>
  150 <tr class="row-even"><td>Invalid catalog mode</td>
  151 <td>422</td>
  152 </tr>
  153 </tbody>
  154 </table>
  155 </div>
  156 </div>
  157 <div class="section" id="security-acl-layers-format">
  158 <h2><code class="docutils literal notranslate"><span class="pre">/security/acl/layers.&lt;format&gt;</span></code><a class="headerlink" href="#security-acl-layers-format" title="Permalink to this headline"></a></h2>
  159 </div>
  160 <div class="section" id="security-acl-services-format">
  161 <h2><code class="docutils literal notranslate"><span class="pre">/security/acl/services.&lt;format&gt;</span></code><a class="headerlink" href="#security-acl-services-format" title="Permalink to this headline"></a></h2>
  162 </div>
  163 <div class="section" id="security-acl-rest-format">
  164 <h2><code class="docutils literal notranslate"><span class="pre">/security/acl/rest.&lt;format&gt;</span></code><a class="headerlink" href="#security-acl-rest-format" title="Permalink to this headline"></a></h2>
  165 <p>API for administering access control for</p>
  166 <blockquote>
  167 <div><ul class="simple">
  168 <li>Layers</li>
  169 <li>Services</li>
  170 <li>The REST API</li>
  171 </ul>
  172 </div></blockquote>
  173 <table border="1" class="docutils">
  174 <colgroup>
  175 <col width="20%" />
  176 <col width="20%" />
  177 <col width="20%" />
  178 <col width="20%" />
  179 <col width="20%" />
  180 </colgroup>
  181 <thead valign="bottom">
  182 <tr class="row-odd"><th class="head">Method</th>
  183 <th class="head">Action</th>
  184 <th class="head">Status code</th>
  185 <th class="head">Formats</th>
  186 <th class="head">Default Format</th>
  187 </tr>
  188 </thead>
  189 <tbody valign="top">
  190 <tr class="row-even"><td>GET</td>
  191 <td>Fetch all rules</td>
  192 <td>200,403</td>
  193 <td>XML, JSON</td>
  194 <td>&#160;</td>
  195 </tr>
  196 <tr class="row-odd"><td>POST</td>
  197 <td>Add a set of rules</td>
  198 <td>200,403,409</td>
  199 <td>XML, JSON</td>
  200 <td>&#160;</td>
  201 </tr>
  202 <tr class="row-even"><td>PUT</td>
  203 <td>Modify a set of rules</td>
  204 <td>200,403,409</td>
  205 <td>XML, JSON</td>
  206 <td>&#160;</td>
  207 </tr>
  208 <tr class="row-odd"><td>DELETE</td>
  209 <td>Delete a specific rule</td>
  210 <td>200,404,409</td>
  211 <td>XML, JSON</td>
  212 <td>&#160;</td>
  213 </tr>
  214 </tbody>
  215 </table>
  216 <p>Format for DELETE:</p>
  217 <p>The specified rule has to be the last part in the URI:</p>
  218 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">security</span><span class="o">/</span><span class="n">acl</span><span class="o">/</span><span class="n">layers</span><span class="o">/*.*.</span><span class="n">r</span>
  219 </pre></div>
  220 </div>
  221 <div class="admonition note">
  222 <p class="first admonition-title">Note</p>
  223 <p class="last">Slashes (“/”) in a rule name must be encoded with <strong>%2F</strong>. The REST rule <strong>/**;GET</strong> must be encoded
  224 to /security/acl/rest/<strong>%2F**;GET</strong></p>
  225 </div>
  226 <p>Formats for GET,POST and PUT:</p>
  227 <p><strong>XML</strong></p>
  228 <div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
  229 <span class="nt">&lt;rules&gt;</span>
  230    <span class="nt">&lt;rule</span> <span class="na">resource=</span><span class="s">&quot;*.*.r&quot;</span><span class="nt">&gt;</span>*<span class="nt">&lt;/rule&gt;</span>
  231    <span class="nt">&lt;rule</span> <span class="na">resource=</span><span class="s">&quot;myworkspace.*.w&quot;</span><span class="nt">&gt;</span>ROLE_1,ROLE_2<span class="nt">&lt;/rule&gt;</span>
  232 <span class="nt">&lt;/rules&gt;</span>
  233 </pre></div>
  234 </div>
  235 <p><strong>JSON</strong></p>
  236 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
  237 <span class="s2">&quot;*.*.r&quot;</span><span class="p">:</span> <span class="s2">&quot;*&quot;</span><span class="p">,</span>
  238 <span class="s2">&quot;myworkspace&quot;</span><span class="o">.*.</span><span class="n">w</span><span class="s2">&quot;: &quot;</span><span class="n">ROLE_1</span><span class="p">,</span><span class="n">ROLE_2</span><span class="s2">&quot;</span>
  239 <span class="p">}</span>
  240 </pre></div>
  241 </div>
  242 <p>The resource attribute specifies a rule. There are three different formats.</p>
  243 <blockquote>
  244 <div><ul class="simple">
  245 <li>For layers: &lt;workspace&gt;.&lt;layer&gt;.&lt;access&gt;. The asterisk is a wild card for &lt;workspace&gt;
  246 and &lt;layer&gt;. &lt;access&gt; is one of <strong>r</strong> (read), <strong>w</strong> (write) or <strong>a</strong> (administer).</li>
  247 <li>For services: &lt;service&gt;.&lt;method&gt;. The asterisk is a wild card wild card for &lt;service&gt;
  248 and &lt;method&gt;. Examples:<ul>
  249 <li>wfs.GetFeature</li>
  250 <li>wfs.GetTransaction</li>
  251 <li>wfs.*</li>
  252 </ul>
  253 </li>
  254 <li>For REST: &lt;URL Ant pattern&gt;;&lt;comma separated list of HTTP methods&gt;. Examples:<ul>
  255 <li>/**;GET</li>
  256 <li>/**;POST,DELETE,PUT</li>
  257 </ul>
  258 </li>
  259 </ul>
  260 </div></blockquote>
  261 <p>The content of a rule element is a comma separated list of roles or the asterisk.</p>
  262 <div class="section" id="id1">
  263 <h3>Exceptions<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
  264 <table border="1" class="docutils">
  265 <colgroup>
  266 <col width="50%" />
  267 <col width="50%" />
  268 </colgroup>
  269 <thead valign="bottom">
  270 <tr class="row-odd"><th class="head">Exception</th>
  271 <th class="head">Status code</th>
  272 </tr>
  273 </thead>
  274 <tbody valign="top">
  275 <tr class="row-even"><td>No administrative privileges</td>
  276 <td>403</td>
  277 </tr>
  278 <tr class="row-odd"><td>POST, adding an already existing rule</td>
  279 <td>409</td>
  280 </tr>
  281 <tr class="row-even"><td>PUT, modifying a non existing rule</td>
  282 <td>409</td>
  283 </tr>
  284 <tr class="row-odd"><td>DELETE, Deleting a non existing rule</td>
  285 <td>409</td>
  286 </tr>
  287 <tr class="row-even"><td>Invalid rule specification</td>
  288 <td>422</td>
  289 </tr>
  290 </tbody>
  291 </table>
  292 <div class="admonition note">
  293 <p class="first admonition-title">Note</p>
  294 <p class="last">When adding a set of rules and only one role does already exist, the whole request is aborted.
  295 When modifying a set of rules and only one role does not exist, the whole request is aborted too.</p>
  296 </div>
  297 </div>
  298 </div>
  299 </div>
  300 
  301 
  302       <div class="selfclear pagination-nav">
  303           <div class="leftwise"><strong>Previous</strong>: <a href="selfadmin.html" title="previous chapter">Self admin</a></div>
  304           <div class="rightwise"><strong>Next</strong>: <a href="userrole.html" title="next chapter">Users/Groups and Roles</a></div>
  305       </div>
  306       </div><!-- /#content> -->
  307       <div id="content-right" class="content-border"></div>
  308   <div id="sidebar" class="contrast">
  309       <div id="toc" class="section">
  310         <h3 class="pngfix">Table Of Contents</h3>
  311         <ul>
  312 <li><a class="reference internal" href="#">Access Control</a><ul>
  313 <li><a class="reference internal" href="#security-acl-catalog-format"><code class="docutils literal notranslate"><span class="pre">/security/acl/catalog.&lt;format&gt;</span></code></a><ul>
  314 <li><a class="reference internal" href="#exceptions">Exceptions</a></li>
  315 </ul>
  316 </li>
  317 <li><a class="reference internal" href="#security-acl-layers-format"><code class="docutils literal notranslate"><span class="pre">/security/acl/layers.&lt;format&gt;</span></code></a></li>
  318 <li><a class="reference internal" href="#security-acl-services-format"><code class="docutils literal notranslate"><span class="pre">/security/acl/services.&lt;format&gt;</span></code></a></li>
  319 <li><a class="reference internal" href="#security-acl-rest-format"><code class="docutils literal notranslate"><span class="pre">/security/acl/rest.&lt;format&gt;</span></code></a><ul>
  320 <li><a class="reference internal" href="#id1">Exceptions</a></li>
  321 </ul>
  322 </li>
  323 </ul>
  324 </li>
  325 </ul>
  326 
  327         <div class="section-footer"></div>
  328       </div>
  329         <div class="section">
  330           <h3>Continue Reading</h3>
  331           <ul>
  332             <li>Previous: <a href="selfadmin.html" title="previous chapter">Self admin</a></li>
  333             <li>Next: <a href="userrole.html" title="next chapter">Users/Groups and Roles</a></li>
  334           </ul>
  335         </div>
  336         <div class="section">
  337         <h3>This Page</h3>
  338         <ul class="this-page-menu">
  339                 
  340         <li><a href="https://github.com/geoserver/geoserver/tree/master/doc/en/user/source/rest/api/accesscontrol.rst">Edit</a></li>
  341         </ul>
  342         </div>
  343   </div><!-- /#sidebar -->
  344   </div><!-- /.wrap> -->
  345 </div><!-- /#main -->
  346 <div id="footer">
  347   <div class="wrap">
  348     &copy; Copyright 2019, Open Source Geospatial Foundation. License <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution</a>.
  349     Last updated on Nov 22, 2019.
  350     Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
  351   </div><!-- /.wrap> -->
  352 </div><!-- /#footer -->
  353   </body>
  354 </html>