"Fossies" - the Fresh Open Source Software Archive

Member "geoserver-2.18.1/user/rest/api/accesscontrol.html" (19 Nov 2020, 15332 Bytes) of package /linux/www/geoserver-2.18.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.18.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.18.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.18.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.18.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.18.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><p>HIDE</p></li>
   85 <li><p>MIXED</p></li>
   86 <li><p>CHALLENGE</p></li>
   87 </ul>
   88 </div></blockquote>
   89 <table class="docutils align-default">
   90 <colgroup>
   91 <col style="width: 20%" />
   92 <col style="width: 20%" />
   93 <col style="width: 20%" />
   94 <col style="width: 20%" />
   95 <col style="width: 20%" />
   96 </colgroup>
   97 <thead>
   98 <tr class="row-odd"><th class="head"><p>Method</p></th>
   99 <th class="head"><p>Action</p></th>
  100 <th class="head"><p>Status code</p></th>
  101 <th class="head"><p>Formats</p></th>
  102 <th class="head"><p>Default Format</p></th>
  103 </tr>
  104 </thead>
  105 <tbody>
  106 <tr class="row-even"><td><p>GET</p></td>
  107 <td><p>Fetch the catalog mode</p></td>
  108 <td><p>200,403</p></td>
  109 <td><p>XML, JSON</p></td>
  110 <td></td>
  111 </tr>
  112 <tr class="row-odd"><td><p>PUT</p></td>
  113 <td><p>Set the catalog mode</p></td>
  114 <td><p>200,403,404,422</p></td>
  115 <td><p>XML, JSON</p></td>
  116 <td></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 class="docutils align-default">
  134 <colgroup>
  135 <col style="width: 50%" />
  136 <col style="width: 50%" />
  137 </colgroup>
  138 <thead>
  139 <tr class="row-odd"><th class="head"><p>Exception</p></th>
  140 <th class="head"><p>Status code</p></th>
  141 </tr>
  142 </thead>
  143 <tbody>
  144 <tr class="row-even"><td><p>No administrative privileges</p></td>
  145 <td><p>403</p></td>
  146 </tr>
  147 <tr class="row-odd"><td><p>Malformed request</p></td>
  148 <td><p>404</p></td>
  149 </tr>
  150 <tr class="row-even"><td><p>Invalid catalog mode</p></td>
  151 <td><p>422</p></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><p>Layers</p></li>
  169 <li><p>Services</p></li>
  170 <li><p>The REST API</p></li>
  171 </ul>
  172 </div></blockquote>
  173 <table class="docutils align-default">
  174 <colgroup>
  175 <col style="width: 20%" />
  176 <col style="width: 20%" />
  177 <col style="width: 20%" />
  178 <col style="width: 20%" />
  179 <col style="width: 20%" />
  180 </colgroup>
  181 <thead>
  182 <tr class="row-odd"><th class="head"><p>Method</p></th>
  183 <th class="head"><p>Action</p></th>
  184 <th class="head"><p>Status code</p></th>
  185 <th class="head"><p>Formats</p></th>
  186 <th class="head"><p>Default Format</p></th>
  187 </tr>
  188 </thead>
  189 <tbody>
  190 <tr class="row-even"><td><p>GET</p></td>
  191 <td><p>Fetch all rules</p></td>
  192 <td><p>200,403</p></td>
  193 <td><p>XML, JSON</p></td>
  194 <td></td>
  195 </tr>
  196 <tr class="row-odd"><td><p>POST</p></td>
  197 <td><p>Add a set of rules</p></td>
  198 <td><p>200,403,409</p></td>
  199 <td><p>XML, JSON</p></td>
  200 <td></td>
  201 </tr>
  202 <tr class="row-even"><td><p>PUT</p></td>
  203 <td><p>Modify a set of rules</p></td>
  204 <td><p>200,403,409</p></td>
  205 <td><p>XML, JSON</p></td>
  206 <td></td>
  207 </tr>
  208 <tr class="row-odd"><td><p>DELETE</p></td>
  209 <td><p>Delete a specific rule</p></td>
  210 <td><p>200,404,409</p></td>
  211 <td><p>XML, JSON</p></td>
  212 <td></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="admonition-title">Note</p>
  223 <p>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><p>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).</p></li>
  247 <li><p>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:</p>
  249 <ul>
  250 <li><p>wfs.GetFeature</p></li>
  251 <li><p>wfs.GetTransaction</p></li>
  252 <li><p>wfs.*</p></li>
  253 </ul>
  254 </li>
  255 <li><p>For REST: &lt;URL Ant pattern&gt;;&lt;comma separated list of HTTP methods&gt;. Examples:</p>
  256 <ul>
  257 <li><p>/**;GET</p></li>
  258 <li><p>/**;POST,DELETE,PUT</p></li>
  259 </ul>
  260 </li>
  261 </ul>
  262 </div></blockquote>
  263 <p>The content of a rule element is a comma separated list of roles or the asterisk.</p>
  264 <div class="section" id="id1">
  265 <h3>Exceptions<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
  266 <table class="docutils align-default">
  267 <colgroup>
  268 <col style="width: 50%" />
  269 <col style="width: 50%" />
  270 </colgroup>
  271 <thead>
  272 <tr class="row-odd"><th class="head"><p>Exception</p></th>
  273 <th class="head"><p>Status code</p></th>
  274 </tr>
  275 </thead>
  276 <tbody>
  277 <tr class="row-even"><td><p>No administrative privileges</p></td>
  278 <td><p>403</p></td>
  279 </tr>
  280 <tr class="row-odd"><td><p>POST, adding an already existing rule</p></td>
  281 <td><p>409</p></td>
  282 </tr>
  283 <tr class="row-even"><td><p>PUT, modifying a non existing rule</p></td>
  284 <td><p>409</p></td>
  285 </tr>
  286 <tr class="row-odd"><td><p>DELETE, Deleting a non existing rule</p></td>
  287 <td><p>409</p></td>
  288 </tr>
  289 <tr class="row-even"><td><p>Invalid rule specification</p></td>
  290 <td><p>422</p></td>
  291 </tr>
  292 </tbody>
  293 </table>
  294 <div class="admonition note">
  295 <p class="admonition-title">Note</p>
  296 <p>When adding a set of rules and only one role does already exist, the whole request is aborted.
  297 When modifying a set of rules and only one role does not exist, the whole request is aborted too.</p>
  298 </div>
  299 </div>
  300 </div>
  301 </div>
  302 
  303 
  304       <div class="selfclear pagination-nav">
  305           <div class="leftwise"><strong>Previous</strong>: <a href="selfadmin.html" title="previous chapter">Self admin</a></div>
  306           <div class="rightwise"><strong>Next</strong>: <a href="userrole.html" title="next chapter">Users/Groups and Roles</a></div>
  307       </div>
  308       </div><!-- /#content> -->
  309       <div id="content-right" class="content-border"></div>
  310   <div id="sidebar" class="contrast">
  311       <div id="toc" class="section">
  312         <h3 class="pngfix">Table Of Contents</h3>
  313         <ul>
  314 <li><a class="reference internal" href="#">Access Control</a><ul>
  315 <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>
  316 <li><a class="reference internal" href="#exceptions">Exceptions</a></li>
  317 </ul>
  318 </li>
  319 <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>
  320 <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>
  321 <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>
  322 <li><a class="reference internal" href="#id1">Exceptions</a></li>
  323 </ul>
  324 </li>
  325 </ul>
  326 </li>
  327 </ul>
  328 
  329         <div class="section-footer"></div>
  330       </div>
  331         <div class="section">
  332           <h3>Continue Reading</h3>
  333           <ul>
  334             <li>Previous: <a href="selfadmin.html" title="previous chapter">Self admin</a></li>
  335             <li>Next: <a href="userrole.html" title="next chapter">Users/Groups and Roles</a></li>
  336           </ul>
  337         </div>
  338         <div class="section">
  339         <h3>This Page</h3>
  340         <ul class="this-page-menu">
  341                 
  342         <li><a href="https://github.com/geoserver/geoserver/tree/master/doc/en/user/source/rest/api/accesscontrol.rst">Edit</a></li>
  343         </ul>
  344         </div>
  345   </div><!-- /#sidebar -->
  346   </div><!-- /.wrap> -->
  347 </div><!-- /#main -->
  348 <div id="footer">
  349   <div class="wrap">
  350     &copy; Copyright 2020, Open Source Geospatial Foundation. License <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution</a>.
  351     Last updated on Nov 19, 2020.
  352     Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
  353   </div><!-- /.wrap> -->
  354 </div><!-- /#footer -->
  355   </body>
  356 </html>