<docbook><section><title>VirtTipsAndTricksSpongerAllocationAndWebIDACL</title><para> </para>
<title>Sponger Resource Allocation and WebID ACLS</title>Sponger Resource Allocation and <ulink url="WebID">WebID</ulink> ACLS
<bridgehead class="http://www.w3.org/1999/xhtml:h2">What?</bridgehead>
<para>How to control user agent usage of sponger resources.
 In this case, HTTP connections to Linked Data transformation URLs.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Why?</bridgehead>
<para>More often than not, you would like to control access to your Sponger instance.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">How?</bridgehead>
 Leverage the power of Vrtuoso&#39;s in-built <ulink url="WebID">WebID</ulink> based ACLs which enables you apply basic and sophisticated rules that control user agent access.<bridgehead class="http://www.w3.org/1999/xhtml:h3">Sample INI setting</bridgehead>
<programlisting>...
[HTTPServer]
ServerThreads = 100
MaxRestrictedThreads = 50 
...
</programlisting><para> This value sets an HTTP connection threshold for URLs consumed by user agents over http: . The remainder are exclusively accessible to user agents that present <ulink url="WebID">WebID</ulink> watermarked X.509 certificates.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Simple Example</bridgehead>
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Prerequisites</bridgehead>
<orderedlist spacing="compact"><listitem>Make sure the following packages are installed: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="https://virtuoso.openlinksw.com/download/">conductor_dav.vad</ulink> </listitem>
<listitem><ulink url="https://virtuoso.openlinksw.com/download/">policy_manager_dav.vad</ulink> </listitem>
<listitem><ulink url="https://virtuoso.openlinksw.com/download/">cartridges_dav.vad</ulink> </listitem>
</itemizedlist></listitem>
<listitem>Make sure <ulink url="VirtSetupSSL">Virtuoso HTTPS Listener is set up</ulink> </listitem>
<listitem>Make sure the  cartridges package is configured to use the HTTPS Listener from above: <orderedlist spacing="compact"><listitem>Go to Conductor -&gt; Security Admin -&gt; Packages: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacls1.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacls1.png" /></figure></ulink> </listitem>
<listitem>Click &quot;Configure&quot; for the cartridges package </listitem>
<listitem>Select HTTPS Listener and click &quot;Set&quot;: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacls2.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacls2.png" /></figure></ulink></listitem>
</orderedlist></listitem>
</orderedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Steps</bridgehead>
<orderedlist spacing="compact"><listitem>Assume a demo user with <ulink url="WebID">WebID</ulink>: <programlisting>http://id.myopenlink.net/dataspace/person/demo#this
</programlisting></listitem>
<listitem>Generate  X.509 certificate with <ulink url="WebID">WebID</ulink> watermarks for the <ulink url="WebID">WebID</ulink> from above ex.: <itemizedlist mark="bullet" spacing="compact"><listitem>Using <ulink url="http://id.myopenlink.net/certgen/">Virtuoso X.509 Certificate Generator</ulink> or </listitem>
<listitem><ulink url="http://id.myopenlink.net/ods">Using the generator built into ODS</ulink>.
 See more details <ulink url="http://ods.openlinksw.com/wiki/ODS/ODSGenerateX509Certificate">here</ulink>.
</listitem>
</itemizedlist></listitem>
<listitem>Go to Conductor -&gt; Linked Data Security -&gt; Access Control: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl1.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl1.png" /></figure></ulink> </listitem>
<listitem>Go to Groups: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl2.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl2.png" /></figure></ulink> </listitem>
<listitem>Click &quot;Add New&quot;: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl3.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl3.png" /></figure></ulink> <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl4.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl4.png" /></figure></ulink> </listitem>
<listitem>Fill out the presented form with the following values respectively: <itemizedlist mark="bullet" spacing="compact"><listitem><emphasis>Group URI</emphasis>: for ex.
 &quot;urn:webid:acl:mygroup&quot; </listitem>
<listitem><emphasis><ulink url="WebID">WebID</ulink></emphasis>: for ex.
 the demo&#39;s user <ulink url="WebID">WebID</ulink> from above: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl5.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl5.png" /></figure></ulink> </listitem>
</itemizedlist></listitem>
<listitem>Click &quot;Add New&quot; so to add the <ulink url="WebID">WebID</ulink> to the Group <ulink url="WebID">WebID</ulink>&#39;s List: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl6.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl6.png" /></figure></ulink> </listitem>
<listitem>You can add as many as you want new <ulink url="WebIDs">WebIDs</ulink> following the steps from above.
</listitem>
<listitem>Finally click &quot;Save&quot; </listitem>
<listitem>The <ulink url="WebID">WebID</ulink> Group should be created: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl7.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl7.png" /></figure></ulink> </listitem>
<listitem>Go to &quot;<ulink url="WebID">WebID</ulink> ACLs&quot; tab: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl8.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl8.png" /></figure></ulink> </listitem>
<listitem>Add <ulink url="WebID">WebID</ulink> ACL associated with the group created from above: <orderedlist spacing="compact"><listitem>Change <emphasis>Type</emphasis> to &quot;Group&quot;; </listitem>
<listitem>Enter for <emphasis>WebID/Group</emphasis> the name of the group, i.e.: &quot;urn:webid:acl:mygroup&quot; </listitem>
<listitem>Change <emphasis>Realm</emphasis> to &quot;Virtuoso Sponger&quot;.
 Note, the &quot;<emphasis>Virtuoso Sponger</emphasis>&quot; Realm name is obligatory to be entered exactly as &quot;Virtuoso Sponger&quot; to serve the needs of Virtuoso Sponger Resource Allocation with <ulink url="WebID">WebID</ulink> ACLS: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl9.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl9.png" /></figure></ulink> </listitem>
</orderedlist></listitem>
<listitem>Click &quot;Register&quot; </listitem>
<listitem>The &quot;WebID/Group&quot; ACL should be created: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl10.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl10.png" /></figure></ulink> </listitem>
<listitem>Go to &quot;Cartridges&quot; tab and click &quot;Add New&quot;: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl11.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl11.png" /></figure></ulink> </listitem>
<listitem>Should be presented the list of all supported Virtuoso Cartridges: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl12.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl12.png" /></figure></ulink> </listitem>
<listitem>Set for &quot;<emphasis>WebID/Group URI pattern</emphasis>&quot; the group created from above and select all cartridges: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl13.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl13.png" /></figure></ulink> </listitem>
<listitem>Click &quot;Save&quot;: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl14.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl14.png" /></figure></ulink> </listitem>
<listitem>The Cartridges WebId/GroupID URI is configured: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl15.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl15.png" /></figure></ulink> </listitem>
<listitem>Next we are going to sponge a url, for ex.:  <ulink url="http://google.com/">http://google.com/</ulink>  </listitem>
<listitem>Let&#39;s make sure there is no data locally in graph  <ulink url="http://google.com/">http://google.com/</ulink> : <programlisting>SPARQL 
SELECT * 
  FROM &lt;http://google.com/&gt; 
 WHERE
  {
    ?s ?p ?o
  };
s                 p              o
VARCHAR           VARCHAR        VARCHAR
________________________________________________________


0 Rows. -- 0 msec.
</programlisting></listitem>
<listitem>Attempt to sponge our example URL i.e.
 by accessing: <programlisting>http://host:port/about/html/http://google.com/
</programlisting></listitem>
<listitem>In this case there should be no retrieved data: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl16.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl16.png" /></figure></ulink> </listitem>
<listitem>Next perform sponge by accessing the following URL: <programlisting>https://host:ssl-port/about/html/http://google.com/
</programlisting></listitem>
<listitem>Should be asked for certificate, choose the one generated from above: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl20.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl20.png" /></figure></ulink> </listitem>
<listitem>In case of &quot;This Connection is Untrusted&quot; message is shown: <orderedlist spacing="compact"><listitem>Click &quot;I Understand the Risks&quot;: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl17.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl17.png" /></figure></ulink> </listitem>
<listitem>Click &quot;Add Exception&quot; <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl18.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl18.png" /></figure></ulink> </listitem>
<listitem>Click &quot;Get Certificate&quot; and then &quot;Confirm Security Exception&quot; <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl19.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl19.png" /></figure></ulink> </listitem>
<listitem>Should be prompted for valid certificate.
 Select the generated from above: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl20.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl20.png" /></figure></ulink> </listitem>
</orderedlist></listitem>
<listitem>The retrieved remote data should be shown: <ulink url="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl21.png"><figure><graphic fileref="VirtTipsAndTricksSpongerAllocationAndWebIDACL/sacl21.png" /></figure></ulink></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
<listitem><ulink url="VirtSponger">Virtuoso Sponger</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamples">Parametrized Examples of Meta Cartridge Usage via REST Request</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesMetaREST">Meta Cartridges Usage via REST Request</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesMeta">OpenLink-supplied Virtuoso Sponger Meta Cartridges</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSources">OpenLink-supplied Virtuoso Sponger Cartridges</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSWebIDIdpProxy">Using Virtuoso&#39;s Delegated WebID Identity Provider Proxy Service</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSWebIDIdP">Using Virtuoso&#39;s Delegated WebID Verification Service</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSGenerateX509Certificate">Generate an X.509 Certificate hosted WebID Guide</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSGenerateWebIDX509CertOSKeystore">Generate an X.509 Certificate (with a WebID watermark) to be managed by host operating system keystore</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSGenerateWebIDX509CertBrsKeystore">Generate an X.509 Certificate (with a WebID watermark) to be managed by a browser-based keystore</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="VirtSPARQLEndpointProtection">Safeguarding your Virtuoso-hosted SPARQL Endpoint</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuideSPARQLEndpointProtection">SPARQL Endpoint Protection Methods Collection</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/">Virtuoso documentation</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsupportedprotocolendpoint">SPARQL Service Endpoint</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsupportedprotocolendpointuri">Service Endpoint Security</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html#sparqwebservicetbl">Managing a SPARQL Web Service Endpoint</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparql.html">SPARQL</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtSPARQLDET">SPARQL Endpoint DET Configuration Guide</ulink> </listitem>
<listitem><ulink url="VirtSPARQLSecurityWebID">WebID Protocol &amp; SPARQL Endpoint ACLs Tutorial</ulink> </listitem>
<listitem><ulink url="VirtOAuthSPARQL">SPARQL OAuth Tutorial</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuideSPARQLEndpoints">Securing SPARQL endpoints</ulink> </listitem>
</itemizedlist></listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/OdsSPARQLAuth">SPARUL over SPARQL using the http://cname:port/sparql-auth endpoint</ulink> </listitem>
<listitem><ulink url="VirtAuthServerUI">Virtuoso Authentication Server UI</ulink> </listitem>
<listitem><ulink url="VirtSPARQLSSL">Manage a SPARQL-WebID based Endpoint</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/VirtODSSecurityWebID">WebID Protocol Support in OpenLink Data Spaces</ulink>.
</listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSPkiSetup">Guide for Set up a X.509 certificate issuer and HTTPS listener and generate ODS user certificates</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSSetupSSL">Configure Virtuoso+ODS instance as an X.509 Certificate Authority and HTTPS listener</ulink> </listitem>
<listitem><ulink url="VirtSetupSSL">Configure Virtuoso instance as an X.509 Certificate Authority and HTTPS listener</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/VirtODSPubSubHub">Setting up PubSubHub in ODS</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/VirtPubSubHub">PubSubHubBub Demo Client Example</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/VirtFeedPubSubHub">Feed subscription via PubSubHub protocol Example</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/VirtPubSubHubACL">Setting Up PubSubHub to use WebID Protocol or IP based control lists</ulink> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/OdsKeyImport">CA Keys Import using Conductor</ulink> </listitem>
</itemizedlist></section></docbook>